diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2019-05-19 16:06:34 +0200 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2019-05-31 10:30:03 +0200 |
commit | afc056d7dc833bbd714386007db1bfcf48188954 (patch) | |
tree | dd5f1a5a0bcd5817a36f4fd6edea2cdf957a11d8 /package/libs | |
parent | 678ee30ee4c2a7d727d1b8a055faa5d274dd73ec (diff) | |
download | upstream-afc056d7dc833bbd714386007db1bfcf48188954.tar.gz upstream-afc056d7dc833bbd714386007db1bfcf48188954.tar.bz2 upstream-afc056d7dc833bbd714386007db1bfcf48188954.zip |
gpio-button-hotplug: support interrupt properties
Upstream Linux's input gpio-keys driver supports
specifying a external interrupt for a gpio via the
'interrupts' properties as well as having support
for software debounce.
This patch ports these features to OpenWrt's event
version. Only the "pure" interrupt-driven support is
left behind, since this goes a bit against the "gpio"
in the "gpio-keys" and I don't have a real device to
test this with.
This patch also silences the generated warnings showing
up since 4.14 due to the 'constification' of the
struct gpio_keys_button *buttons variable in the
upstream struct gpio_keys_platform_data declaration.
gpio-button-hotplug.c: In function 'gpio_keys_get_devtree_pdata':
gpio-button-hotplug.c:392:10: warning: assignment discards 'const'
qualifier from pointer target type [-Wdiscarded-qualifiers]
button = &pdata->buttons[i++];
^
gpio-button-hotplug.c: In function 'gpio_keys_button_probe':
gpio-button-hotplug.c:537:12: warning: assignment discards 'const'
qualifier from pointer target type [-Wdiscarded-qualifiers]
bdata->b = &pdata->buttons[i];
^
gpio-button-hotplug.c: In function 'gpio_keys_probe':
gpio-button-hotplug.c:563:37: warning: initialization discards 'const'
qualifier from pointer target type [-Wdiscarded-qualifiers]
struct gpio_keys_button *button = &pdata->buttons[i];
^
Acked-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'package/libs')
0 files changed, 0 insertions, 0 deletions