[meta-freescale] [PATCH] kernel 3.14.28/gpiolib: Return GPIO logical value, not true value

Gary Thomas gary at mlbassoc.com
Wed May 20 09:40:28 PDT 2015


On 2015-05-20 10:34, Otavio Salvador wrote:
> On Wed, May 20, 2015 at 12:54 PM, Gary Thomas <gary at mlbassoc.com> wrote:
>> Previous versions of the kernel returned the logical value of
>> GPIO signals (i.e. 0 or 1).  This patch restores this behavior.
>>
>> Signed-off-by: Gary Thomas <gary at mlbassoc.com>
>
> I am not sure this is a correct fix. I tried to find out the commit
> which changed the behaviour without success.
>
> Fabio, is it possible for you to check how mainline is behaving? and
> more important does it need any fix?
>

If by mainline you mean 4.1+, the code is very different and looks much
more like the 3.10 version than the FSL 3.14.

My change simply matches the behaviour (and indeed uses the same construct)
as the 3.10 kernel.

Also, as long as I can recall, reading a GPIO pin has returned 0/1,
except for a small period during 2.6 where it was broken and quickly
repaired.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


More information about the meta-freescale mailing list