diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2012-05-29 18:07:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:33 -0400 |
commit | e311c9295912209dcf8e54de5401f8518112b7f8 (patch) | |
tree | e1016bbb7d43aa6086ea0ee5d1935b309d43d81c /include/linux/rtc.h | |
parent | 84d56b38b9abd36565f74cbf68501cee6206761e (diff) |
rtc: add ioctl to get/clear battery low voltage status
Currently there is no generic way to get the RTC battery status within an
application. So add an ioctl to read the status bit. The idea is that
the bit is set once a low voltage is detected. It stays there until it is
reset using the RTC_VL_CLR ioctl.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rtc.h')
-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 fcabfb4873c8..f071b3922c67 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -91,6 +91,9 @@ struct rtc_pll_info { | |||
91 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ | 91 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ |
92 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ | 92 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ |
93 | 93 | ||
94 | #define RTC_VL_READ _IOR('p', 0x13, int) /* Voltage low detector */ | ||
95 | #define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */ | ||
96 | |||
94 | /* interrupt flags */ | 97 | /* interrupt flags */ |
95 | #define RTC_IRQF 0x80 /* Any of the following is active */ | 98 | #define RTC_IRQF 0x80 /* Any of the following is active */ |
96 | #define RTC_PF 0x40 /* Periodic interrupt */ | 99 | #define RTC_PF 0x40 /* Periodic interrupt */ |