lkml.org 
[lkml]   [2020]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Question] rtc wake behavior and sysfs
On 05/10/2020 09:13:08-0400, Peter Geis wrote:
> Good Morning,
>
> While testing suspend to ram on the Ouya, I encountered an interesting
> issue with the rtc-tps65910 driver.
> Attempting to use rtc-wake on the default configuration returned:
> rtcwake: /dev/rtc0 not enabled for wakeup events
> This is due to:
> eb5eba4ef722 drivers/rtc/rtc-tps65910.c: enable/disable wake in suspend/resume
> This commit changed this driver's behavior to not enable wakeup by
> default, but enables it when entering sleep mode.
> This seems to be odd behavior to me.
> Looking at a few other rtc drivers show they simply enable themselves
> as wakeup sources by default.
>
> I also found the sysfs entries are at /sys/devices/ ..
> /tps65910-rtc/power but are missing at /sys/class/rtc/rtc0/power/
>
> I have two questions.
> - Should the sysfs wakeup entries be missing at /sys/class/rtc/rtc0/power/ ?

I would be in /sys/class/rtc/rtc0/device/power

> - Shouldn't a rtc be enabled as a wakeup source by default?
>

The short answer is no, the reason being that not all RTCs are connected
to an IRQ or a pin that can wakeup or start the platform. What should be
done is enabling wakeup only when interrupts are available or the
wakeup-source property is in the rtc device tree node.

--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

\
 
 \ /
  Last update: 2022-09-17 16:09    [W:3.753 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site