diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-10-18 17:19:28 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-10-18 17:20:50 +0200 |
commit | 6a8af1b6568ad9ee08a419fb12c793f7992cf8a4 (patch) | |
tree | 8f7a1b3a7ea936632a35a49dc4be6f5b02e523db /include | |
parent | rtc: add alarm related features (diff) | |
download | linux-6a8af1b6568ad9ee08a419fb12c793f7992cf8a4.tar.xz linux-6a8af1b6568ad9ee08a419fb12c793f7992cf8a4.zip |
rtc: add parameter ioctl
Add an ioctl allowing to get and set extra parameters for an RTC. For now,
only handle getting available features.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211018151933.76865-3-alexandre.belloni@bootlin.com
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/rtc.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/uapi/linux/rtc.h b/include/uapi/linux/rtc.h index f4037c541925..3241f9ecc639 100644 --- a/include/uapi/linux/rtc.h +++ b/include/uapi/linux/rtc.h @@ -14,6 +14,7 @@ #include <linux/const.h> #include <linux/ioctl.h> +#include <linux/types.h> /* * The struct used to pass data via the following ioctl. Similar to the @@ -66,6 +67,17 @@ struct rtc_pll_info { long pll_clock; /* base PLL frequency */ }; +struct rtc_param { + __u64 param; + union { + __u64 uvalue; + __s64 svalue; + __u64 ptr; + }; + __u32 index; + __u32 __pad; +}; + /* * ioctl calls that are permitted to the /dev/rtc interface, if * any of the RTC drivers are enabled. @@ -95,6 +107,9 @@ struct rtc_pll_info { #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ +#define RTC_PARAM_GET _IOW('p', 0x13, struct rtc_param) /* Get parameter */ +#define RTC_PARAM_SET _IOW('p', 0x14, struct rtc_param) /* Set parameter */ + #define RTC_VL_DATA_INVALID _BITUL(0) /* Voltage too low, RTC data is invalid */ #define RTC_VL_BACKUP_LOW _BITUL(1) /* Backup voltage is low */ #define RTC_VL_BACKUP_EMPTY _BITUL(2) /* Backup empty or not present */ @@ -118,6 +133,9 @@ struct rtc_pll_info { #define RTC_FEATURE_UPDATE_INTERRUPT 4 #define RTC_FEATURE_CNT 5 +/* parameter list */ +#define RTC_PARAM_FEATURES 0 + #define RTC_MAX_FREQ 8192 |