Ticket #1319 (closed defect: wontfix)

Opened 5 years ago

Last modified 4 years ago

sysfs RTC class device missing wakealarm capability

Reported by: mickey@… Owned by: openmoko-kernel
Priority: high Milestone:
Component: kernel Version: unspecified
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible:

Description

Our RTF can wake us up from suspend. Unfortunately, we don't enable this feature
in the RTC sys class interface hence the 'wakealarm' attribute is missing.

The corresponding code in RTC class is:

else if (rtc_does_wakealarm(class_dev)) {

/* not all RTCs support both alarms and wakeup */
err = class_device_create_file(class_dev,

Can we please add that?

Change History

comment:1 Changed 5 years ago by zecke@…

Sure.

comment:2 Changed 5 years ago by werner@…

BTW, I poked around a bit. The easiest approach is probably to copy the
hack from rtc-at91rm9200.c:at91_rtc_probe and call device_init_wakeup
directly.

There's also a call to it in i2c-core.c:i2c_new_device (triggered by
I2C_CLIENT_WAKE in struct i2c_board_info.flags), but that seems to be
intended for other purposes.

comment:3 Changed 5 years ago by zecke@…

I had a look as well and I think it is evil. In our case the RTC device is our
PMU which has a lot of wakeup sources (usb insert, remove, battery, power
button). You do not want to disable wakeup for the power button from userspace.

To make this somewhat sane (e.g. to only apply to the alarm), we will need to
add another (platform_)device for the rtc and make sure masking the alarm
interrupt is not undone by the suspend code of the pcf routine... or do other
evil things...

comment:4 Changed 5 years ago by roh

  • Owner changed from openmoko-kernel@… to openmoko-kernel

comment:5 Changed 5 years ago by john_lee

  • HasPatchForReview unset

wow 7 months old. any update?

comment:6 Changed 4 years ago by mickey

  • Status changed from new to closed
  • Resolution set to wontfix

Since the ioctl interface works, I no longer care whether we have the sysfs wakealarm interface available or not. Closing as WONTFIX.

Note: See TracTickets for help on using tickets.