[PATCH 5/7] ARM: i.MX: karo-tx6: Setup other PMICs

Sascha Hauer s.hauer at pengutronix.de
Mon Mar 7 00:08:25 PST 2016


On Fri, Mar 04, 2016 at 12:48:53PM +0100, Juergen Borleis wrote:
> Hi Sascha,
> 
> On Wednesday 02 March 2016 17:07:41 Sascha Hauer wrote:
> > diff --git a/arch/arm/boards/karo-tx6x/pmic-rn5t567.c
> > b/arch/arm/boards/karo-tx6x/pmic-rn5t567.c new file mode 100644
> > index 0000000..363ffbc
> > --- /dev/null
> > +++ b/arch/arm/boards/karo-tx6x/pmic-rn5t567.c
> > [...]
> > +int rn5t567_pmic_setup(struct i2c_client *client)
> > +{
> > +       int ret;
> > +       unsigned char value;
> > +
> > +       ret = i2c_read_reg(client, 0x11, &value, 1);
> > +       if (ret != 1) {
> > +               pr_err("i2c read error\n");
> > +               return ret;
> > +       }
> > +
> > +       ret = rn5t567_setup_regs(client, rn5t567_regs,
> > +                               ARRAY_SIZE(rn5t567_regs));
> > +       if (ret)
> > +               return ret;
> > +
> > +       ret = i2c_read_reg(client, RN5T567_DC1DAC, &value, 1);
> > +       if (ret == 1)
> > +               pr_debug("VDDCORE set to %umV\n", regval_to_mV(value));
> > +       else
> > +               pr_err("i2c read error\n");
> > +
> > +       ret = i2c_read_reg(client, RN5T567_DC2DAC, &value, 1);
> > +       if (ret == 1)
> > +               pr_debug("VDDSOC  set to %umV\n", regval_to_mV(value));
> 
> In the case of a successfull init this will return '1' and barebox then prints
> an annoying error message like this:
> 
> Karo-tx6: PMIC setup failed with error -1

Just fixed this, see next branch.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list