Re: [Patch v5 2/2] gpio: Document GPIO hogging mechanism

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 19, 2014 at 9:07 PM, Benoit Parrot <bparrot@xxxxxx> wrote:

> Add GPIO hogging documentation to gpio.txt
>
> Signed-off-by: Benoit Parrot <bparrot@xxxxxx>
> Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>

This is starting to look good ...

> +               line_b {
> +                       gpio-hog;
> +                       gpios = <6 0>;
> +                       state = "output-low";

I don't like the state string.

Instead have boolean properties for all states.

line_b {
    gpio-hog;
    gpios = <6 0>;
    output-low;
    line-name = "foo-bar-gpio";
}

Then use of_property_read_bool() in the code to check which
state is to be selected intially. You can check that no mutually
exclusive state are selected, I don't like that an arbitrary string
select the state like that, if we do it that way an enumerator would
be better, I prefer bools.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux