Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp827099pxb; Thu, 5 Nov 2020 14:12:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPeCgA/uqxYQPhrr+LNivQ46ud/ExKBOo1w9/6K4eB0E+mBXW2cY8Xe2HzK8POSHKchaYl X-Received: by 2002:a17:906:b799:: with SMTP id dt25mr4625252ejb.183.1604614356937; Thu, 05 Nov 2020 14:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604614356; cv=none; d=google.com; s=arc-20160816; b=ZBDTOHAfD7Ti10g7DTlRSCoYLDt7QzwqrAFGB5QsA1wrBnPtHqQ9ZGHe2Js8W63pCL bEROIvS5WnXqdCj27zu87ksXHz9o6erC957S3J/yhDTannTJwcSmqx3q2cWf85/RtUkD GKJspQwftto5d5i+XMLxCzvub8zX5KtVKUQp5tSMHWfcJ0SJ3zWOP0Lt7xqEc6f+2xu0 buDLUs2HpDxob93gYL5oiugcRzU5dxd3o3d8RFf9uREi+XVc+omXpKOpNEQSzyPXWyzD AbhhzCZBdd/WQnBxg4PjSPck5I9+ZvoPJGh8y4BaDocP+Jnjyb+pQYkAwM/Ujai2f+Lw JUYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=8bE2v7WvUyLV1FaeGjCjWtR2Aubeswt0/LD3lGfTPgg=; b=T83McutFSgq7WrWHANinIl2Ag/dBrutEf4DMhhLj7hMbs6lNqL0WcSvCEW1CquUm91 U8r9q/ss9PqRgntY/74BlPU7oeVpAYPCqpFQ7nm9wHnO/X5seD6uRvpzWnPIlqX2MsED XZ2EyxgWf8rINS/1MXfNcRtwEtE56e2GeDjm1htw4K3JDDX6Ep/gMl6dd9Hm4Q+xSSCd Byf1gQbtGUrMA5Qkzz0LtFM2/erCbj3lWoRoHez2VcdHGUfK54kcVmObkE8dTaCgUmu9 1hKhEkbxGW5kJPBgn5DUR5sd/l769LYCItJEiSAH4SL8Cmf0dz9+UxWYVtEjkyzxlhQj ZMaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si2033039eja.75.2020.11.05.14.12.12; Thu, 05 Nov 2020 14:12:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732644AbgKEWJl (ORCPT + 99 others); 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-kernel@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