[U-Boot] [PATCH 1/3] misc:pmic: Support for voltage to register value conversion function
Lukasz Majewski
l.majewski at samsung.com
Wed Mar 28 13:26:06 CEST 2012
Hi Stefano,
On Wed, 28 Mar 2012 12:26:46 +0200
Stefano Babic <sbabic at denx.de> wrote:
> On 28/03/2012 10:45, Lukasz Majewski wrote:
> > Support for voltage (in uV) to proper register value is added.
> > The function tied to this callback is often PMIC dependent
> > and shall be defined for each device.
> >
> > Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> > Cc: Stefano Babic <sbabic at denx.de>
> > ---
>
> Hi Lukasz,
>
> >
> > +int pmic_vol_to_reg(struct pmic *p, int uV)
>
> You added a new entry point to pmic, but you do not use it...I have
> not found in your patchset why it is necessary for you.
>
Rationale for this change is in commits following this one.
For trats Samsung target it is necessary to change the default voltage.
I think, that providing access to such a function as a pointer is the
best possible solution.
For example the MAX8997 and MAX8998 PMICs have different way of
calculating the value, which represents the LDO output value.
> I am not sure if we require to add this to the PMIC API or hide in the
> pmic specific code. Other PMICs has not a a register for different
> voltages, but only a bit inside the same register (this is the case
> for the Freescale's PMICs we currently support in u-boot).
I think, that it is easier to define function pointer in the pmic
structure, than separate functions and handling them in target platform
data.
> Best regards,
> Stefano Babic
>
--
Best regards,
Lukasz Majewski
Samsung Poland R&D Center
Platform Group
More information about the U-Boot
mailing list