Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5824446pxb; Sun, 7 Nov 2021 21:23:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPIOsy8P1zqfQ++X4kbdMOvCBvMAIx3HEQJxKQzzCpmL3dfCdA7jUjIfnYX+u0T+fVJRKr X-Received: by 2002:a05:6602:2cce:: with SMTP id j14mr11046409iow.23.1636348994527; Sun, 07 Nov 2021 21:23:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636348994; cv=none; d=google.com; s=arc-20160816; b=zWfO7ZVkjRjowFk9y0hRFv71M1uCyPmb45azXa9V9ubiTOcYT+vVhQduWzvUW+o8uc 3lToz+/GRcpzsWxZVmeeaV4To91Iufhi6fTZv1Bk7RTGv7ub40NuwIwWH6Hv9sTGptAu HJ2q20JnweVT4pHZ35rtY9u7jyO9xIvds03dJkQuBoMGVcmhayuEfmhJisJycZCN2eai 1/6x4zIH8CbocDR/hd/l24CSChfBZme18nHNixuvkz2WrzxJV99/0MOHxLsF2vJcTQsk GCj5RbuzgjhPrGLxvR6kH5AtPgtKr9A8sEadgC8FvcntjCIlZa8Dedhk2VJpgmfLIth+ Df/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MtFnvzGQAenawdww4PkBz/hTrrDUsXwSlkbnqpmBno4=; b=a2PlYRKvqpBLCVnnc60LkiCOjXxR41jSeh0BrZdI5BmU8F7FdXtTM9XLWxwX6fQykH v1mAWvnuaLBLDLR/s7QojKR4mRMprH/XhVrc4qC3NUZXpIPRINARSCslmceui6V0i0JH HGD6lDWRlTKF0o0xLJ1ud3zRw2T0qyogN/8LMp1Yml1NhQfHsFX9okey6KYpW64n3o22 AP0SmWoXiHtb+MX9pfo/vflpX8uIMZ83oTzb+oUiZ7FxVsCpzd+UbAG8BIrCdc4s3CNl ROOgTZlfergApihXvHaALuWRp86kKfhmY8mmFsIhwb2uh0O6hCn9hOoVFQ0yta8eGOaV wlNA== 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 f18si20407711ils.25.2021.11.07.21.23.02; Sun, 07 Nov 2021 21:23:14 -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 S236707AbhKGW5s (ORCPT + 99 others); Sun, 7 Nov 2021 17:57:48 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:38065 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235137AbhKGW5r (ORCPT ); Sun, 7 Nov 2021 17:57:47 -0500 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 039FD240005; Sun, 7 Nov 2021 22:55:02 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/12] rtc: s35390a: let the core handle the alarm resolution Date: Sun, 7 Nov 2021 23:54:47 +0100 Message-Id: <20211107225458.111068-2-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211107225458.111068-1-alexandre.belloni@bootlin.com> References: <20211107225458.111068-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tell the RTC core UIE are not supported because the resolution of the alarm is a minute. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-s35390a.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c index b5bdeda7d767..26278c770731 100644 --- a/drivers/rtc/rtc-s35390a.c +++ b/drivers/rtc/rtc-s35390a.c @@ -285,9 +285,6 @@ static int s35390a_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) alm->time.tm_min, alm->time.tm_hour, alm->time.tm_mday, alm->time.tm_mon, alm->time.tm_year, alm->time.tm_wday); - if (alm->time.tm_sec != 0) - dev_warn(&client->dev, "Alarms are only supported on a per minute basis!\n"); - /* disable interrupt (which deasserts the irq line) */ err = s35390a_set_reg(s35390a, S35390A_CMD_STATUS2, &sts, sizeof(sts)); if (err < 0) @@ -491,8 +488,8 @@ static int s35390a_probe(struct i2c_client *client, s35390a->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; s35390a->rtc->range_max = RTC_TIMESTAMP_END_2099; - /* supports per-minute alarms only, therefore set uie_unsupported */ - s35390a->rtc->uie_unsupported = 1; + set_bit(RTC_FEATURE_ALARM_RES_MINUTE, s35390a->rtc->features); + clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, s35390a->rtc->features ); if (status1 & S35390A_FLAG_INT2) rtc_update_irq(s35390a->rtc, 1, RTC_AF); -- 2.31.1