mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
power: pmic_pca9450: fix PCA9450A I2C address
Quoting Ye Li from NXP: "We have confirmed with PMIC team, 0x35 is used only on early chips and not used any more. 0x25 is the final address." Fix it by merging power_pca9450a_init and power_pca9450b_init into one function power_pca9450_init. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Ye Li <ye.li@nxp.com>
This commit is contained in:
committed by
Stefano Babic
parent
90865614b4
commit
eefd93e7f8
@@ -68,7 +68,7 @@ int power_init_board(void)
|
|||||||
struct pmic *p;
|
struct pmic *p;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = power_pca9450b_init(I2C_PMIC);
|
ret = power_pca9450_init(I2C_PMIC);
|
||||||
if (ret)
|
if (ret)
|
||||||
printf("power init failed");
|
printf("power init failed");
|
||||||
p = pmic_get("PCA9450");
|
p = pmic_get("PCA9450");
|
||||||
|
@@ -11,26 +11,7 @@
|
|||||||
|
|
||||||
static const char pca9450_name[] = "PCA9450";
|
static const char pca9450_name[] = "PCA9450";
|
||||||
|
|
||||||
int power_pca9450a_init(unsigned char bus)
|
int power_pca9450_init(unsigned char bus)
|
||||||
{
|
|
||||||
struct pmic *p = pmic_alloc();
|
|
||||||
|
|
||||||
if (!p) {
|
|
||||||
printf("%s: POWER allocation error!\n", __func__);
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->name = pca9450_name;
|
|
||||||
p->interface = PMIC_I2C;
|
|
||||||
p->number_of_regs = PCA9450_REG_NUM;
|
|
||||||
p->hw.i2c.addr = 0x35;
|
|
||||||
p->hw.i2c.tx_num = 1;
|
|
||||||
p->bus = bus;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int power_pca9450b_init(unsigned char bus)
|
|
||||||
{
|
{
|
||||||
struct pmic *p = pmic_alloc();
|
struct pmic *p = pmic_alloc();
|
||||||
|
|
||||||
|
@@ -54,7 +54,6 @@ enum {
|
|||||||
PCA9450_REG_NUM,
|
PCA9450_REG_NUM,
|
||||||
};
|
};
|
||||||
|
|
||||||
int power_pca9450a_init(unsigned char bus);
|
int power_pca9450_init(unsigned char bus);
|
||||||
int power_pca9450b_init(unsigned char bus);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user