From e679b00d0a380e2a74512d45e450418b45e32c47 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Tue, 12 Jul 2022 20:45:00 +0200 Subject: [PATCH] Kobo: Autodetect the Elan input device on both i2c buses (#9322) Hadn't noticed that the new Libra 2 has it on a different bus than the Sage/Elipsa. (Harmless because we kept the Sage & Elipsa hardcoded). c.f., https://www.mobileread.com/forums/showpost.php?p=4238067&postcount=869, thanks to @baskerville for the poke ;). --- frontend/device/kobo/device.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/device/kobo/device.lua b/frontend/device/kobo/device.lua index bd4c82ece..c46d82354 100644 --- a/frontend/device/kobo/device.lua +++ b/frontend/device/kobo/device.lua @@ -549,8 +549,11 @@ function Kobo:init() -- Input if util.fileExists("/dev/input/by-path/platform-1-0010-event") then - -- Elan (HWConfig TouchCtrl is ekth6) + -- Elan (HWConfig TouchCtrl is ekth6) on i2c bus 1 self.touch_dev = "/dev/input/by-path/platform-1-0010-event" + elseif util.fileExists("/dev/input/by-path/platform-0-0010-event") then + -- Elan (HWConfig TouchCtrl is ekth6) on i2c bus 0 + self.touch_dev = "/dev/input/by-path/platform-0-0010-event" else self.touch_dev = "/dev/input/event1" end