Ticket #80 (closed defect: fixed)
wakeup reason not in /proc/cmdline
| Reported by: | laforge@… | Owned by: | openmoko-kernel@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | kernel | Version: | current svn head |
| Severity: | major | Keywords: | |
| Cc: | buglog@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | no | PatchReviewResult: | |
| Reproducible: |
Description
this helps us to understand whether we powered up due to charger plug in, RTC
alarm or actual power button press.
Change History
comment:5 Changed 6 years ago by laforge@…
- Status changed from new to assigned
The solution has now slightly changed. u-boot will just pass a kernel boot
argument "boot_reason=...".
comment:6 Changed 6 years ago by laforge@…
- Status changed from assigned to closed
- Resolution set to wontfix
- dependson set to 81
since this is now 100% implemented in u-boot, there's no need for any kernel
code changes
comment:7 Changed 5 years ago by mickey@…
- Status changed from closed to reopened
- Resolution wontfix deleted
- Summary changed from Add sysfs entry for PMU wakeup reason to wakeup reason not in /proc/cmdline
Reopening and changing description since this does not seem to work.
comment:8 Changed 5 years ago by mickey@…
- Owner changed from laforge@… to openmoko-kernel@…
- Status changed from reopened to new
Reassigning to default owner.
comment:10 Changed 5 years ago by andy@…
- Status changed from new to closed
- Resolution set to fixed
If you have a U-Boot with uboot-add-find-wake-reason.patch (in git for a week
now) and current git stable branch kernel,
$ cat /sys/devices/platform/neo1973-resume.0/resume_reason
gets you a resume reason list like this:
EINT00_ACCEL1
EINT01_GSM
EINT02_BLUETOOTH
EINT03_DEBUGBRD
EINT04_JACK
EINT05_WLAN
EINT06_AUXKEY
EINT07_HOLDKEY
EINT08_ACCEL2
- EINT09_PMU
adpins
adprem
usbins
usbrem
rtcalarm
second
onkeyr
onkeyf
exton1r
exton1f
exton2r
exton2f
exton3r
exton3f
- batfull chghalt thlimon thlimoff usblimon usblimoff adcrdy onkey1s lowsys lowbat hightmp autopwrfail dwn1pwrfail dwn2pwrfail ledpwrfail ledovp ldo1pwrfail ldo2pwrfail ldo3pwrfail ldo4pwrfail ldo5pwrfail ldo6pwrfail hcidopwrfail hcidoovl EINT10_NULL EINT11_NULL EINT12_GLAMO EINT13_NULL EINT14_NULL EINT15_NULL
This is suitable for userspace to parse with grep; if drivers are interested in
wake reason, the EINT_* stuff is available as a bitfield in kernelspace and the
PMU-specific reason is as available as a bitfield as soon as I2C and PMU resumes
and services its interrupt.
comment:12 Changed 5 years ago by mickey
- Status changed from closed to reopened
- Resolution fixed deleted
The subreason for * EINT09_PMU is no longer starred. Tried with waking up by button press as well as waking up by RTC. Tested kernel was http://downloads.openmoko.org/framework/milestone3/uImage-2.6.24+r5+gitr1+ca19d156400f817960efe0d14680324b2ea34171-r5-om-gta02.bin, U-Boot is fairly recent.
comment:13 Changed 4 years ago by andy
- HasPatchForReview unset
We split the CPU-side wakeup reason and the PMU internal wakeup reason a while back... is this currently working OK or it still has a problem?
comment:14 Changed 4 years ago by andy
- Status changed from reopened to closed
- Resolution set to fixed
I confirmed it's working fine
cat /sys/bus/platform/devices/neo1973-resume.0/resume_reason
cat /sys/class/i2c-adapter/i2c-0/0-0073/resume_reason
