From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>, linux-rtc@vger.kernel.org
Subject: Re: [PATCH] rtc: cmos: Do not export alarm rtc_ops when we do not support alarms
Date: Sat, 8 Sep 2018 16:37:35 +0200 [thread overview]
Message-ID: <20180908143735.GC2598@piout.net> (raw)
In-Reply-To: <20180904145129.17098-1-hdegoede@redhat.com>
On 04/09/2018 16:51:29+0200, Hans de Goede wrote:
> When there is no IRQ configured for the RTC, the rtc-cmos code does not
> support alarms, all alarm rtc_ops fail with -EIO / -EINVAL.
>
> The rtc-core expects a rtc driver which does not support rtc alarms to
> not have alarm ops at all. Otherwise the wakealarm sysfs attr will read
> as empty rather then returning an error, making it impossible for
> userspace to find out beforehand if alarms are supported.
>
> A system without an IRQ for the RTC before this patch:
> [root@localhost ~]# cat /sys/class/rtc/rtc0/wakealarm
> [root@localhost ~]#
>
> After this patch:
> [root@localhost ~]# cat /sys/class/rtc/rtc0/wakealarm
> cat: /sys/class/rtc/rtc0/wakealarm: No such file or directory
> [root@localhost ~]#
>
> This fixes gnome-session + systemd trying to use suspend-then-hibernate,
> which causes systemd to abort the suspend when writing the RTC alarm fails.
>
> BugLink: https://github.com/systemd/systemd/issues/9988
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/rtc/rtc-cmos.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
Applied, thanks.
However, you must be using an ancient kernel as my email address changed
a while ago ;)
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-09-08 19:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 14:51 [PATCH] rtc: cmos: Do not export alarm rtc_ops when we do not support alarms Hans de Goede
2018-09-08 14:37 ` Alexandre Belloni [this message]
2018-11-07 12:49 ` Hans de Goede
2018-11-07 15:08 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180908143735.GC2598@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=a.zummo@towertech.it \
--cc=hdegoede@redhat.com \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.