mirror of
https://github.com/torvalds/linux.git
synced 2024-12-31 23:31:29 +00:00
RTC fixes for 6.2
Drivers: - efi: make WAKEUP services optional - sunplus: fix format string warning -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEBqsFVZXh8s/0O5JiY6TcMGxwOjIFAmPezxQACgkQY6TcMGxw OjK2hA/+IYuaQlorI5YEZcSDF/X3uU3vO0suNe3FQLxX6AB4obVw3goKIduqJG57 rE2QCvbR3xknsCu2a3X/MyKbZNyrPf5z18N7atLc3LIUHmoKu+6hlwFWQ2vkfZ+w j5HxzYNq5WU4xP88EyDy9yqr5AwFja5dGe/3NJaHXef8ZcL5CyIdWHybyb/QuikQ QrYqf48EwjfvqyNfAkTZQOtmRmgz3eI5GwV7ApREJO4SNb8oDlFUxCh2HQs1KDn6 9K8P0JcV1DzzxvnmeOnwDtdYPhesSzYjxn1Q45Q820hLkAOecPKxhmwEPkXzjLLP P/ZXpmH4caBlXJHJF8fn3vLbnuVIGYRKsFJ5UfhEAub3Yf0NP+BNvSvJLi6DuVhW alO/fCCxQlTBhobwteTWaFFDPEhcJCYH764WSWQEqnmQhU5LhEh1EaBCP24ziSjw HHakwLQFHQSSPddBpoOOHTc+2HyBw//AHZJzm14ofeB3QCoiDUzMcJjFUmTAtAl5 jPs+hE5OIkjLDiwBiFwaTW9O8wNXi4ruU94hv5XGhv8/bimvMrPFPTxux8nAs1kZ KUIfJWKc/hNdfmv36XQ9RFnVfl6dCbItr5HO/kyjVp9LvnrxqjVx56DFR7RoW1+g 4UCsYB9usW2nXVOnSg7yXcYVDKbI0mZkV6+3HDjy6pz0BzeUR7E= =w48A -----END PGP SIGNATURE----- Merge tag 'rtc-6.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC fixes from Alexandre Belloni: "Here are a few fixes for 6.2. The EFI one is the most important as it allows some RTCs to actually work. The other two are warnings that are worth fixing. - efi: make WAKEUP services optional - sunplus: fix format string warning" * tag 'rtc-6.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: sunplus: fix format string for printing resource dt-bindings: rtc: qcom-pm8xxx: allow 'wakeup-source' property rtc: efi: Enable SET/GET WAKEUP services as optional
This commit is contained in:
commit
95078069c1
@ -40,6 +40,8 @@ properties:
|
||||
description:
|
||||
Indicates that the setting of RTC time is allowed by the host CPU.
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
@ -188,9 +188,10 @@ static int efi_set_time(struct device *dev, struct rtc_time *tm)
|
||||
|
||||
static int efi_procfs(struct device *dev, struct seq_file *seq)
|
||||
{
|
||||
efi_time_t eft, alm;
|
||||
efi_time_cap_t cap;
|
||||
efi_bool_t enabled, pending;
|
||||
efi_time_t eft, alm;
|
||||
efi_time_cap_t cap;
|
||||
efi_bool_t enabled, pending;
|
||||
struct rtc_device *rtc = dev_get_drvdata(dev);
|
||||
|
||||
memset(&eft, 0, sizeof(eft));
|
||||
memset(&alm, 0, sizeof(alm));
|
||||
@ -213,23 +214,25 @@ static int efi_procfs(struct device *dev, struct seq_file *seq)
|
||||
/* XXX fixme: convert to string? */
|
||||
seq_printf(seq, "Timezone\t: %u\n", eft.timezone);
|
||||
|
||||
seq_printf(seq,
|
||||
"Alarm Time\t: %u:%u:%u.%09u\n"
|
||||
"Alarm Date\t: %u-%u-%u\n"
|
||||
"Alarm Daylight\t: %u\n"
|
||||
"Enabled\t\t: %s\n"
|
||||
"Pending\t\t: %s\n",
|
||||
alm.hour, alm.minute, alm.second, alm.nanosecond,
|
||||
alm.year, alm.month, alm.day,
|
||||
alm.daylight,
|
||||
enabled == 1 ? "yes" : "no",
|
||||
pending == 1 ? "yes" : "no");
|
||||
if (test_bit(RTC_FEATURE_ALARM, rtc->features)) {
|
||||
seq_printf(seq,
|
||||
"Alarm Time\t: %u:%u:%u.%09u\n"
|
||||
"Alarm Date\t: %u-%u-%u\n"
|
||||
"Alarm Daylight\t: %u\n"
|
||||
"Enabled\t\t: %s\n"
|
||||
"Pending\t\t: %s\n",
|
||||
alm.hour, alm.minute, alm.second, alm.nanosecond,
|
||||
alm.year, alm.month, alm.day,
|
||||
alm.daylight,
|
||||
enabled == 1 ? "yes" : "no",
|
||||
pending == 1 ? "yes" : "no");
|
||||
|
||||
if (eft.timezone == EFI_UNSPECIFIED_TIMEZONE)
|
||||
seq_puts(seq, "Timezone\t: unspecified\n");
|
||||
else
|
||||
/* XXX fixme: convert to string? */
|
||||
seq_printf(seq, "Timezone\t: %u\n", alm.timezone);
|
||||
if (eft.timezone == EFI_UNSPECIFIED_TIMEZONE)
|
||||
seq_puts(seq, "Timezone\t: unspecified\n");
|
||||
else
|
||||
/* XXX fixme: convert to string? */
|
||||
seq_printf(seq, "Timezone\t: %u\n", alm.timezone);
|
||||
}
|
||||
|
||||
/*
|
||||
* now prints the capabilities
|
||||
@ -269,7 +272,10 @@ static int __init efi_rtc_probe(struct platform_device *dev)
|
||||
|
||||
rtc->ops = &efi_rtc_ops;
|
||||
clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->features);
|
||||
set_bit(RTC_FEATURE_ALARM_WAKEUP_ONLY, rtc->features);
|
||||
if (efi_rt_services_supported(EFI_RT_SUPPORTED_WAKEUP_SERVICES))
|
||||
set_bit(RTC_FEATURE_ALARM_WAKEUP_ONLY, rtc->features);
|
||||
else
|
||||
clear_bit(RTC_FEATURE_ALARM, rtc->features);
|
||||
|
||||
device_init_wakeup(&dev->dev, true);
|
||||
|
||||
|
@ -240,8 +240,8 @@ static int sp_rtc_probe(struct platform_device *plat_dev)
|
||||
if (IS_ERR(sp_rtc->reg_base))
|
||||
return dev_err_probe(&plat_dev->dev, PTR_ERR(sp_rtc->reg_base),
|
||||
"%s devm_ioremap_resource fail\n", RTC_REG_NAME);
|
||||
dev_dbg(&plat_dev->dev, "res = 0x%x, reg_base = 0x%lx\n",
|
||||
sp_rtc->res->start, (unsigned long)sp_rtc->reg_base);
|
||||
dev_dbg(&plat_dev->dev, "res = %pR, reg_base = %p\n",
|
||||
sp_rtc->res, sp_rtc->reg_base);
|
||||
|
||||
sp_rtc->irq = platform_get_irq(plat_dev, 0);
|
||||
if (sp_rtc->irq < 0)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user