diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2022-03-24 17:05:56 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2022-04-12 16:48:14 -0500 |
commit | 771c9199b66d0eadc7587cf61f00256df49188d2 (patch) | |
tree | 6e4ca812d27d5b35aa07eb380bd7b7e9bc46c440 /io-module/buttons.c | |
parent | 5e681baa71e96d1ae1de317c4ee74dfdc9b72b1c (diff) | |
download | mts-io-771c9199b66d0eadc7587cf61f00256df49188d2.tar.gz mts-io-771c9199b66d0eadc7587cf61f00256df49188d2.tar.bz2 mts-io-771c9199b66d0eadc7587cf61f00256df49188d2.zip |
Update mts-io to use gpiod for MTCAP34.9.4
Diffstat (limited to 'io-module/buttons.c')
-rw-r--r-- | io-module/buttons.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/io-module/buttons.c b/io-module/buttons.c index 07ac635..2598c2e 100644 --- a/io-module/buttons.c +++ b/io-module/buttons.c @@ -177,7 +177,11 @@ static void button_worker(struct work_struct *ignored) pin = gpio_pin_by_button_name(pbutton[0]->name); if (pin) { - button_pressed = !gpio_get_value(pin->pin.gpio); + if (pin->do_gpio_desc) { + button_pressed = !gpiod_get_value(pin->desc); + } else { + button_pressed = !gpio_get_value(pin->pin.gpio); + } } if (pbutton[0]->pid > 0) { |