Remarkable: support the mainline touchscreen (#10585)

reviewable/pr10648/r1
Alistair Francis 10 months ago committed by GitHub
parent a4720b44cd
commit fc89b1affa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,13 +143,6 @@ function Remarkable:init()
wacom_protocol = true,
}
self.input.open(self.input_wacom) -- Wacom
self.input.open(self.input_ts) -- Touchscreen
self.input.open(self.input_buttons) -- Buttons
local scalex = screen_width / self.mt_width
local scaley = screen_height / self.mt_height
-- Assume input stuff is saner on mainline kernels...
-- (c.f., https://github.com/koreader/koreader/issues/10012)
local is_mainline = false
@ -164,6 +157,20 @@ function Remarkable:init()
is_mainline = true
end
end
if is_mainline then
self.input_wacom = "/dev/input/by-path/platform-30a20000.i2c-event-mouse"
self.input_buttons = "/dev/input/by-path/platform-30370000.snvs:snvs-powerkey-event"
self.input_ts = "/dev/input/touchscreen0"
end
self.input.open(self.input_wacom) -- Wacom
self.input.open(self.input_ts) -- Touchscreen
self.input.open(self.input_buttons) -- Buttons
local scalex = screen_width / self.mt_width
local scaley = screen_height / self.mt_height
if is_mainline then
-- NOTE: The panel sends *both* ABS_MT_ & ABS_ coordinates, while the pen only sends ABS_ coordinates.
-- Since we have to apply *different* mangling to each of them,

Loading…
Cancel
Save