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

Otavio Salvador otavio at ossystems.com.br
Wed May 20 09:42:54 PDT 2015


On Wed, May 20, 2015 at 1:40 PM, Gary Thomas <gary at mlbassoc.com> wrote:
> 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.

If there is a patch which fixes this upstream I would prefer to
cherry-pick this one.

Do you know which change has restored the behaviour?

-- 
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 meta-freescale mailing list