Re: [RFC] Documentation: pinctrl: Add "pinmux" property

From: Linus Walleij
Date: Fri Apr 07 2017 - 06:11:51 EST


On Thu, Apr 6, 2017 at 12:35 PM, Jacopo Mondi <jacopo+renesas@xxxxxxxxxx> wrote:

> Document "pinmux" property as part of generic pin controller
> documentation.
> Fix 2 minor typos in documentation while at there.
>
> Signed-off-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx>

Patch applied. This is documenting what is already the case
and is as such very helpful.

> Sending this one as RFC to collect feedback.

I just applied it. It is already much better than what we have.

If more adjustments are needed, people can send additional patches.

> If the change is not rejected is it
> worth adding to pin controller core helper functions to parse the newly
> documented property, as this commit
> <https://patchwork.kernel.org/patch/9411231/>
> did for "pinctrl-pin-array" one?
>
> All drivers using "pinmux" exhibit the same behavior which is fine as long as
> "pinmux" only accepts a list of u32 parameters.
>
> ...
> pins = of_find_property(node, "pinmux", NULL);
> ...
> npins = pins->length / sizeof(u32);
> ...
> of_property_read_u32_index(node, "pinmux",
> i, &pinfunc);
> ...

It makes sense. Just make sure to move users over to use the helpers.

Yours,
Linus Walleij