Thread (11 messages) 11 messages, 4 authors, 2015-10-02

Re: [PATCH] input: gpio_keys: Don't report events on gpio failure

From: Linus Walleij <hidden>
Date: 2015-08-13 13:06:59
Also in: linux-gpio, lkml

On Tue, Aug 11, 2015 at 12:41 AM, Bjorn Andersson
[off-list ref] wrote:
But then the question first goes to Linus & co.

gpio_chip->get() can return a negative value to indicate errors (and did
so in this case), all parts of the API seems indicates that we can get
an error (int vs bool).
Ooops.
Should we change _gpiod_get_raw_value() to propagate this error?
Yes for now. Can you patch it? :)
 Or
should we just ignore this issue and propagate an error as GPIO high
reading?
I don't know about the future. In some sense GPIOs are so smallish
resources that errorhandling every call to read/write them seem to
be a royal PITA. That is why I wanted to switch them to bool and get
rid of the problem, but now I also see that maybe that was not such a
smart idea, if errors do occur on the set/get_value path.

Alexandre?

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help