[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120207114341.GJ3332@opensource.wolfsonmicro.com>
Date: Tue, 7 Feb 2012 11:43:41 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Laxman Dewangan <ldewangan@...dia.com>, grant@...retlab.ca
Cc: lrg@...com, linux-kernel@...r.kernel.org,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH V1] regulator: fixed: Support for open-drain gpio
On Tue, Feb 07, 2012 at 04:16:36PM +0530, Laxman Dewangan wrote:
> To make the pin to high/low for enabling/disabling the switches,
> the pins will have the pull-up connected and the high/low can be
> set using following methods:
> LOW: gpio_direction_output(gpio, 0) ... this drives the signal
> and overrides the pullup.
> HIGH: gpio_direction_input(gpio) ... this turns off the output,
> so the pullup (or some other device) controls the signal.
Thinking about this further this is potentially going to apply to any
GPIO output - perhaps we should push the implementation down into
gpiolib so we just specify a flag when requesting the GPIO and then
gpiolib does the pull low/high Z thing for us. That would be much less
effort in individual drivers, we'd just need to be able to set the flag
and could potentially directly use any hardware open drain output
support (some GPIO controllers will do all this in hardware) if the
driver API were extended. Grant, does that sound reasonable?
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists