public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/5] pmic_fsl: Introduce CONFIG_SYS_FSL_PMIC_I2C_LENGTH
Date: Mon, 22 Oct 2012 18:05:54 +0200	[thread overview]
Message-ID: <20121022180554.56e15db7@amdc308.digital.local> (raw)
In-Reply-To: <CAOMZO5AR+EtxAKOEiYjfVKP_9dM4VkXsCKNMGr-W18BK_6b2uA@mail.gmail.com>

Hi Fabio,

> On Tue, Oct 16, 2012 at 11:39 AM, Stefano Babic <sbabic@denx.de>
> wrote:
> 
> >> --- a/drivers/misc/pmic_fsl.c
> >> +++ b/drivers/misc/pmic_fsl.c
> >> @@ -53,7 +53,7 @@ int pmic_init(void)
> >>  #elif defined(CONFIG_PMIC_I2C)
> >>       p->interface = PMIC_I2C;
> >>       p->hw.i2c.addr = CONFIG_SYS_FSL_PMIC_I2C_ADDR;
> >> -     p->hw.i2c.tx_num = 3;
> >> +     p->hw.i2c.tx_num = CONFIG_SYS_FSL_PMIC_I2C_LENGTH;
> >
> > The bad thing with it is that it seems that each board can have a
> > different value. However, this is bound to the selected pmic and
> > not to the board. So IMHO it should not go into the board
> > configuration file, but in the pmic specific initialization.
> 
> Ok, understood.
> 
> What about putting CONFIG_SYS_FSL_PMIC_I2C_LENGTH inside the PMIC
> include file, such as
> include/dialog_pmic.h
> include/mc13783.h
> include/mc13892.h ?
>

I totally agree.

This definition looks like PMIC device specific and shall be defined at
proper *.h file (as you proposed).

Moreover the
p->hw.i2c.tx_num = CONFIG_SYS_FSL_PMIC_I2C_LENGTH;

shall be assigned at per pmic instantiation:

int pmic_init(bus)
{
...
p->hw.i2c.tx_num = CONFIG_SYS_FSL_PMIC_I2C_LENGTH;
...

}

This should solve your problem.

 


-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center | Linux Platform Group

  reply	other threads:[~2012-10-22 16:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 23:32 [U-Boot] [PATCH v2 1/5] mx25pdk: Include CONFIG_MX25 Fabio Estevam
2012-10-15 23:32 ` [U-Boot] [PATCH v2 2/5] mx25pdk: Add esdhc support Fabio Estevam
2012-10-15 23:32 ` [U-Boot] [PATCH v2 3/5] pmic_fsl: Introduce CONFIG_SYS_FSL_PMIC_I2C_LENGTH Fabio Estevam
2012-10-16 14:39   ` Stefano Babic
2012-10-16 16:12     ` Lukasz Majewski
2012-10-22 15:22     ` Fabio Estevam
2012-10-22 16:05       ` Lukasz Majewski [this message]
2012-10-22 16:16       ` Stefano Babic
2012-10-15 23:32 ` [U-Boot] [PATCH v2 4/5] pmic: Add support for mc34704 Fabio Estevam
2012-10-15 23:32 ` [U-Boot] [PATCH v2 5/5] mx25pdk: Add Ethernet support Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121022180554.56e15db7@amdc308.digital.local \
    --to=l.majewski@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox