From patchwork Fri Jan 20 19:01:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Berger X-Patchwork-Id: 13110414 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73C6BC05027 for ; Fri, 20 Jan 2023 19:04:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=JJYTQ8YtHFd+HAhV+0KWDRzjPy4Q8TrI1o6IseK8VRg=; b=gWC0KAzR0FrYOw DuIrVwBubQFGGynGR3RE2bPx/CfdGkn6tz9Iah6BfYilbrbp4qhY+R0sVS1Z7XmfwexPyXU5V12ck XPNk1ikG4ZgncWXkmZPDMwxyYKWY3CWTOZSwzske7RuyUW28ajEAmNVQPyWjzsqdU7GG0f9+fnQ7y lFzDcR1vcqEqBeEGX7hy9LJrPWn9JIx/0QlT053xtwG2huMZv5PGQnEWAG0JidesFq1doQcv0MaoN Uo1uFMDSA/wNDFEXlDM1zH5pcvLhCPAEXmWYI3AyCkYEtRpBdadWqd+xJERHrN6b+a8ObzKONXH7r TMrzHy5hrOCHsMmGOZhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIwfn-00Bx9j-NY; Fri, 20 Jan 2023 19:03:36 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIwem-00BwgA-FC for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 19:02:35 +0000 Received: by mail-qv1-xf33.google.com with SMTP id q10so4397129qvt.10 for ; Fri, 20 Jan 2023 11:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=O/0h0heB6R7vr68pBP8mp0KNKIM3bG6DI1Vn2wipkYU=; b=kEqwe/PUsz08w5m0iF19xnZtx1fg80HTYcBEMVXbIWsvSG5mO6585xZiAizKMT98S7 nY4ut/1oDiPiY8HqS40JbqcdJ+emuoXQwg6XmJKEwZOB60TGgGl3iydQ7fuoYn0SsS7k KY5DVucmMuoaWV5NrbFJuEvnqODTA0LxoFyZUoKhBmTu1TpEeyk7CXZ8TLzWRGTc3/rP fBjUrYxutoNlZPJfYgw26JOdoSB7aSWg6Rbx1DJpviuThuUFphoK5On5YNAeasguHYab xuC4aKsjyYQW3FfUI7NwsCCwyWGccRZorJpbnPbTmsu3vNm7bJJ13l0K2dJbkS0qjnEN KlaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O/0h0heB6R7vr68pBP8mp0KNKIM3bG6DI1Vn2wipkYU=; b=zah0YXVAUU9/MPEa4nCrA8+pRSqQtpGbWs8bTeNP1QLAKugI2IHBWjxl4p+UeFy5GP V0fWNKgticVRuHqr0AIwCtUvd7EOtlHW2QmzFonj9quO7Tu3FUV6ralpnO1Ps5T/TaWO hGK3hcde/SQRQtbfkHFJFFT0zBUiK18zD67AF+aa52MCj1xgYPnglMOmVQG3GtSHsB2F li+vL6hmKrsRabUHsIjspr1zFXjsRtL3GGn4IZsKCMwwRpi2u2Rr+VAbVtzGuQC6mSeu vijmiBdq5TGdJHRpzvOijTIGAtmat0e9Ypfwyavbr7JKWj19MD7tJH5Vx+JFQyoz4OGw ZLxw== X-Gm-Message-State: AFqh2ko1IxQGEtFFzHLwC3iYi6Xe/tWtIBNSmgvHB8ZwdBJvl0oI+bbQ PkTelOKsNkLzHX2S8J6U0ms= X-Google-Smtp-Source: AMrXdXvGOJhrvjWOZszWDXp/4qWhkm8VfESaKs465MCmfTqIeKR8Xh8PfZedyemS+LkHGNAM4dSPBQ== X-Received: by 2002:a0c:ea2c:0:b0:532:1fc2:9ad5 with SMTP id t12-20020a0cea2c000000b005321fc29ad5mr50095693qvp.0.1674241351099; Fri, 20 Jan 2023 11:02:31 -0800 (PST) Received: from stbirv-lnx-3.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id y13-20020a37f60d000000b006fa2b1c3c1esm10379806qkj.58.2023.01.20.11.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 11:02:30 -0800 (PST) From: Doug Berger To: Alessandro Zummo , Alexandre Belloni Cc: Brian Norris , Markus Mayer , Rob Herring , Krzysztof Kozlowski , Florian Fainelli , Broadcom internal kernel review list , linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Doug Berger Subject: [PATCH 4/6] rtc: brcmstb-waketimer: rename irq to wake_irq Date: Fri, 20 Jan 2023 11:01:45 -0800 Message-Id: <20230120190147.718976-5-opendmb@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230120190147.718976-1-opendmb@gmail.com> References: <20230120190147.718976-1-opendmb@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230120_110232_848370_5F331E9F X-CRM114-Status: GOOD ( 18.77 ) 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 In preparation for adding a second interrupt to service RTC interrupts, the existing interrupt is renamed from the generic 'irq' to 'wake_irq' to more clearly convey its role. It is also converted to an unsigned int. Finally, the driver message that outputs the IRQ number when registered is removed since devm_rtc_register_device() already provides a report of registration and the interrupts can be found in /proc/interrupts. Signed-off-by: Doug Berger Acked-by: Florian Fainelli --- drivers/rtc/rtc-brcmstb-waketimer.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-brcmstb-waketimer.c b/drivers/rtc/rtc-brcmstb-waketimer.c index c791e92532b8..e25f9fcd6ed1 100644 --- a/drivers/rtc/rtc-brcmstb-waketimer.c +++ b/drivers/rtc/rtc-brcmstb-waketimer.c @@ -27,7 +27,7 @@ struct brcmstb_waketmr { struct rtc_device *rtc; struct device *dev; void __iomem *base; - int irq; + unsigned int wake_irq; struct notifier_block reboot_notifier; struct clk *clk; u32 rate; @@ -117,7 +117,7 @@ static int brcmstb_waketmr_prepare_suspend(struct brcmstb_waketmr *timer) int ret = 0; if (device_may_wakeup(dev)) { - ret = enable_irq_wake(timer->irq); + ret = enable_irq_wake(timer->wake_irq); if (ret) { dev_err(dev, "failed to enable wake-up interrupt\n"); return ret; @@ -246,9 +246,10 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev) */ device_init_wakeup(dev, true); - timer->irq = platform_get_irq(pdev, 0); - if (timer->irq < 0) + ret = platform_get_irq(pdev, 0); + if (ret < 0) return -ENODEV; + timer->wake_irq = (unsigned int)ret; timer->clk = devm_clk_get(dev, NULL); if (!IS_ERR(timer->clk)) { @@ -263,7 +264,7 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev) timer->clk = NULL; } - ret = devm_request_irq(dev, timer->irq, brcmstb_waketmr_irq, 0, + ret = devm_request_irq(dev, timer->wake_irq, brcmstb_waketmr_irq, 0, "brcmstb-waketimer", timer); if (ret < 0) goto err_clk; @@ -278,8 +279,6 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev) if (ret) goto err_notifier; - dev_info(dev, "registered, with irq %d\n", timer->irq); - return 0; err_notifier: @@ -317,7 +316,7 @@ static int brcmstb_waketmr_resume(struct device *dev) if (!device_may_wakeup(dev)) return 0; - ret = disable_irq_wake(timer->irq); + ret = disable_irq_wake(timer->wake_irq); brcmstb_waketmr_clear_alarm(timer);