aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2021-08-05 15:29:25 +0200
committerChristian Lamparter <chunkeey@gmail.com>2021-08-26 21:00:26 +0200
commit2b0378cf9f3163bac29fa9946b3aa1607fc03802 (patch)
treef6475e23a39c339896b00316fe07081f902e1350 /target
parentd98738b5c118fc45068b45f07b8b6938e91f35d2 (diff)
downloadupstream-2b0378cf9f3163bac29fa9946b3aa1607fc03802.tar.gz
upstream-2b0378cf9f3163bac29fa9946b3aa1607fc03802.tar.bz2
upstream-2b0378cf9f3163bac29fa9946b3aa1607fc03802.zip
gpio-button-hotplug: convert to gpio descriptor (gpiod_) API
OpenWrt's special gpio-button-hotplug driver is still using exclusively the legacy GPIO Subsystem gpio_ API. While it still does work fine for most devices, upstream linux is starting to convert platform support like that of the APU2/3/4 to the new GPIOD LOOKUP tables that are not supported by it. Hence, this patch replaces the gpio_ calls present in gpio-button-hotplug with gpiod_ equivalent wherever it's possible. This allows the driver to use the gpiod lookup tables and still have a fallback for legacy platform data code that just sets button->gpio set to the real button/switch GPIO. As a bonus: the active_low logic is now being handled by the linux's gpio subsystem too. Another issue that was address is the of_handle leak in the dt parser error path. Tested with legacy platform data: x86_64: APU2, MX-100 Tested on OF: ATH79; MR18, APM821xx: Netgear WNDR4700, RAMIPS: WL-330N3G LANTIQ: AVM FritzBox 7360v1 Reported-by: Chris Blake <chrisrblake93@gmail.com> Tested-by: Chris Blake <chrisrblake93@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target')
0 files changed, 0 insertions, 0 deletions