aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
AgeCommit message (Collapse)AuthorFilesLines
2020-04-02rtc: sun6i: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-3/+3
Call the 64bit versions of rtc_tm time conversion. Tested-by: Paul Kocialkowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-04-01rtc: ds1307: add support for watchdog timer on ds1388Chris Packham2-0/+116
The DS1388 variant has watchdog timer capabilities. When using a DS1388 and having enabled CONFIG_WATCHDOG_CORE register a watchdog device for the DS1388. Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-04-01rtc: da9052: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-4/+2
Call the 64bit versions of rtc_tm time conversion. Acked-by: Adam Thomson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-04-01rtc: da9052: set rangeAlexandre Belloni1-0/+2
The da9052 is an rtc valid from 2000 to 2063 (max year is 63). Acked-by: Adam Thomson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-04-01rtc: da9052: convert to devm_rtc_allocate_deviceAlexandre Belloni1-3/+7
This allows further improvement of the driver. Acked-by: Adam Thomson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-30Merge branch 'efi-core-for-linus' of ↵Linus Torvalds2-39/+0
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The EFI changes in this cycle are much larger than usual, for two (positive) reasons: - The GRUB project is showing signs of life again, resulting in the introduction of the generic Linux/UEFI boot protocol, instead of x86 specific hacks which are increasingly difficult to maintain. There's hope that all future extensions will now go through that boot protocol. - Preparatory work for RISC-V EFI support. The main changes are: - Boot time GDT handling changes - Simplify handling of EFI properties table on arm64 - Generic EFI stub cleanups, to improve command line handling, file I/O, memory allocation, etc. - Introduce a generic initrd loading method based on calling back into the firmware, instead of relying on the x86 EFI handover protocol or device tree. - Introduce a mixed mode boot method that does not rely on the x86 EFI handover protocol either, and could potentially be adopted by other architectures (if another one ever surfaces where one execution mode is a superset of another) - Clean up the contents of 'struct efi', and move out everything that doesn't need to be stored there. - Incorporate support for UEFI spec v2.8A changes that permit firmware implementations to return EFI_UNSUPPORTED from UEFI runtime services at OS runtime, and expose a mask of which ones are supported or unsupported via a configuration table. - Partial fix for the lack of by-VA cache maintenance in the decompressor on 32-bit ARM. - Changes to load device firmware from EFI boot service memory regions - Various documentation updates and minor code cleanups and fixes" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (114 commits) efi/libstub/arm: Fix spurious message that an initrd was loaded efi/libstub/arm64: Avoid image_base value from efi_loaded_image partitions/efi: Fix partition name parsing in GUID partition entry efi/x86: Fix cast of image argument efi/libstub/x86: Use ULONG_MAX as upper bound for all allocations efi: Fix a mistype in comments mentioning efivar_entry_iter_begin() efi/libstub: Avoid linking libstub/lib-ksyms.o into vmlinux efi/x86: Preserve %ebx correctly in efi_set_virtual_address_map() efi/x86: Ignore the memory attributes table on i386 efi/x86: Don't relocate the kernel unless necessary efi/x86: Remove extra headroom for setup block efi/x86: Add kernel preferred address to PE header efi/x86: Decompress at start of PE image load address x86/boot/compressed/32: Save the output address instead of recalculating it efi/libstub/x86: Deal with exit() boot service returning x86/boot: Use unsigned comparison for addresses efi/x86: Avoid using code32_start efi/x86: Make efi32_pe_entry() more readable efi/x86: Respect 32-bit ABI in efi32_pe_entry() efi/x86: Annotate the LOADED_IMAGE_PROTOCOL_GUID with SYM_DATA ...
2020-03-30Merge tag 'pnp-5.7-rc1' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull PNP subsystem updates from Rafael Wysocki: - Update MAINTAINERS to cover include/linux/pnp.h and add the linux-acpi list to the PNP entry in it - add the const modifier to the name field definition in struct pnp_driver - drop a pointer case in the RTC CMOS driver that has become redundant All by Corentin Labbe. * tag 'pnp-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: MAINTAINERS: Add linux-acpi list to PNP rtc: cmos: remove useless cast for driver_name PNP: constify driver name PNP: add missing include/linux/pnp.h to MAINTAINERS
2020-03-29rtc: imx-sc: Align imx sc msg structs to 4Leonard Crestez1-1/+1
The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y. Fix by marking with __aligned(4). Fixes: a3094fc1a15e ("rtc: imx-sc: add rtc alarm support") Signed-off-by: Leonard Crestez <[email protected]> Link: https://lore.kernel.org/r/13404bac8360852d86c61fad5ae5f0c91ffc4cb6.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-29rtc: fsl-ftm-alarm: report alarm to coreBiwen Li1-0/+2
Report interrupt state to the RTC core. Signed-off-by: Biwen Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-27rtc: rc5t619: Add Ricoh RC5T619 RTC driverAndreas Kemnade3-0/+455
Add an RTC driver for the RTC device on Ricoh MFD RC5T619, which is implemented as a variant of RN5T618. rtc-range output: Testing 2000-02-28 23:59:59. OK Testing 2038-01-19 03:14:07. OK Testing 2069-12-31 23:59:59. OK Testing 2099-12-31 23:59:59. KO RTC_RD_TIME returned 22 (line 138) Testing 2100-02-28 23:59:59. KO RTC_SET_TIME returned 34 (line 122) Testing 2106-02-07 06:28:15. KO RTC_SET_TIME returned 34 (line 122) Testing 2262-04-11 23:47:16. KO RTC_SET_TIME returned 34 (line 122) Signed-off-by: Andreas Kemnade <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2020-03-26rtc: pcf85063: Add pcf85063 clkout control to common clock frameworkMichael McCormick1-0/+157
The PCF85063 has a configurable clock output signal. Add support for it using in the CCF. Signed-off-by: Michael McCormick <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-24rtc: class: avoid unnecessary lookup in hctosysAlexandre Belloni1-14/+2
rtc_hctosys is only called when the relevant RTC is found, avoid looking it up while we already have a pinter to the proper struct rtc_device. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-24rtc: jz4740: Rename vendor-specific DT propertiesPaul Cercueil1-2/+3
These properties are never set anywhere within any of the upstream devicetree files, so I assume I'm not breaking the ABI with this change. Rename vendor-specific DT properties to have the 'ingenic,' prefix, which they should have had from the start. Signed-off-by: Paul Cercueil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-24rtc: jz4740: Add support for JZ4760 SoCPaul Cercueil1-1/+3
The WENR feature (set a magic value to enable RTC registers read-write) first appeared on the JZ4760; the JZ4780 came much later. Since it would be dangerous to specify a newer SoC's compatible string as the fallback of an older SoC's compatible string, we add support for the "ingenic,jz4760-rtc" compatible string in the driver. This will permit to support the JZ4770 by having: compatible = "ingenic,jz4770-rtc", "ingenic,jz4760-rtc"; Instead of doing: compatible = "ingenic,jz4770-rtc", "ingenic,jz4780-rtc"; Signed-off-by: Paul Cercueil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-23rtc: class: support hctosys from modular RTC driversSteve Muckle4-73/+61
Due to distribution constraints it may not be possible to statically compile the required RTC driver into the kernel. Expand RTC_HCTOSYS support to cover all RTC devices (statically compiled or not) by checking at the end of RTC device registration whether the time should be synced. Signed-off-by: Steve Muckle <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-23rtc: pm8xxx: clear alarm register when alarm is not enabled韩科才1-0/+11
Clear alarm register when alarm is not enabled otherwise the consumer may still start alarm timer if it find the alarm register is not zero. Signed-off-by: hankecai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-23rtc: omap: drop unused dt-bindings headerUwe Kleine-König1-1/+0
The definitons in the dt-binding's gpio header only contains some constants to be used in device trees. It is not relevant for rtc-omap (as the gpio API hides the details) and in fact unused so it can just be dropped. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-23rtc: bd70528: Avoid double error messaging when IRQ absentKeyur Patel1-3/+1
Since the commit 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()") platform_get_irq() started issuing an error message. Thus, there is no need to have the same in the driver. Signed-off-by: Keyur Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-23rtc: max8907: add missing select REGMAP_IRQCorentin Labbe1-0/+1
I have hit the following build error: armv7a-hardfloat-linux-gnueabi-ld: drivers/rtc/rtc-max8907.o: in function `max8907_rtc_probe': rtc-max8907.c:(.text+0x400): undefined reference to `regmap_irq_get_virq' max8907 should select REGMAP_IRQ Fixes: 94c01ab6d7544 ("rtc: add MAX8907 RTC driver") Cc: stable <[email protected]> Signed-off-by: Corentin Labbe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-23rtc: fsl-ftm-alarm: enable acpi supportPeng Ma1-6/+15
This patch enables ACPI support in Rtc Flex timer driver. Signed-off-by: Peng Ma <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-22rtc: mxc: Use devm_add_action_or_reset() for calls to clk_disable_unprepare()Anson Huang1-27/+19
Use devm_add_action_or_reset() for calls to clk_disable_unprepare(), which can simplify the error handling, and .remove callback can be dropped. Signed-off-by: Anson Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-22rtc: ds1307: handle oscillator failure flags for ds1388 variantChris Packham1-0/+9
The FLAG register is at a different location to the other supported RTCs so this requires an extra case in the existing switch statement. Signed-off-by: Chris Packham <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-19rtc: max8907: add missing select REGMAP_IRQCorentin Labbe1-0/+1
I have hit the following build error: armv7a-hardfloat-linux-gnueabi-ld: drivers/rtc/rtc-max8907.o: in function `max8907_rtc_probe': rtc-max8907.c:(.text+0x400): undefined reference to `regmap_irq_get_virq' max8907 should select REGMAP_IRQ Fixes: 94c01ab6d7544 ("rtc: add MAX8907 RTC driver") Cc: stable <[email protected]> Signed-off-by: Corentin Labbe <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2020-03-17rtc: cmos: remove useless cast for driver_nameCorentin Labbe1-1/+1
Now the pnp_driver name is "const char *", there are no need to cast driver_name. Signed-off-by: Corentin Labbe <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-03-17rtc: mt2712: fix build without PM_SLEEPAlexandre Belloni1-0/+2
Fix this build error when PM_SLEEP is not selected: drivers/rtc/rtc-mt2712.c:412:10: error: ‘mt2712_pm_ops’ undeclared here (not in a function); did you mean ‘mt2712_rtc_ops’? 412 | .pm = &mt2712_pm_ops, | ^~~~~~~~~~~~~ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: 88pm860x: remove platform data supportAlexandre Belloni1-10/+1
There is no users of the rtc platform data left, remove its support. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: 88pm860x: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-4/+4
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: 88pm860x: stop mangling alarm timeAlexandre Belloni1-40/+1
The RTC core always passes a valid alarm time there is no need to modify it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: 88pm860x: set rangeAlexandre Belloni1-0/+1
The 88pm860x RTC is a 32bit read only seconds counter with a 32bit offset. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: 88pm860x: stop calling unused callbackAlexandre Belloni1-17/+1
pdata->sync is not defined by any platform, stop calling it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: 88pm860x: stop setting a default timeAlexandre Belloni1-13/+0
It doesn't make sense to set the RTC to a default value at probe time. Let the core handle invalid date and time. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: 88pm860x: fix possible race conditionAlexandre Belloni1-6/+8
The RTC IRQ is requested before the struct rtc_device is allocated, this may lead to a NULL pointer dereference in the IRQ handler. To fix this issue, allocating the rtc_device struct before requesting the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device to register the RTC device. Also remove the unnecessary error message as the core already prints the info. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: snvs: Use devm_add_action_or_reset() for calls to clk_disable_unprepare()Anson Huang1-14/+13
Use devm_add_action_or_reset() for calls to clk_disable_unprepare(), which can simplify the error handling. Signed-off-by: Anson Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: add support for the MediaTek MT2712 RTCRan Bi3-0/+432
This add support for the MediaTek MT2712 RTC. It was SoC based RTC, but had different architecture compared with MT7622 RTC. Signed-off-by: Ran Bi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: m48t35: remove SGI-IP27 kludgeThomas Bogendoerfer1-6/+1
With the IOC3 MFD driver it's no longer necessary to special case SGI-IP27. Signed-off-by: Thomas Bogendoerfer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: sun6i: Make external 32k oscillator optionalJernej Skrabec1-8/+8
Some boards, like OrangePi PC2 (H5), OrangePi Plus 2E (H3) and Tanix TX6 (H6) don't have external 32kHz oscillator. Till H6, it didn't really matter if external oscillator was enabled because HW detected error and fall back to internal one. H6 has same functionality but it's the first SoC which have "auto switch bypass" bit documented and always enabled in driver. This prevents RTC to work correctly if external crystal is not present on board. There are other side effects - all peripherals which depends on this clock also don't work (HDMI CEC for example). Make clocks property optional. If it is present, select external oscillator. If not, stay on internal. Signed-off-by: Jernej Skrabec <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: puv3: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-9/+4
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: puv3: set rangeAlexandre Belloni1-0/+1
This RTC is a 32bit seconds counter. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: ab8500: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-5/+5
Call the 64bit versions of rtc_tm time conversion. Acked-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-20/+7
Call the 64bit versions of rtc_tm time conversion to allow extending support after 2106 and properly supporting the STv2 range. Acked-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: pl031: set rangeAlexandre Belloni1-0/+8
The PL031 and ST v1 RTC are 32bit seconds counters. STv2 is a BCD RTC apparently going from 0000 to 9999, hopefully handling the leap days properly until then. Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: pl031: remove useless invalid alarm handlingAlexandre Belloni1-16/+8
The core will never pass an invalid alarm to .set_alarm, it is not necessary to check for its validity. Acked-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: fsl-ftm-alarm: allow COMPILE_TESTAlexandre Belloni1-1/+1
Allow building building the driver with COMPILE_TEST. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: mpc5121: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-5/+3
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: mpc5121: set rangeAlexandre Belloni1-0/+9
The datasheet states that 4052 is the maximum value for year. However, the mpc5121 read_time and set_time function abuse the target time register instead of using the broken down time so it is limited to 2106. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: mpc5121: convert to devm_rtc_allocate_deviceAlexandre Belloni1-10/+12
This simplifies the path for the rtc_ops selection. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: mpc5121: simplify probeAlexandre Belloni1-14/+8
Use devm managed function to simplify probe and remove. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: pm8xxx: stop validating valid alarm timeAlexandre Belloni1-6/+0
rtc_time64_to_tm never generates an invalid rtc_tm, stop validating it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: pm8xxx: : switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-4/+4
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: pm8xxx: set rangeAlexandre Belloni1-0/+1
The pm8xxx are 32bit seconds counter. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>