mirror of
https://xff.cz/git/u-boot/
synced 2025-09-25 04:21:18 +02:00
power: Rename CONFIG_POWER to CONFIG_POWER_LEGACY
This option is used in pre-driver model code and much of it has never been converted to driver model. We want to add a new option to enable power support, so we can use a simple rule in the Makefile. Rename this one, which is really about a particular implementation of power. Also update the pmic.h header file so it either includes the legacy API or the driver model one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
@@ -154,7 +154,7 @@ enum {
|
||||
OPMODE_ON,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_POWER
|
||||
#ifdef CONFIG_POWER_LEGACY
|
||||
int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV);
|
||||
int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode);
|
||||
int max77686_set_buck_voltage(struct pmic *p, int buck, ulong uV);
|
||||
|
@@ -17,7 +17,8 @@
|
||||
|
||||
enum { PMIC_I2C, PMIC_SPI, PMIC_NONE};
|
||||
|
||||
#ifdef CONFIG_POWER
|
||||
/* TODO: Change to !CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
|
||||
#ifdef CONFIG_POWER_LEGACY
|
||||
enum { I2C_PMIC, I2C_NUM, };
|
||||
enum { PMIC_READ, PMIC_WRITE, };
|
||||
enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, };
|
||||
@@ -82,8 +83,9 @@ struct pmic {
|
||||
struct pmic *parent;
|
||||
struct list_head list;
|
||||
};
|
||||
#endif /* CONFIG_POWER */
|
||||
#endif /* CONFIG_POWER_LEGACY */
|
||||
|
||||
/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
|
||||
#ifdef CONFIG_DM_PMIC
|
||||
/**
|
||||
* U-Boot PMIC Framework
|
||||
@@ -306,9 +308,12 @@ struct uc_pmic_priv {
|
||||
uint trans_len;
|
||||
};
|
||||
|
||||
#endif /* CONFIG_DM_PMIC */
|
||||
#endif /* DM_PMIC */
|
||||
|
||||
#ifdef CONFIG_POWER
|
||||
/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
|
||||
#ifdef CONFIG_POWER_LEGACY
|
||||
|
||||
/* Legacy API, do not use */
|
||||
int pmic_init(unsigned char bus);
|
||||
int power_init_board(void);
|
||||
int pmic_dialog_init(unsigned char bus);
|
||||
@@ -319,7 +324,7 @@ int pmic_probe(struct pmic *p);
|
||||
int pmic_reg_read(struct pmic *p, u32 reg, u32 *val);
|
||||
int pmic_reg_write(struct pmic *p, u32 reg, u32 val);
|
||||
int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on);
|
||||
#endif
|
||||
#endif /* CONFIG_POWER_LEGACY */
|
||||
|
||||
#define pmic_i2c_addr (p->hw.i2c.addr)
|
||||
#define pmic_i2c_tx_num (p->hw.i2c.tx_num)
|
||||
|
Reference in New Issue
Block a user