All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: gpiolib: sysfs: high can be any nonzero value
@ 2015-04-22 16:39 Dirk Behme
  2015-04-22 17:10 ` Johan Hovold
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2015-04-22 16:39 UTC (permalink / raw)
  To: linux-gpio; +Cc: Linus Walleij, Alexandre Courbot, Dirk Behme

With the commit 79a9becda8940d ("gpiolib: export descriptor-based
GPIO interface") the gpiolib can return any nonzero value for high.
Not only 1. Correct this in the documentation.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
---

Note: Commit 79a9becda8940d has been merged in v3.13. If this
      patch is considered to be fine, please think about applying
      it to -stable >= v3.14, too.

 Documentation/gpio/sysfs.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/gpio/sysfs.txt b/Documentation/gpio/sysfs.txt
index c2c3a97..bc7f31d 100644
--- a/Documentation/gpio/sysfs.txt
+++ b/Documentation/gpio/sysfs.txt
@@ -69,7 +69,7 @@ and have the following read/write attributes:
 		it was exported by kernel code that didn't explicitly
 		allow userspace to reconfigure this GPIO's direction.
 
-	"value" ... reads as either 0 (low) or 1 (high). If the GPIO
+	"value" ... reads as either 0 (low) or nonzero (high). If the GPIO
 		is configured as an output, this value may be written;
 		any nonzero value is treated as high.
 
-- 
2.3.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation: gpiolib: sysfs: high can be any nonzero value
  2015-04-22 16:39 [PATCH] Documentation: gpiolib: sysfs: high can be any nonzero value Dirk Behme
@ 2015-04-22 17:10 ` Johan Hovold
  2015-04-22 21:12   ` Vladimir Zapolskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2015-04-22 17:10 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-gpio, Linus Walleij, Alexandre Courbot

On Wed, Apr 22, 2015 at 06:39:46PM +0200, Dirk Behme wrote:
> With the commit 79a9becda8940d ("gpiolib: export descriptor-based
> GPIO interface") the gpiolib can return any nonzero value for high.
> Not only 1. Correct this in the documentation.

As _gpiod_get_raw_value returns a bool, I fail to see how that could
happen.

Ah, that was fixed by commit 23600969ff13 ("gpio: clamp returned values
to the boolean range") in 3.15.

Looks like that one should be backported to 3.14 instead.

Thanks,
Johan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation: gpiolib: sysfs: high can be any nonzero value
  2015-04-22 17:10 ` Johan Hovold
@ 2015-04-22 21:12   ` Vladimir Zapolskiy
  2015-05-02 16:36     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Zapolskiy @ 2015-04-22 21:12 UTC (permalink / raw)
  To: Johan Hovold, Dirk Behme, Greg Kroah-Hartman
  Cc: linux-gpio, Linus Walleij, Alexandre Courbot

Hi Greg,

On 22.04.2015 20:10, Johan Hovold wrote:
> On Wed, Apr 22, 2015 at 06:39:46PM +0200, Dirk Behme wrote:
>> With the commit 79a9becda8940d ("gpiolib: export descriptor-based
>> GPIO interface") the gpiolib can return any nonzero value for high.
>> Not only 1. Correct this in the documentation.
> 
> As _gpiod_get_raw_value returns a bool, I fail to see how that could
> happen.
> 
> Ah, that was fixed by commit 23600969ff13 ("gpio: clamp returned values
> to the boolean range") in 3.15.
> 
> Looks like that one should be backported to 3.14 instead.
> 

I tested that 23600969ff13 clearly applies to 3.14.y and I confirm that
it fixes the problem.

Would it be possible for you to backport this commit to LTS 3.14.y,
since it fixes quite critical sysfs API regression? Or should I send the
patch to stable@vger.kernel.org ?

Thank you in advance!

--
With best wishes,
Vladimir

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation: gpiolib: sysfs: high can be any nonzero value
  2015-04-22 21:12   ` Vladimir Zapolskiy
@ 2015-05-02 16:36     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2015-05-02 16:36 UTC (permalink / raw)
  To: Vladimir Zapolskiy
  Cc: Johan Hovold, Dirk Behme, linux-gpio, Linus Walleij, Alexandre Courbot

On Thu, Apr 23, 2015 at 12:12:46AM +0300, Vladimir Zapolskiy wrote:
> Hi Greg,
> 
> On 22.04.2015 20:10, Johan Hovold wrote:
> > On Wed, Apr 22, 2015 at 06:39:46PM +0200, Dirk Behme wrote:
> >> With the commit 79a9becda8940d ("gpiolib: export descriptor-based
> >> GPIO interface") the gpiolib can return any nonzero value for high.
> >> Not only 1. Correct this in the documentation.
> > 
> > As _gpiod_get_raw_value returns a bool, I fail to see how that could
> > happen.
> > 
> > Ah, that was fixed by commit 23600969ff13 ("gpio: clamp returned values
> > to the boolean range") in 3.15.
> > 
> > Looks like that one should be backported to 3.14 instead.
> > 
> 
> I tested that 23600969ff13 clearly applies to 3.14.y and I confirm that
> it fixes the problem.
> 
> Would it be possible for you to backport this commit to LTS 3.14.y,
> since it fixes quite critical sysfs API regression? Or should I send the
> patch to stable@vger.kernel.org ?

Normally always send this type of thing to stable@vger, but I've now
picked it up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-02 16:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-22 16:39 [PATCH] Documentation: gpiolib: sysfs: high can be any nonzero value Dirk Behme
2015-04-22 17:10 ` Johan Hovold
2015-04-22 21:12   ` Vladimir Zapolskiy
2015-05-02 16:36     ` Greg Kroah-Hartman

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.