Re: [PATCH v3 5/7] dt-bindings: Add Tegra PMC pad configuration bindings

From: Linus Walleij
Date: Sun Jul 29 2018 - 16:54:56 EST


On Fri, Jul 20, 2018 at 1:16 PM Jon Hunter <jonathanh@xxxxxxxxxx> wrote:

> Adding Linus ...

OMG this sounds bad.

> >> I don't know offhand. Doesn't look like it if you have custom values.
> >
> > It's listed under "Supported generic properties" in
> > pinctrl-bindings.txt. The convention seems to be not to add a vendor
> > prefix even though such custom macro values are used. The property is
> > currently used by qcom,pmic-gpio, qcom,pmic-mpp, and renesas,pfc-pinctrl.
> > I could not find a bindings document describing it with a vendor prefix.
>
> Looking at other users of the 'power-source' property it is not clear to
> me if the values should/can be vendor specific or not. I see cases where
> some people use definitions and others use actual voltages.
>
> Linus, any recommendations here?

It's a bit of imperfect world here.

I always imagines it was some kind of enumerator
like source A, B or C... so 0, 1 defined in sime include/dt-bindings/*
would make most sense to me.

In general, use SI-units if you can, else use something that makes
sense for the people writing the device tree. These enumerators
seems to make sense.

If nothing makes any sense, maybe a custom property makes it
make sense.

Yours,
Linus Walleij