]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: efi: Enable SET/GET WAKEUP services as optional
authorShanker Donthineni <sdonthineni@nvidia.com>
Mon, 2 Jan 2023 23:06:30 +0000 (17:06 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:17 +0000 (11:28 +0100)
commit52f3277c278b6f12bb33403d575fd3b610c8c052
tree90057332f3a5b29e508397ec1dec40b4abf50ed1
parent195caef4db263e60b24bbb73427110ca2dc9bd74
rtc: efi: Enable SET/GET WAKEUP services as optional

commit 59858cecf421b62839f7f3815f8b79da1374b9c2 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/rtc-efi.c
include/linux/efi.h