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

Eric Bénard eric at eukrea.com
Wed May 20 09:57:18 PDT 2015


Le Wed, 20 May 2015 10:51:55 -0600,
Gary Thomas <gary at mlbassoc.com> a écrit :

> On 2015-05-20 10:49, Eric Bénard wrote:
> > Le Wed, 20 May 2015 13:34:24 -0300,
> > Otavio Salvador <otavio at ossystems.com.br> a écrit :
> >
> >> 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?
> >>
> > fixed mainline by :
> > 25b35da gpio: generic: clamp retured value to [0,1]
> > which is not in 3.4.28
> 
> True enough, but this patch won't apply to 3.14.28 as the
> code is very different.
> 
I think it should apply easily, as gpio-generic.c is very similar
between 3.14.28 and mainline :

3.14.28
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/gpio/gpio-generic.c?h=linux-3.14.y&id=v3.14.28#n142

commit 25b35da : 
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/gpio/gpio-generic.c?id=25b35da7f4cce82271859f1b6eabd9f3bd41a2bb

Eric


More information about the meta-freescale mailing list