Re: [RFC] GPIO lines [was: GPIO User I/O]

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

 



On Mon, Jul 13, 2020 at 4:20 PM Rodolfo Giometti <giometti@xxxxxxxxxxxx> wrote:

> >>                 motor {
> >>                         gpios = <&gpionb 8 GPIO_ACTIVE_HIGH>;
> >>                         mode = "out-high-open-drain";
> >>                 };
(...)
> > /* Bit 2 express Open drain or open source */
> > #define GPIO_LINE_OPEN_SOURCE 0
> > #define GPIO_LINE_OPEN_DRAIN 4
(...)
> These modes came from include/linux/gpio/consumer.h:

OK I was a bit unclear. Mainly open drain should be a flag on
the line, not a mode.

> Maybe I can do something similar to hog-gpio as below, if you prefer...
>
> bypass0 {
>         gpios = <&gpionb 10 GPIO_ACTIVE_LOW>;
>         output-low;

Yes this is better, just boolean flags is not natural than strings
for this.

However it addresses in a way an issue we have had popping
up from time to time which is assignment of default values to
lines before they are used overall.

I think that would be a bit of thing that should be proper to
solve as part of this.

The discussion has often stopped short due to different
opinions on the device tree bindings for that.

Yours,
Linus Walleij



[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