From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: Fabio Estevam <festevam@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
Sascha Hauer <kernel@pengutronix.de>,
Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] gpio: generic: clamp values from bgpio_get_set()
Date: Thu, 17 Dec 2015 15:49:30 +0200 [thread overview]
Message-ID: <5672BD6A.5020209@mentor.com> (raw)
In-Reply-To: <CAOMZO5DVNm9JK080RQ+OnhtBVyt+VYc5PmdYDUzRnJDBZ+3CEg@mail.gmail.com>
On 11.12.2015 23:47, Fabio Estevam wrote:
> Hi Linus,
>
> On Fri, Dec 11, 2015 at 7:36 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> The bgpio_get_set() call should return a value clamped to [0,1],
>> the current code will return a negative value if reading
>> bit 31, which turns the value negative as this is a signed value
>> and thus gets interpreted as an error by the gpiolib core.
>> Found on the gpio-mxc but applies to any MMIO driver.
>>
>> Fixes: b19e7f51a55f "gpio: gpio-generic: add flag to read out output value from reg_set"
>
> This commit appeared in 4.2, so it would be nice to add a stable tag:
>
> Cc: <stable@vger.kernel.org> # 4.2+
As it was discussed yesterday in another thread, the specified commit is
correct, and v4.2 works good.
The problem is in commit e20538b82f1f ("gpio: Propagate errors from
chip->get()"), which is present in v4.3.
So, Fixes: tag should be removed or corrected IMHO.
--
With best wishes,
Vladimir
next prev parent reply other threads:[~2015-12-17 13:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 21:36 [PATCH] gpio: generic: clamp values from bgpio_get_set() Linus Walleij
2015-12-11 21:47 ` Fabio Estevam
2015-12-11 22:10 ` Linus Walleij
2015-12-11 22:23 ` Fabio Estevam
2015-12-15 8:37 ` Linus Walleij
2015-12-15 17:00 ` Greg KH
2015-12-17 8:22 ` Linus Walleij
2015-12-17 13:49 ` Vladimir Zapolskiy [this message]
2015-12-17 14:49 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5672BD6A.5020209@mentor.com \
--to=vladimir_zapolskiy@mentor.com \
--cc=acourbot@nvidia.com \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.