[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdagHFegb0HHyshqOZyJLrdpZwMnQvBtsGeZhOB1p9Lgfg@mail.gmail.com>
Date: Tue, 24 May 2016 13:53:36 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Laxman Dewangan <ldewangan@...dia.com>
Cc: Rob Herring <robh+dt@...nel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH V12 2/2] pinctrl: max77620: add pincontrol driver for MAX77620/MAX20024
On Tue, May 24, 2016 at 1:18 PM, Laxman Dewangan <ldewangan@...dia.com> wrote:
> In this driver, it is configuration via pinctrl. Here pincontrol and gpio
> driver share same registers.
> Now, as we have the method to configure the open drain bit from the GPIO
> interface, we really dont need to do this from pinctrl framework.
OK good that works too...
> For doing from GPIO framework, the client need to aware that gpio is open
> drain type.
>
> Can we make something that open drain of pins can be provided via some
> common interface like DT of controller based on platforms configuration and
> client need not to worry about this? For client, it will be simple gpio
> calls.
We have GPIO_OPEN_DRAIN in
include/dt-bindings/gpio/gpio.h
that can be added on the consumer side of the GPIO line
in the DT, it should work (just like GPIO_ACTIVE_LOW for example).
For descriptor tables
include/linux/gpio/machine.h
provides the same mechanism with the flag GPIO_OPEN_DRAIN
Notice that in both cases it is the consumer that specifies that it
needs the line to be set up as open drain, not the controller,
as it is a resource, the consumer needs to request what it needs.
So this can be done already today. Unless there is some bug.
Yours,
Linus Walleij
Powered by blists - more mailing lists