From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Guillaume Tucker <guillaume.tucker@collabora.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
Heiko Stuebner <heiko@sntech.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCH] rtc: hym8563: enable wakeup by default
Date: Thu, 5 Nov 2020 23:09:38 +0100 [thread overview]
Message-ID: <20201105220938.GG1034841@piout.net> (raw)
In-Reply-To: <4a52fe66b327fd1974f86b7deb7e2c06d74fe64f.1604613067.git.guillaume.tucker@collabora.com>
On 05/11/2020 22:01:10+0000, Guillaume Tucker wrote:
> Enable wakeup by default in the hym8563 driver to match the behaviour
> implemented by the majority of RTC drivers. As per the description of
> device_init_wakeup(), it should be enabled for "devices that everyone
> expects to be wakeup sources". One would expect this to be the case
> with a real-time clock.
>
Actually, the proper way of doing it for a discrete RTC is to only
enable wakeup if the irq request is successful or when the wakeup-source
property is present on the node.
> Fixes: dcaf03849352 ("rtc: add hym8563 rtc-driver")
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> ---
> drivers/rtc/rtc-hym8563.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c
> index 0fb79c4afb46..6fccfe634d57 100644
> --- a/drivers/rtc/rtc-hym8563.c
> +++ b/drivers/rtc/rtc-hym8563.c
> @@ -527,7 +527,7 @@ static int hym8563_probe(struct i2c_client *client,
> hym8563->client = client;
> i2c_set_clientdata(client, hym8563);
>
> - device_set_wakeup_capable(&client->dev, true);
> + device_init_wakeup(&client->dev, true);
>
> ret = hym8563_init_device(client);
> if (ret) {
> --
> 2.20.1
>
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2020-11-05 22:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 22:01 [PATCH] rtc: hym8563: enable wakeup by default Guillaume Tucker
2020-11-05 22:09 ` Alexandre Belloni [this message]
2020-11-05 22:28 ` Guillaume Tucker
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=20201105220938.GG1034841@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=guillaume.tucker@collabora.com \
--cc=heiko@sntech.de \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox