Initial support for the Kobo Libra 2 (#8367)

* Initial support for the Kobo Libra 2

* It's the same touch panel as the Elipsa & Sage.
* Plug in proper nightmode waveforms on mxcfb.

* Bump base

https://github.com/koreader/koreader-base/pull/1423
reviewable/pr8372/r1
NiLuJe 3 years ago committed by GitHub
parent 501a6204f8
commit e17b136d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit cf317f2fc59341a05811865e729b5d1523e25c6f Subproject commit 5c8fa477f8abca437950420e08efa3d2ef0da1bf

@ -73,6 +73,8 @@ local Kobo = Generic:new{
pressure_event = nil, pressure_event = nil,
-- Device features multiple CPU cores -- Device features multiple CPU cores
isSMP = no, isSMP = no,
-- Device supports "eclipse" waveform modes (i.e., optimized for nightmode).
hasEclipseWfm = no,
} }
--- @todo hasKeys for some devices? --- @todo hasKeys for some devices?
@ -312,6 +314,7 @@ local KoboLuna = Kobo:new{
local KoboEuropa = Kobo:new{ local KoboEuropa = Kobo:new{
model = "Kobo_europa", model = "Kobo_europa",
isSunxi = yes, isSunxi = yes,
hasEclipseWfm = yes,
canToggleChargingLED = yes, canToggleChargingLED = yes,
hasFrontlight = yes, hasFrontlight = yes,
hasGSensor = yes, hasGSensor = yes,
@ -330,6 +333,7 @@ local KoboEuropa = Kobo:new{
local KoboCadmus = Kobo:new{ local KoboCadmus = Kobo:new{
model = "Kobo_cadmus", model = "Kobo_cadmus",
isSunxi = yes, isSunxi = yes,
hasEclipseWfm = yes,
canToggleChargingLED = yes, canToggleChargingLED = yes,
hasFrontlight = yes, hasFrontlight = yes,
hasKeys = yes, hasKeys = yes,
@ -355,6 +359,32 @@ local KoboCadmus = Kobo:new{
isSMP = yes, isSMP = yes,
} }
-- Kobo Libra 2:
local KoboIo = Kobo:new{
model = "Kobo_io",
isMk7 = yes,
hasEclipseWfm = yes,
canToggleChargingLED = yes,
hasFrontlight = yes,
hasKeys = yes,
hasGSensor = yes,
canToggleGSensor = yes,
pressure_event = C.ABS_MT_PRESSURE,
touch_mirrored_x = false,
misc_ntx_gsensor_protocol = true,
display_dpi = 300,
hasNaturalLight = yes,
frontlight_settings = {
frontlight_white = "/sys/class/backlight/mxc_msp430.0/brightness",
frontlight_mixer = "/sys/class/backlight/lm3630a_led/color",
-- Warmth goes from 0 to 10 on the device's side (our own internal scale is still normalized to [0...100])
-- NOTE: Those three extra keys are *MANDATORY* if frontlight_mixer is set!
nl_min = 0,
nl_max = 10,
nl_inverted = true,
},
}
function Kobo:init() function Kobo:init()
-- Check if we need to disable MXCFB_WAIT_FOR_UPDATE_COMPLETE ioctls... -- Check if we need to disable MXCFB_WAIT_FOR_UPDATE_COMPLETE ioctls...
local mxcfb_bypass_wait_for local mxcfb_bypass_wait_for
@ -1036,6 +1066,8 @@ elseif codename == "europa" then
return KoboEuropa return KoboEuropa
elseif codename == "cadmus" then elseif codename == "cadmus" then
return KoboCadmus return KoboCadmus
elseif codename == "io" then
return KoboIo
else else
error("unrecognized Kobo model "..codename) error("unrecognized Kobo model "..codename)
end end

Loading…
Cancel
Save