Repository navigation
kernel: Smart Cover wake on the iPad 5, and the Smart Cover on the iPad 6 - #118
Merged
Merged
Conversation
The Smart Cover hall sensors (PMIC GPIO 0 and 10) cannot be interrupt consumers while awake: unmasked, every change of the magnet field holds the PMU line. The D2365 driver now takes a list of wake-only events, keeps them masked while awake and arms them only for a sleep, so opening the cover wakes the iPad. A failed write of the sleep mask now refuses the suspend instead of sleeping with the wrong events armed. From orchard PR OrchardLinux#118 (commit e8b5e4b) and the D2365 part of PR OrchardLinux#117 (commit 40a8b18), folded into one driver patch without the diagnostic logging; the device tree part moved from the J71t board file to the shared iPad 5 file, so all four iPad 5 models get it. Boards without apple,wake-events behave as before.
Apple's device trees put the iPad 6 cover sensors on the same PMIC lines as the iPad 5 (GPIO 0 "halleffect", GPIO 10 "halleffect1", same flags), so the iPad 6 gets the iPad 5 description: two cover switches and wake from sleep when the cover opens.
henrikklee
force-pushed
the
j71t/cover-wake
branch
from
November 12, 2026 21:01
e8b5e4b to
2d5a9ab
Compare
Contributor
|
Landing this as your commit. Your D2365 sleep-mask fix from #117 is folded into the driver patch, the per-boot and per-sleep diagnostic logging is left out, and the wake events moved from the J71t board file to the shared iPad 5 file so every iPad 5 model gets them. On top, a second commit gives the iPad 6 the same Smart Cover description: Apple's device tree puts its hall sensors on the same PMIC lines, and on a J71b both lines read 0 with the cover closed and 1 open, so the active-low assumption is now measured. Your previous head is kept as tag |
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in drivers/usb are renumbered to follow main's.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, drivers/base and drivers/usb are renumbered to follow main's.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, drivers/base and drivers/usb are renumbered to follow main's.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, drivers/base, drivers/pmdomain and drivers/usb are renumbered to follow main's.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, drivers/base, drivers/pmdomain and drivers/usb are renumbered to follow main's.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, devices/t8010, drivers/base, drivers/media, drivers/pmdomain, drivers/power and drivers/usb are renumbered to follow main's. Main's versions apply first now, so 0011 in drivers/media keep their change with a diff regenerated for the new context.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, devices/s8003, devices/t8010, drivers/base, drivers/media, drivers/pmdomain, drivers/power and drivers/usb are renumbered to follow main's. Main's versions apply first now, so 0011 in drivers/media keep their change with a diff regenerated for the new context.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, devices/s8003, devices/t8010, drivers/base, drivers/media, drivers/pmdomain, drivers/power and drivers/usb are renumbered to follow main's. Main's versions apply first now, so 0011 in drivers/media keep their change with a diff regenerated for the new context.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, devices/s8003, devices/t8010, drivers/base, drivers/media, drivers/pmdomain, drivers/power, drivers/soc-apple and drivers/usb are renumbered to follow main's. Main's versions apply first now, so 0011 in drivers/media keep their change with a diff regenerated for the new context.
brkosebay
added a commit
to brkosebay/hardware
that referenced
this pull request
Nov 13, 2026
Bring this branch onto current main. Main has since merged OrchardLinux#124, OrchardLinux#122, OrchardLinux#118, OrchardLinux#121, OrchardLinux#110, OrchardLinux#127, OrchardLinux#101, OrchardLinux#126, OrchardLinux#108 and OrchardLinux#111, several in part or reworked, and OrchardLinux#123 and OrchardLinux#128 were closed. Where main carries a topic, main's version is kept; the left-out parts that warm restart and suspend need come back in OrchardLinux#107 and OrchardLinux#117. This branch's own patches in devices/s8000, devices/s8003, devices/t8010, drivers/base, drivers/media, drivers/pmdomain, drivers/power, drivers/soc-apple and drivers/usb are renumbered to follow main's. Main's versions apply first now, so 0011 in drivers/media keep their change with a diff regenerated for the new context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 11 of 23 of the iPad 5 (J71t) series in this repository; merge after #117.
Problem
Opening the Smart Cover should wake the iPad, but the PMIC GPIO driver had no notion of wake-only events, and arming the cover events while the cover was absent aborted every suspend.
Change
Describe wake-only events in the apple,d2365-pmic-gpio binding, let the driver wake from sleep on the listed GPIO events, and list the Smart Cover events in the J71t DT.
Testing
Dependencies
Depends on #117.
This branch is stacked on the PRs it depends on and carries their commits; the change of this PR is its last commit, "j71t: Wake from sleep on the Smart Cover".
🤖 Generated with Claude Code