summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorShanker Donthineni <sdonthineni@nvidia.com>2023-01-02 17:06:30 -0600
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2023-01-09 22:05:54 +0100
commit101ca8d05913b7d1e6e8b9dd792193d4082fff86 (patch)
tree5d3463367529e7f78a1d2e780af6f74502ab0d18 /include
parent1b929c02afd37871d5afb9d498426f83432e71c2 (diff)
downloadlinux-stable-101ca8d05913b7d1e6e8b9dd792193d4082fff86.tar.gz
linux-stable-101ca8d05913b7d1e6e8b9dd792193d4082fff86.tar.bz2
linux-stable-101ca8d05913b7d1e6e8b9dd792193d4082fff86.zip
rtc: efi: Enable SET/GET WAKEUP services as optional
The current implementation of rtc-efi is expecting all the 4 time services GET{SET}_TIME{WAKEUP} must be supported by UEFI firmware. As per the EFI_RT_PROPERTIES_TABLE, the platform specific implementations can choose to enable selective time services based on the RTC device capabilities. This patch does the following changes to provide GET/SET RTC services on platforms that do not support the WAKEUP feature. 1) Relax time services cap check when creating a platform device. 2) Clear RTC_FEATURE_ALARM bit in the absence of WAKEUP services. 3) Conditional alarm entries in '/proc/driver/rtc'. Cc: <stable@vger.kernel.org> # v6.0+ Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com> Link: https://lore.kernel.org/r/20230102230630.192911-1-sdonthineni@nvidia.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 4b27519143f5..98598bd1d2fa 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -668,7 +668,8 @@ extern struct efi {
#define EFI_RT_SUPPORTED_ALL 0x3fff
-#define EFI_RT_SUPPORTED_TIME_SERVICES 0x000f
+#define EFI_RT_SUPPORTED_TIME_SERVICES 0x0003
+#define EFI_RT_SUPPORTED_WAKEUP_SERVICES 0x000c
#define EFI_RT_SUPPORTED_VARIABLE_SERVICES 0x0070
extern struct mm_struct efi_mm;