From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 546B6C388F7 for ; Thu, 5 Nov 2020 22:09:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02E6E206DC for ; Thu, 5 Nov 2020 22:09:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732414AbgKEWJl (ORCPT ); Thu, 5 Nov 2020 17:09:41 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46203 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731508AbgKEWJl (ORCPT ); Thu, 5 Nov 2020 17:09:41 -0500 X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 69EA11C000B; Thu, 5 Nov 2020 22:09:39 +0000 (UTC) Date: Thu, 5 Nov 2020 23:09:38 +0100 From: Alexandre Belloni To: Guillaume Tucker Cc: Alessandro Zummo , Heiko Stuebner , Andrew Morton , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCH] rtc: hym8563: enable wakeup by default Message-ID: <20201105220938.GG1034841@piout.net> References: <4a52fe66b327fd1974f86b7deb7e2c06d74fe64f.1604613067.git.guillaume.tucker@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4a52fe66b327fd1974f86b7deb7e2c06d74fe64f.1604613067.git.guillaume.tucker@collabora.com> Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org 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 > Signed-off-by: Guillaume Tucker > --- > 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