Re: [PATCH] Input: gpio_keys_polled - keep button data constant

From: Geert Uytterhoeven
Date: Fri Feb 26 2016 - 15:34:21 EST


Hi Dmitry,

On Fri, Feb 26, 2016 at 7:50 PM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> Commit 633a21d80b4a ("input: gpio_keys_polled: Add support for GPIO
> descriptors") placed gpio descriptor into gpio_keys_button structure, which
> is supposed to be part of platform data and not modifiable by the driver.
> To keep the data constant, let's move the descriptor to
> gpio_keys_button_data structure instead.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> ---
>
> Compiled only, I do not have devices with polled keys...

If you're on DT, just change "gpio-keys" to "gpio-keys-polled", add
"poll-interval = <20>;", and everything should work fine.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds