Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp838162pxb; Thu, 5 Nov 2020 14:31:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJydl45jgOML+vqI7airVjT5e9Bvdymzs8E67JQtf2k9m8cpcpPsdr+vEHb81PTe6w+qqNca X-Received: by 2002:a05:6402:1813:: with SMTP id g19mr5072496edy.105.1604615493181; Thu, 05 Nov 2020 14:31:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604615493; cv=none; d=google.com; s=arc-20160816; b=md9RmoFBXiT1WZxsjkmCXgZeczXjD8JfR8VhoGvQl67eukrOlKQFIKdhlJ8vwtqe1D z0eNnx25Q2pqr38hO2WakIdUR/ewINF4jnwRwUNSjhjLkqSdgQgXsSYhKywCgvshusn+ Cb/dwgbnaW+Ip3UYPGHNRRQqz/eQPan+gDnmCDbHqlQEBs+mmrpCmLvWCr+l6TfrXmf8 p+2kznSHjWcWwBEXbbbdWV02KVlgjYZMROrerkSvV8/lqfj8hiMI/jaBwJu5CmRjg2qE S4BNSTDsjHvAr9jRMSATYNTkc/WVzmU9zM5IirqAWNRYr/t8LKLpc9LJhToXK5p8g6o6 JgHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=APUKJ5686CFZyGOvs2NwLcjXnl5+7O5Bs9A6A4C409o=; b=oBQGgx7Dbs3IXk7sWspnI10edkPs1NQYtaNLCWkOAmZWmgMQ4umhRxlbGCt172uK3T pOzmY/MRKEyTVxKmUTV+ardm91//UVa70xg0K5sll+UJpFaM3KMltsC1w5vU6jeNAzZB RFzHfise5Z3SDHlfdPWYHy3BoEZYRa8UebUb4A1lBpGOiVwLAuHwG7aK+CSflqip6fQM q15HLd/C48rP3x0i3E0tHfWMyjP6hyd/AsyUyR5xgvFfsm0LBE51Uy5ElK0At7Ud4AKZ qMoU+Le/JevoxUEwwr3PlPztZTDx/rvvqZYOzGB4SmHo09pYYlQSKeRXDtFRNzFj/OZd ixKA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx12si2336775edb.507.2020.11.05.14.31.10; Thu, 05 Nov 2020 14:31:33 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732425AbgKEW2f (ORCPT + 99 others); Thu, 5 Nov 2020 17:28:35 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:53136 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732434AbgKEW2a (ORCPT ); Thu, 5 Nov 2020 17:28:30 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gtucker) with ESMTPSA id 6A5451F46655 Subject: Re: [PATCH] rtc: hym8563: enable wakeup by default To: Alexandre Belloni Cc: Alessandro Zummo , Heiko Stuebner , Andrew Morton , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com References: <4a52fe66b327fd1974f86b7deb7e2c06d74fe64f.1604613067.git.guillaume.tucker@collabora.com> <20201105220938.GG1034841@piout.net> From: Guillaume Tucker Message-ID: <03f589d0-9c6f-4a3b-4d42-8d3f66b13436@collabora.com> Date: Thu, 5 Nov 2020 22:28:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201105220938.GG1034841@piout.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/11/2020 22:09, Alexandre Belloni wrote: > 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. Thanks for the quick reply. I see, I'll send a v2 accordingly. Guillaume >> 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 >> >