#include <linux/bug.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/lp3971.h>
#include <linux/slab.h>
Go to the source code of this file.
#define BUCK_TARGET_VOL_MASK 0x3f |
#define BUCK_TARGET_VOL_MAX_IDX 0x19 |
#define BUCK_TARGET_VOL_MIN_IDX 0x01 |
#define BUCK_VOL_CHANGE_FLAG_GO 0x01 |
#define BUCK_VOL_CHANGE_FLAG_MASK 0x03 |
#define BUCK_VOL_CHANGE_FLAG_TARGET 0x02 |
#define BUCK_VOL_CHANGE_SHIFT |
( |
|
x | ) |
(((!!x) << 2) | (x & ~0x01)) |
#define LDO_VOL_CONTR_MASK 0x0f |
#define LDO_VOL_CONTR_SHIFT |
( |
|
x | ) |
((x & 1) << 2) |
#define LDO_VOL_MAX_IDX 0x0f |
#define LDO_VOL_MIN_IDX 0x00 |
#define LP3971_BUCK1_BASE 0x23 |
#define LP3971_BUCK2_BASE 0x29 |
#define LP3971_BUCK3_BASE 0x32 |
#define LP3971_BUCK_RAMP_REG |
( |
|
x | ) |
(buck_base_addr[x]+2) |
#define LP3971_BUCK_TARGET_VOL1_REG |
( |
|
x | ) |
(buck_base_addr[x]) |
#define LP3971_BUCK_TARGET_VOL2_REG |
( |
|
x | ) |
(buck_base_addr[x]+1) |
#define LP3971_BUCK_VOL_CHANGE_REG 0x20 |
#define LP3971_BUCK_VOL_ENABLE_REG 0x10 |
#define LP3971_LDO_ENABLE_REG 0x12 |
#define LP3971_LDO_VOL_CONTR_BASE 0x39 |
#define LP3971_SYS_CONTROL1_REG 0x07 |
#define SYS_CONTROL1_INIT_MASK 0xCF |
#define SYS_CONTROL1_INIT_VAL 0x40 |
MODULE_DESCRIPTION |
( |
"LP3971 PMIC driver" |
| ) |
|
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
lp3971_i2c_id |
|
|
) |
| |
module_i2c_driver |
( |
lp3971_i2c_driver |
| ) |
|