Hi Minkyu Kang, Sorry for late response. Please find my comments below.
On Thu, Dec 5, 2013 at 2:50 PM, Minkyu Kang <[email protected]> wrote: > Dear Leela Krishna Amudala, > > On 12/11/13 19:04, Leela Krishna Amudala wrote: >> This function is used by different Exynos platforms, put it in the >> common file. >> >> Signed-off-by: Vadim Bendebury <[email protected]> >> Signed-off-by: Leela Krishna Amudala <[email protected]> >> Reviewed-by: Doug Anderson <[email protected]> >> Reviewed-by: Lukasz Majewski <[email protected]> >> Acked-by: Simon Glass <[email protected]> >> --- >> board/samsung/common/board.c | 19 ------------------- >> drivers/power/power_core.c | 19 +++++++++++++++++++ >> include/power/pmic.h | 1 + >> 3 files changed, 20 insertions(+), 19 deletions(-) >> >> diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c >> index 2512a59..1959c4e 100644 >> --- a/board/samsung/common/board.c >> +++ b/board/samsung/common/board.c >> @@ -156,25 +156,6 @@ static int board_init_cros_ec_devices(const void *blob) >> >> #if defined(CONFIG_POWER) >> #ifdef CONFIG_POWER_MAX77686 >> -static int pmic_reg_update(struct pmic *p, int reg, uint regval) >> -{ >> - u32 val; >> - int ret = 0; >> - >> - ret = pmic_reg_read(p, reg, &val); >> - if (ret) { >> - debug("%s: PMIC %d register read failed\n", __func__, reg); >> - return -1; >> - } >> - val |= regval; >> - ret = pmic_reg_write(p, reg, val); >> - if (ret) { >> - debug("%s: PMIC %d register write failed\n", __func__, reg); >> - return -1; >> - } >> - return 0; >> -} >> - >> static int max77686_init(void) >> { >> struct pmic *p; >> diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c >> index 29ccc83..e715435 100644 >> --- a/drivers/power/power_core.c >> +++ b/drivers/power/power_core.c >> @@ -208,6 +208,25 @@ int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char >> * const argv[]) >> return CMD_RET_SUCCESS; >> } >> >> +int pmic_reg_update(struct pmic *p, int reg, uint regval) >> +{ >> + u32 val; >> + int ret = 0; > > = 0 is unnecessary. > Okay, will remove it. >> + >> + ret = pmic_reg_read(p, reg, &val); >> + if (ret) { >> + debug("%s: PMIC %d register read failed\n", __func__, reg); >> + return -1; >> + } > > please add blank line. > Okay, will add it. >> + val |= regval; >> + ret = pmic_reg_write(p, reg, val); >> + if (ret) { >> + debug("%s: PMIC %d register write failed\n", __func__, reg); >> + return -1; >> + } >> + return 0; >> +} >> + >> U_BOOT_CMD( >> pmic, CONFIG_SYS_MAXARGS, 1, do_pmic, >> "PMIC", >> diff --git a/include/power/pmic.h b/include/power/pmic.h >> index 0e7aa31..d17dbdc 100644 >> --- a/include/power/pmic.h >> +++ b/include/power/pmic.h >> @@ -83,6 +83,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); >> +int pmic_reg_update(struct pmic *p, int reg, uint regval); > > uint regval -> u32 val, for keep naming convention with other functions. > Okay, will change it. Best Wishes, Leela Krishna. >> >> #define pmic_i2c_addr (p->hw.i2c.addr) >> #define pmic_i2c_tx_num (p->hw.i2c.tx_num) >> > > Thanks, > Minkyu Kang. > _______________________________________________ > U-Boot mailing list > [email protected] > http://lists.denx.de/mailman/listinfo/u-boot _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

