mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-25 03:18:51 +09:00
![Sébastien Szymanski](/assets/img/avatar_default.png)
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>
32 lines
550 B
C
32 lines
550 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright 2019 NXP
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <errno.h>
|
|
#include <i2c.h>
|
|
#include <power/pmic.h>
|
|
#include <power/pca9450.h>
|
|
|
|
static const char pca9450_name[] = "PCA9450";
|
|
|
|
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 = 0x25;
|
|
p->hw.i2c.tx_num = 1;
|
|
p->bus = bus;
|
|
|
|
return 0;
|
|
}
|