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

Juergen Borleis jbe at pengutronix.de
Fri Mar 4 03:48:53 PST 2016


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

> [...]

-- 
Pengutronix e.K.                              | Juergen Borleis             |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |


More information about the barebox mailing list