Skip to content

kernel: Smart Cover wake on the iPad 5, and the Smart Cover on the iPad 6 - #118

Merged
henrikklee merged 2 commits into
OrchardLinux:mainfrom
brkosebay:j71t/cover-wake
Nov 12, 2026
Merged

henrikklee merged 2 commits into
OrchardLinux:mainfrom
brkosebay:j71t/cover-wake

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

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

  • Hardware: iPad 5 Wi-Fi (J71t). Hands-on testing on 2026-11-11 with an integrated build of this series, made before the final failure-path fixes, covered suspend admission without a cover attached.
  • Not covered on hardware: waking from sleep by opening the cover.
  • 2026-11-12: no further hardware test of this change beyond the above. The top of this series applies to the same kernel tree as the release build tested on J71t that day (20+ warm restarts without a freeze).
  • Host: the Linux test suite passes at this branch's head, and the kernel and m1n1 patch series apply on apple-16k and apple-4k. At the top of the series the applied kernel tree is identical to the one in the built release image.
  • Other boards that share these drivers or compatibles have not been tested.

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

brkosebay and others added 2 commits November 13, 2026 04:45
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 henrikklee changed the title j71t: Wake from sleep on the Smart Cover kernel: Smart Cover wake on the iPad 5, and the Smart Cover on the iPad 6 Nov 12, 2026
@henrikklee

Copy link
Copy Markdown
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 contrib/brkosebay-j71t-cover-wake. Please check on the next nightly that opening the cover wakes the J71t.

@henrikklee
henrikklee merged commit cc90497 into OrchardLinux:main Nov 12, 2026
1 of 3 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants