Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+32 -23
+2
Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml
··· 40 40 description: 41 41 Indicates that the setting of RTC time is allowed by the host CPU. 42 42 43 + wakeup-source: true 44 + 43 45 required: 44 46 - compatible 45 47 - reg
+26 -20
drivers/rtc/rtc-efi.c
··· 188 188 189 189 static int efi_procfs(struct device *dev, struct seq_file *seq) 190 190 { 191 - efi_time_t eft, alm; 192 - efi_time_cap_t cap; 193 - efi_bool_t enabled, pending; 191 + efi_time_t eft, alm; 192 + efi_time_cap_t cap; 193 + efi_bool_t enabled, pending; 194 + struct rtc_device *rtc = dev_get_drvdata(dev); 194 195 195 196 memset(&eft, 0, sizeof(eft)); 196 197 memset(&alm, 0, sizeof(alm)); ··· 214 213 /* XXX fixme: convert to string? */ 215 214 seq_printf(seq, "Timezone\t: %u\n", eft.timezone); 216 215 217 - seq_printf(seq, 218 - "Alarm Time\t: %u:%u:%u.%09u\n" 219 - "Alarm Date\t: %u-%u-%u\n" 220 - "Alarm Daylight\t: %u\n" 221 - "Enabled\t\t: %s\n" 222 - "Pending\t\t: %s\n", 223 - alm.hour, alm.minute, alm.second, alm.nanosecond, 224 - alm.year, alm.month, alm.day, 225 - alm.daylight, 226 - enabled == 1 ? "yes" : "no", 227 - pending == 1 ? "yes" : "no"); 216 + if (test_bit(RTC_FEATURE_ALARM, rtc->features)) { 217 + seq_printf(seq, 218 + "Alarm Time\t: %u:%u:%u.%09u\n" 219 + "Alarm Date\t: %u-%u-%u\n" 220 + "Alarm Daylight\t: %u\n" 221 + "Enabled\t\t: %s\n" 222 + "Pending\t\t: %s\n", 223 + alm.hour, alm.minute, alm.second, alm.nanosecond, 224 + alm.year, alm.month, alm.day, 225 + alm.daylight, 226 + enabled == 1 ? "yes" : "no", 227 + pending == 1 ? "yes" : "no"); 228 228 229 - if (eft.timezone == EFI_UNSPECIFIED_TIMEZONE) 230 - seq_puts(seq, "Timezone\t: unspecified\n"); 231 - else 232 - /* XXX fixme: convert to string? */ 233 - seq_printf(seq, "Timezone\t: %u\n", alm.timezone); 229 + if (eft.timezone == EFI_UNSPECIFIED_TIMEZONE) 230 + seq_puts(seq, "Timezone\t: unspecified\n"); 231 + else 232 + /* XXX fixme: convert to string? */ 233 + seq_printf(seq, "Timezone\t: %u\n", alm.timezone); 234 + } 234 235 235 236 /* 236 237 * now prints the capabilities ··· 272 269 273 270 rtc->ops = &efi_rtc_ops; 274 271 clear_bit(RTC_FEATURE_UPDATE_INTERRUPT, rtc->features); 275 - set_bit(RTC_FEATURE_ALARM_WAKEUP_ONLY, rtc->features); 272 + if (efi_rt_services_supported(EFI_RT_SUPPORTED_WAKEUP_SERVICES)) 273 + set_bit(RTC_FEATURE_ALARM_WAKEUP_ONLY, rtc->features); 274 + else 275 + clear_bit(RTC_FEATURE_ALARM, rtc->features); 276 276 277 277 device_init_wakeup(&dev->dev, true); 278 278
+2 -2
drivers/rtc/rtc-sunplus.c
··· 240 240 if (IS_ERR(sp_rtc->reg_base)) 241 241 return dev_err_probe(&plat_dev->dev, PTR_ERR(sp_rtc->reg_base), 242 242 "%s devm_ioremap_resource fail\n", RTC_REG_NAME); 243 - dev_dbg(&plat_dev->dev, "res = 0x%x, reg_base = 0x%lx\n", 244 - sp_rtc->res->start, (unsigned long)sp_rtc->reg_base); 243 + dev_dbg(&plat_dev->dev, "res = %pR, reg_base = %p\n", 244 + sp_rtc->res, sp_rtc->reg_base); 245 245 246 246 sp_rtc->irq = platform_get_irq(plat_dev, 0); 247 247 if (sp_rtc->irq < 0)
+2 -1
include/linux/efi.h
··· 668 668 669 669 #define EFI_RT_SUPPORTED_ALL 0x3fff 670 670 671 - #define EFI_RT_SUPPORTED_TIME_SERVICES 0x000f 671 + #define EFI_RT_SUPPORTED_TIME_SERVICES 0x0003 672 + #define EFI_RT_SUPPORTED_WAKEUP_SERVICES 0x000c 672 673 #define EFI_RT_SUPPORTED_VARIABLE_SERVICES 0x0070 673 674 674 675 extern struct mm_struct efi_mm;