[U-Boot] [PATCH] gpio: mxc_gpio: Fix gpio_get_value() when the GPIO is an output
Otavio Salvador
otavio at ossystems.com.br
Sun Sep 29 21:49:48 CEST 2013
On Sun, Sep 29, 2013 at 4:45 PM, Benoît Thébaudeau
<benoit.thebaudeau at advansee.com> wrote:
> On Sunday, September 29, 2013 9:42:44 PM, Otavio Salvador wrote:
>> On Sun, Sep 29, 2013 at 4:25 PM, Benoît Thébaudeau
>> <benoit.thebaudeau at advansee.com> wrote:
>> ...
>> > Hence, gpio_get_value() should be left unchanged (using PSR in all cases),
>> > and
>> > SION should be set for all GPIOs in the i.MX6 pin definition header files.
>>
>> I just does not follow why this preferred against Fabio's proposed
>> patch to read from DR?
>
> Because in case of a level conflict between the GPIO output and some other
> hardware on the board, one would expect gpio_get_value() to return the actual
> pin level, and not the level that the GPIO output tries (but possibly fails) to
> apply on this pin.
Ahh now I see. I agree :-)
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
More information about the U-Boot
mailing list