Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1206803
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] input: gpio_keys: Don't report events on gpio failure |
| Date | 2015-08-13 15:10 +0200 |
| Message-ID | <pX0qD-4bE-33@gated-at.bofh.it> (permalink) |
| References | <pR2ls-36Q-11@gated-at.bofh.it> <pRkil-47H-3@gated-at.bofh.it> <pW43g-3br-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Aug 11, 2015 at 12:41 AM, Bjorn Andersson <bjorn.andersson@sonymobile.com> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] input: gpio_keys: Don't report events on gpio failure Bjorn Andersson <bjorn.andersson@sonymobile.com> - 2015-08-11 00:50 +0200
Re: [PATCH] input: gpio_keys: Don't report events on gpio failure Linus Walleij <linus.walleij@linaro.org> - 2015-08-13 15:10 +0200
Re: [PATCH] input: gpio_keys: Don't report events on gpio failure Alexandre Courbot <gnurou@gmail.com> - 2015-08-17 09:10 +0200
Re: [PATCH] input: gpio_keys: Don't report events on gpio failure Bjorn Andersson <bjorn.andersson@sonymobile.com> - 2015-08-17 21:40 +0200
csiph-web