[PATCHv4] video: backlight: gpio-backlight: Add DT support.

Thierry Reding thierry.reding at gmail.com
Wed Oct 23 16:08:09 EDT 2013


On Wed, Oct 23, 2013 at 05:49:06PM +0100, Stephen Warren wrote:
> On 10/23/2013 02:42 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> ...
> > For me gpio_get_value can return the value of a an output gpio but this need
> > to be checked with LinusW
> 
> That's certainly not true for all possible GPIO controllers; there are
> at least some that can't read either:
> 
> * The value of the physical wire, if the GPIO is configured as an output.
> 
> * The value that the GPIO controller is driving as an output.

My point originally was that since it's an output pin, you need to
configure it as an output before you can use it. The way to do that in
Linux is to call gpio_direction_output(). But that will automatically
also force the output value to whatever you specify as the second
parameter.

I suppose that could be remedied by adding a separate function that
doesn't set the value, but as Stephen points out, reading the value of
an output pin may not be supported on all hardware.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131023/87631e74/attachment.sig>


More information about the linux-arm-kernel mailing list