diff options
author | Bibek Basu <bbasu@nvidia.com> | 2015-01-27 17:10:15 +0530 |
---|---|---|
committer | Winnie Hsu <whsu@nvidia.com> | 2015-01-29 21:47:30 -0800 |
commit | 097e6ff87a8450a0040091d7a69e9894611df6e6 (patch) | |
tree | bdce4af6865af47244e182016ef4dcd02efb8c9a /include | |
parent | e0de594224b867533b58b2106a98448a6f36df91 (diff) |
rtc: add rtc_shutdown api to service pending work
During shutdown/reboot process, its better to
finish any pending irqwork so that the work is
not scheduled after devices like i2c are shutdown.
This patch provides hook to be called from rtc driver after disabling
rtc irq. Also any further request to access rtc_class_ops will
be prohibited.
Bug 200072946
Change-Id: I8eb20e5214a31fbc8a280ccfff8e190a5fabbb96
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/677750
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rtc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index b608a6f392e1..871aec66ab9e 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -7,6 +7,7 @@ * * Copyright (C) 1999 Hewlett-Packard Co. * Copyright (C) 1999 Stephane Eranian <eranian@hpl.hp.com> + * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. */ #ifndef _LINUX_RTC_H_ #define _LINUX_RTC_H_ @@ -115,6 +116,7 @@ struct rtc_device struct work_struct irqwork; /* Some hardware can't support UIE mode */ int uie_unsupported; + bool system_shutting; #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL struct work_struct uie_task; @@ -140,6 +142,7 @@ extern struct rtc_device *devm_rtc_device_register(struct device *dev, extern void rtc_device_unregister(struct rtc_device *rtc); extern void devm_rtc_device_unregister(struct device *dev, struct rtc_device *rtc); +void rtc_device_shutdown(struct rtc_device *rtc); extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); |