lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200330122616.24044-1-biwen.li@oss.nxp.com>
Date:   Mon, 30 Mar 2020 20:26:16 +0800
From:   Biwen Li <biwen.li@....nxp.com>
To:     alexandre.belloni@...tlin.com, leoyang.li@....com
Cc:     linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
        jiafei.pan@....com, Biwen Li <biwen.li@....com>
Subject: rtc: fsl-ftm-alarm: add shutdown interface

From: Biwen Li <biwen.li@....com>

Add shutdown interface

Signed-off-by: Biwen Li <biwen.li@....com>
---
 drivers/rtc/rtc-fsl-ftm-alarm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/rtc/rtc-fsl-ftm-alarm.c b/drivers/rtc/rtc-fsl-ftm-alarm.c
index d7fa6c16f47b..118a775e8316 100644
--- a/drivers/rtc/rtc-fsl-ftm-alarm.c
+++ b/drivers/rtc/rtc-fsl-ftm-alarm.c
@@ -307,6 +307,15 @@ static int ftm_rtc_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static void ftm_rtc_shutdown(struct platform_device *pdev)
+{
+	struct ftm_rtc *rtc = platform_get_drvdata(pdev);
+
+	ftm_irq_acknowledge(rtc);
+	ftm_irq_disable(rtc);
+	ftm_clean_alarm(rtc);
+}
+
 static const struct of_device_id ftm_rtc_match[] = {
 	{ .compatible = "fsl,ls1012a-ftm-alarm", },
 	{ .compatible = "fsl,ls1021a-ftm-alarm", },
@@ -321,6 +330,7 @@ static const struct of_device_id ftm_rtc_match[] = {
 
 static struct platform_driver ftm_rtc_driver = {
 	.probe		= ftm_rtc_probe,
+	.shutdown	= ftm_rtc_shutdown,
 	.driver		= {
 		.name	= "ftm-alarm",
 		.of_match_table = ftm_rtc_match,
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ