Skip to content

Support Kindle Oasis (KOA) charging cover "soda"#13133

Merged
Frenzie merged 2 commits into
koreader:masterfrom
snajczuk:koa-charging-cover
Jul 14, 2025
Merged

Support Kindle Oasis (KOA) charging cover "soda"#13133
Frenzie merged 2 commits into
koreader:masterfrom
snajczuk:koa-charging-cover

Conversation

@snajczuk

@snajczuk snajczuk commented Jan 25, 2025

Copy link
Copy Markdown
Contributor

Adds support for the Kindle Oasis (KOA) charging cover, codename "soda".

Much of this code was taken from the Kobo implementation of an auxiliary battery. The biggest difference between the Kobo and Kindle implementation is that the status file for the charging cover is not present when the cover is detached, so the check for status there will result in the file failing to read.

Tested on two Kindles running koreader 2024.11.

IMG_2332


This change is Reviewable

end

self.isAuxBatteryConnectedHW = function(this)
local status = this:read_str_file(self.aux_batt_status_file)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean there's nothing relevant in /sys/devices/platform/soda/power_supply? On Kobo it's a separate one named conn or some such.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, cilix_conn, FWIW.

@Frenzie Frenzie added the Kobo label Jan 25, 2025
NiLuJe
NiLuJe previously requested changes Jan 25, 2025

@NiLuJe NiLuJe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides that very minor comment nit, LGTM, thanks!

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Frenzie and @snajczuk)


frontend/device/kindle/device.lua line 1325 at r1 (raw file):

        device = self,
        fl_intensity_file = "/sys/class/backlight/max77696-bl/brightness",
        -- NOTE: Points to the embedded battery. The one in the cover is codenamed "soda".

nit: That comment could be rejiggered now that there actually is soda support ;).

end

self.isAuxBatteryConnectedHW = function(this)
local status = this:read_str_file(self.aux_batt_status_file)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, cilix_conn, FWIW.

@Frenzie Frenzie added this to the 2025.01 milestone Jan 25, 2025
@Frenzie Frenzie added Kindle and removed Kobo labels Jan 25, 2025
@Frenzie Frenzie modified the milestones: 2025.03, 2025.05 Apr 9, 2025
Comment thread frontend/device/kindle/device.lua Outdated
device = self,
fl_intensity_file = "/sys/class/backlight/max77696-bl/brightness",
-- NOTE: Points to the embedded battery. The one in the cover is codenamed "soda".
-- NOTE: Points to the embedded battery. The one in the cover is codenamed "soda", see aux_batt_capacity_file below.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NiLuJe Is this roughly what you had in mind?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup!

@Frenzie Frenzie merged commit 9ad9d52 into koreader:master Jul 14, 2025
2 of 3 checks passed
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Much of this code was taken from the Kobo implementation of an auxiliary battery. The biggest difference between the Kobo and Kindle implementation is that the status file for the charging cover is not present when the cover is detached, so the check for status there will result in the file failing to read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants