From patchwork Sat Apr 17 23:52:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 12209955 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 D5DBDC433ED for ; Sat, 17 Apr 2021 23:54:25 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9046F610CE for ; Sat, 17 Apr 2021 23:54:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9046F610CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=CNwIJ5jKFUcLff3eiWKh+PsnOZcsxB8DkR33HBJSI60=; b=YmmlH7idY8uWEYCtSuPFTduhPo muA2LYJuDmLEYXqE8bVCGZ15x3i5shfs7m4Wj1azDM53YemvsD2QRUwxGBxhtMKJixQ+4VWfPeQhe MLfAl6LHbASpVnkzx4/JSR0xMAGCNx70P4+3diaUIs4mCZNiizwJFKqLQIT4EZ5oeVYk8rUo2GcmG 3IguPfhjhHC9b62debOGZ38bUtH141ZwbhTuAxyLHfPg5Z3JL6i1ClAXoFLYWrOJEMaHY/hazwzKi vCoNN2qBOuhku/1tpDj8eYSJvW9CBWL7UE1+16ye0dov4gZXNjwmU1OuURkwDfHjDugDFMWZu1O0t rEaIlKYA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXuji-006cJU-Tn; Sat, 17 Apr 2021 23:52:27 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXujh-006cId-6R for linux-arm-kernel@desiato.infradead.org; Sat, 17 Apr 2021 23:52:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=LOa9LD3KMHnzF5epRpDKciNGnv3jucaT+HVdQi1TJuU=; b=sApCSn08WadNtgoU7stvcBJvBD dCMrw8VtizMJMfjSlP9eLE0QFVFZYCSU4ushqnLSSss4opi1rGneIZj4aDoMMPYppX6LrRtx5UOQ1 XjvUuECDyKwWXfnE2TPdFT4g/DUdk2cSWz31sf+GG1MaKooP9verEuI6c12/53aG9hiYJeQiZf6ix 0owGHyPYHHuk2HWg4+QrrGS6ALMMxWtZx31TASvkSzdENppXgzj0VNojwBeY8otC6PEWApSA/VGEo Z0ZcjvEB8QI8gvQkr8Y4FtXckuTd5SNt4DzMkkMJxB1mJikfOvMF0zLLprDONhnyHrlyKV+aZZgAl 2abkMETg==; Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXujb-00AEpt-Bc for linux-arm-kernel@lists.infradead.org; Sat, 17 Apr 2021 23:52:23 +0000 X-Originating-IP: 90.65.108.55 Received: from localhost (lfbn-lyo-1-1676-55.w90-65.abo.wanadoo.fr [90.65.108.55]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 61FAB240002; Sat, 17 Apr 2021 23:52:12 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] imx-sc: remove .read_alarm Date: Sun, 18 Apr 2021 01:52:05 +0200 Message-Id: <20210417235205.994119-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210417_165219_553535_732ACFFF X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The RTC core properly handles RTC without .read_alarm and doesn't use it to set alarms. .read_alarm can be safely dropped. Signed-off-by: Alexandre Belloni Reviewed-by: Fabio Estevam --- drivers/rtc/rtc-imx-sc.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/rtc/rtc-imx-sc.c b/drivers/rtc/rtc-imx-sc.c index cc9fbab49999..814d516645e2 100644 --- a/drivers/rtc/rtc-imx-sc.c +++ b/drivers/rtc/rtc-imx-sc.c @@ -80,16 +80,6 @@ static int imx_sc_rtc_alarm_irq_enable(struct device *dev, unsigned int enable) return imx_scu_irq_group_enable(SC_IRQ_GROUP_RTC, SC_IRQ_RTC, enable); } -static int imx_sc_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) -{ - /* - * SCU firmware does NOT provide read alarm API, but .read_alarm - * callback is required by RTC framework to support alarm function, - * so just return here. - */ - return 0; -} - static int imx_sc_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) { struct imx_sc_msg_timer_rtc_set_alarm msg; @@ -127,7 +117,6 @@ static int imx_sc_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) static const struct rtc_class_ops imx_sc_rtc_ops = { .read_time = imx_sc_rtc_read_time, .set_time = imx_sc_rtc_set_time, - .read_alarm = imx_sc_rtc_read_alarm, .set_alarm = imx_sc_rtc_set_alarm, .alarm_irq_enable = imx_sc_rtc_alarm_irq_enable, };