[RFC] pinctrl: pinctrl-imx: implement suspend/resume

Linus Walleij linus.walleij at linaro.org
Thu Jun 4 01:22:37 PDT 2015


On Mon, Jun 1, 2015 at 5:12 PM, Stefan Agner <stefan at agner.ch> wrote:

> In some SoC's using the IMX pin controller, the IP looses its state
> when entering lowest power modes. Enhance the driver with suspend/
> resume functions restoring the pin states.

(...)

This is weird:

> +       for (i = 0; i < info->ninput_regs; i++)
> +               writel(ipctl->input_regs[i], ipctl->base +
> +                               info->input_regs_offset + i * sizeof(u32 *));

sizeof(u32 *)?

Don't you mean sizeof(u32).

sizeof(u32 *) will be 4 bytes on a 32bit system, 8 bytes on a
64bit system ... but I think your registers are always
32 bits, 4 bytes, apart.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list