- 25 3月, 2022 4 次提交
-
-
由 Clément Léger 提交于
This drivers allows to communicate with a RTC PTA handled by OP-TEE [1]. This PTA allows to query RTC information, set/get time and set/get offset depending on the supported features. [1] https://github.com/OP-TEE/optee_os/pull/5179Signed-off-by: NClément Léger <clement.leger@bootlin.com> Reviewed-by: NJens Wiklander <jens.wiklander@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220308133505.471601-1-clement.leger@bootlin.com
-
由 Loic Poulain 提交于
Having !allow_set_time is equivalent to non-implemented set_time function, which is normally represented with -ENODEV error in RTC subsystem. Today we are returning -EACCES error code, which is not considered by RTC clients as a 'non implemented' feature, and which causes NTP to retry hw clk sync (update_rtc) indefinitely. Signed-off-by: NLoic Poulain <loic.poulain@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1645090578-20734-1-git-send-email-loic.poulain@linaro.org
-
由 Loic Poulain 提交于
Attach the interrupt as a wake-irq to the device, so that: - A corresponding wakeup source is created (and reported in e.g /sys/kernel/debug/wakeup_sources). - The power subsystem take cares of arming/disarming irq-wake automatically on suspend/resume. Signed-off-by: NLoic Poulain <loic.poulain@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1645025082-6138-1-git-send-email-loic.poulain@linaro.org
-
由 Alexandre Belloni 提交于
This solves: >> drivers/clk/sunxi-ng/ccu-sun6i-rtc.c:334:5: warning: no previous prototype for 'sun6i_rtc_ccu_probe' [-Wmissing-prototypes] 334 | int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg) | ^~~~~~~~~~~~~~~~~~~ Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NJernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20220320210905.6606-1-alexandre.belloni@bootlin.com
-
- 24 3月, 2022 36 次提交
-
-
由 Alexandre Belloni 提交于
uie_unsupported is not used by any drivers anymore, remove it. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-29-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Remove bogus use of uie_unsupported. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-28-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-27-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Set RTC_FEATURE_ALARM_RES_MINUTE, so the core knows alarms have a resolution of a minute. Also, the core will properly round down the alarm instead of up. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-26-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Switch to devm_rtc_allocate_device/devm_rtc_register_device, this allows for further improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-25-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Also the driver doesn't supports UIE because it doesn't handle interrupts so set RTC_FEATURE_ALARM_WAKEUP_ONLY,. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-24-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Switch to devm_rtc_allocate_device/devm_rtc_register_device, this allows for further improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-23-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Some RTCs have an IRQ pin that is not connected to a CPU interrupt but rather directly to a PMIC or power supply. In that case, it is still useful to be able to set alarms but we shouldn't expect interrupts. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-22-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
The reference manual doesn't specify whether the registers are latched and they probably aren't, ensure the read time and date are consistent. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Link: https://lore.kernel.org/r/20220309162301.61679-21-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Since commitc9f5c7e7 ("rtc: rtc-spear: Provide flag for no support of UIE mode") which was in 2012, the core changed a lot and UIE are now supported using regular alarms. Drop uie_unsupported now to reflect that. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Link: https://lore.kernel.org/r/20220309162301.61679-20-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
While the RTC can store dates from year 0000 to 9999, leap years where not tested fro 2100. The driver currently stores tm_year directly which will probably fail at that time or more probably in 2300. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Link: https://lore.kernel.org/r/20220309162301.61679-19-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Switch to devm_rtc_allocate_device/devm_rtc_register_device, this allows for further improvement of the driver. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Link: https://lore.kernel.org/r/20220309162301.61679-18-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-17-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Set RTC_FEATURE_ALARM_RES_MINUTE, so the core knows alarms have a resolution of a minute. Also, the core will properly round down the alarm instead of up. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-16-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Set RTC_FEATURE_ALARM_RES_MINUTE, so the core knows alarms have a resolution of a minute. Also, the core will properly round down the alarm instead of up. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-15-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-14-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
The PCF85063 doesn't support UIE because setting an alarm to fire every second confuses the chip and the fastest we can go is an alarm every 2 seconds. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-13-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-12-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
The PCF2127 doesn't support UIE because setting an alarm to fire every second confuses the chip and the fastest we can go is an alarm every 2 seconds. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-11-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-10-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Alarms have a resolution of a minute. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-9-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-8-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-7-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-6-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-5-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Set RTC_FEATURE_ALARM_RES_MINUTE, so the core knows alarms have a resolution of a minute. Also, the core will properly round down the alarm instead of up. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-4-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-3-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
No platforms are currently setting no_irq. Anyway, letting platform_get_irq fail is fine as this means that there is no IRQ. In that case, clear RTC_FEATURE_ALARM so the core knows there are no alarms. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-2-alexandre.belloni@bootlin.com
-
由 Alexandre Belloni 提交于
Stop using uie_unsupported and clear RTC_FEATURE_UPDATE_INTERRUPT instead. There is currently a missing information as to why this is not supported on ioc3. Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220309162301.61679-1-alexandre.belloni@bootlin.com
-
由 Samuel Holland 提交于
H6 supports IOSC calibration and an ext-osc32k input. Unlike newer SoCs, it has a single parent for its fanout clock. Add support for H6 in the CCU driver, replacing the support in the existing early OF clock provider. Signed-off-by: NSamuel Holland <samuel@sholland.org> Acked-by: NStephen Boyd <sboyd@kernel.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220203021736.13434-7-samuel@sholland.org
-
由 Samuel Holland 提交于
The RTC power domain in sun6i and newer SoCs manages the 16 MHz RC oscillator (called "IOSC" or "osc16M") and the optional 32 kHz crystal oscillator (called "LOSC" or "osc32k"). Starting with the H6, this power domain also handles the 24 MHz DCXO (called variously "HOSC", "dcxo24M", or "osc24M") as well. The H6 also adds a calibration circuit for IOSC. Later SoCs introduce further variations on the design: - H616 adds an additional mux for the 32 kHz fanout source. - R329 adds an additional mux for the RTC timekeeping clock, a clock for the SPI bus between power domains inside the RTC, and removes the IOSC calibration functionality. Take advantage of the CCU framework to handle this increased complexity. This driver is intended to be a drop-in replacement for the existing RTC clock provider. So some runtime adjustment of the clock parents is needed, both to handle hardware differences, and to support the old binding which omitted some of the input clocks. Signed-off-by: NSamuel Holland <samuel@sholland.org> Acked-by: NStephen Boyd <sboyd@kernel.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220203021736.13434-6-samuel@sholland.org
-
由 Samuel Holland 提交于
The muxes in the RTC can only be updated when setting a key field to a specific value. Add a feature flag to denote muxes with this property. Since so far the key value is always the same, it does not need to be provided separately for each mux. Signed-off-by: NSamuel Holland <samuel@sholland.org> Acked-by: NStephen Boyd <sboyd@kernel.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220203021736.13434-5-samuel@sholland.org
-
由 Jiasheng Jiang 提交于
As the potential failure of the wm8350_register_irq(), it should be better to check it and return error if fails. Also, it need not free 'wm_rtc->rtc' since it will be freed automatically. Fixes: 077eaf5b ("rtc: rtc-wm8350: add support for WM8350 RTC") Signed-off-by: NJiasheng Jiang <jiasheng@iscas.ac.cn> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220303085030.291793-1-jiasheng@iscas.ac.cn
-
由 Andre Przywara 提交于
The H616 RTC changes its day storage to the newly introduced linear day scheme, so pair the new compatible string with this feature flag. The RTC clock parts are handled in a separate driver now, so we skip the clock parts in this driver completely. Signed-off-by: NAndre Przywara <andre.przywara@arm.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220211122643.1343315-7-andre.przywara@arm.com
-
由 Andre Przywara 提交于
Newer versions of the Allwinner RTC, for instance as found in the H616 SoC, not only store the current day as a linear number, but also change the way the alarm is handled: There are now two registers, that explicitly store the wakeup time, in the same format as the current time. Add support for that variant by writing the requested wakeup time directly into the registers, instead of programming the seconds left, as the old SoCs required. Reviewed by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: NAndre Przywara <andre.przywara@arm.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220211122643.1343315-6-andre.przywara@arm.com
-
由 Andre Przywara 提交于
Newer versions of the Allwinner RTC, as for instance found in the H616 SoC, no longer store a broken-down day/month/year representation in the RTC_DAY_REG, but just a linear day number. The user manual does not give any indication about the expected epoch time of this day count, but the BSP kernel uses the UNIX epoch, which allows easy support due to existing conversion functions in the kernel. Allow tagging a compatible string with a flag, and use that to mark those new RTCs. Then convert between a UNIX day number (converted into seconds) and the broken-down day representation using mktime64() and time64_to_tm() in the set_time/get_time functions. That enables support for the RTC in those new chips. Signed-off-by: NAndre Przywara <andre.przywara@arm.com> Reviewed-by: NJernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220211122643.1343315-5-andre.przywara@arm.com
-