From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Tue, 09 Oct 2012 12:30:56 +0200 Subject: [U-Boot] [PATCH v2 06/21] pmic: Enable power_board_init() support at TRATS In-Reply-To: <5073E6C8.8050106@denx.de> References: <1349425003-32523-1-git-send-email-l.majewski@samsung.com> <1349425003-32523-7-git-send-email-l.majewski@samsung.com> <5073E6C8.8050106@denx.de> Message-ID: <20121009123056.437366b2@amdc308.digital.local> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano, > On 05/10/2012 10:16, Lukasz Majewski wrote: > > Enable support for power_board_init() method at TRATS board. > > > > Signed-off-by: Lukasz Majewski > > Signed-off-by: Kyungmin Park > > --- > > Changes for v2: > > - None > > --- > > board/samsung/trats/trats.c | 15 +++++++++++---- > > include/configs/trats.h | 1 + > > 2 files changed, 12 insertions(+), 4 deletions(-) > > > > diff --git a/board/samsung/trats/trats.c > > b/board/samsung/trats/trats.c index 80ec4ad..0285668 100644 > > --- a/board/samsung/trats/trats.c > > +++ b/board/samsung/trats/trats.c > > @@ -68,10 +68,6 @@ int board_init(void) > > check_hw_revision(); > > printf("HW Revision:\t0x%x\n", board_rev); > > > > -#if defined(CONFIG_PMIC) > > - pmic_init(I2C_5); > > -#endif > > - > > return 0; > > } > > > > > > @@ -90,6 +86,17 @@ void i2c_init_board(void) > > s5p_gpio_direction_output(&gpio2->y4, 1, 1); > > } > > > > +#ifdef CONFIG_POWER_INIT > > +int power_board_init(void) > > +{ > > + > > +#ifdef CONFIG_PMIC > > + pmic_init(I2C_5); > > +#endif > > + return 0; > > +} > > +#endif > > + > > This enforces my comment in previous patch. We have two CONFIG_ > options, both must be turned on. So at least one is redundant.IMHO > you can drop both of them if power_board_init() is declared weak. I can define power_board_init() as __weak if you are OK with this :-). In this case for sure CONFIG_POWER_INIT could be removed. I agree that CONFIG_PMIC can be removed from this piece of code. > > Best regards, > Stefano Babic > -- Best regards, Lukasz Majewski Samsung Poland R&D Center | Linux Platform Group