- 24 Jun, 2015 30 commits
-
-
Heiko Stübner authored
Sometimes the irq line is not connected to any soc-pin. This does not hinder basic timekeeping functionality of the rtc, so probe should not fail in this case. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
kbuild test robot authored
Use resource_size function on resource object instead of explicit computation. No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
The driver can't accommodate the 12 hour mode but the error message states that the 24 hour mode is not supported. Also fix the typos (hour vs hours). Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
Use bit instead of hand coding the shift and correct the 24 hour vs 24 hours typo. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Ard Biesheuvel authored
The rtc-efi driver declares that the EFI 'epoch' is 1/1/1998, but the UEFI spec does not define it at all. It does define a range of [1900, 9999] for the 'Year' member of the EFI_TIME struct, so let's use 1900 as the minimum year and not 1998. Also, move the validation of the year to the convert_from_efi_time() routine where all other EFI_TIME fields are validated as well. This prevents rtc_read_time() failures when the RTC that backs the EFI time services is set to a date before 1998, e.g., when it has lost power. This also optimizes the compute_wday() routine, by replacing the for loop with a simple arithmetic expression, and by reusing the yearday value that we need to compute anyway when populating the rtc_time::tm_yday field. Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: rtc-linux@googlegroups.com Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Xunlei Pang authored
Now rtc_set_mmss() has no users, just remove it. We still have rtc_set_time() doing similar things. Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Xunlei Pang authored
On Sparc systems, update_persistent_clock() uses RTC drivers to do the job, it makes more sense to hand it over to CONFIG_RTC_SYSTOHC. In the long run, all the update_persistent_clock() should migrate to proper class RTC drivers if any and use CONFIG_RTC_SYSTOHC instead. Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Xunlei Pang authored
Currently, CONFIG_RTC_SYSTOHC uses CONFIG_RTC_HCTOSYS_DEVICE which is originally used by CONFIG_RTC_HCTOSYS, but this rtc device has some limiations, for example, it must be battery-backed, be able to work with irq off and through system suspension, etc. So add CONFIG_RTC_SYSTOHC_DEVICE used exclusively for CONFIG_RTC_SYSTOHC, it is more lenient compared to CONFIG_RTC_HCTOSYS_DEVICE, and could be assigned any available RTC in the system. Default value is CONFIG_RTC_HCTOSYS_DEVICE which is "rtc0" by default. After this patch, NTP will sync up "rtc0" by default. Cc: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Xunlei Pang authored
sunxi_rtc_setalarm() uses deprecated rtc_tm_to_time(), which will overflow in year 2106 on 32-bit machines. This patch solves this by: - Replacing rtc_tm_to_time() with rtc_tm_sub() Also remove the unnecessary initial zeroing of some local variables in sunxi_rtc_setalarm(). Cc: Carlo Caione <carlo.caione@gmail.com> Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Xunlei Pang authored
isl1208_i2c_set_alarm() uses deprecated rtc_tm_to_time(), which will overflow in year 2106 on 32-bit machines. This patch solves this by: - Replacing rtc_tm_to_time() with rtc_tm_sub() Cc: Herbert Valerio Riedel <hvr@gnu.org> Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Xunlei Pang authored
There're many sites need comparing the two rtc_time variants for many rtc drivers, especially in the instances of rtc_class_ops::set_alarm(). So add this common helper function to make things easy. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Xunlei Pang authored
pcf8563_rtc_set_alarm() uses deprecated rtc_tm_to_time() and rtc_time_to_tm(), which will overflow in year 2106 on 32-bit machines. This patch solves this by: - Replacing rtc_time_to_tm() with rtc_time64_to_tm() - Replacing rtc_tm_to_time() with rtc_tm_to_time64() Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Laxman Dewangan authored
Initialise the variable high_bb_charging before using it to avoid configuring wrong value and fix following compilation warning: /* rtc-palmas.c: In function ‘palmas_rtc_probe’: rtc-palmas.c:242:7: warning: ‘high_bb_charging’ may be used uninitialized in this function */ Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Julia Lawall authored
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> [viresh.kumar@linaro.org: acked rtc-spear] Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Jan Kardell authored
Return -EINVAL if the voltage low bit is set to avoid getting a bogus time at boot. There was a comment stating that util-linux hwclock refuses to set a new time if we return an error code on read, but at least the current version do set the time as expected. Remove the comment and the check for valid time, and let the rtc core check it for us. Signed-off-by: Jan Kardell <jan.kardell@telliq.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Hans Ulli Kroll authored
Driver for the on chip RTC found on Cortina's SoC Gemini. Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> [alexandre.belloni@free-electrons.com: use devm_request_irq() and remove useless goto] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
rtc-stmp3xxx depends on lib/stmp_device, select it. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Stefan Agner authored
When entering suspend while an wakeup alarm is set, enable_set_wake should make sure that the RTC interrupt keep being enabled and the .irq_set_wake for the RTC interrupt get called. However, since the driver uses the suspend_noirq callback, the call to enable_irq_wake has been made after disabling the interrupts. While .irq_set_wake has been called properly, the interrupt remained disabled. Use the suspend callback to call enable_irq_wake early enough to ensure the RTC interrupt remains enabled. Fixes: 7654e9d4 ("drivers/rtc/rtc-snvs: fix suspend/resume") Cc: <stable@vger.kernel.org> # 3.19 Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Jingoo Han authored
Using gpio_request_array()/gpio_free_array() can make the code simpler because it can set the direction and initial value in one shot and the for loop is unnecessary. Also, struct v3020_gpio is removed, because the struct v3020_gpio is replaced with struct gpio. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
H Hartley Sweeten authored
Drivers should not be using the __raw_* io accessors. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Javier Martinez Canillas authored
If the rtc-max77802 driver is built as a module, modalias information is not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE() macro to export the platform ID table so the module contains that data. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Javier Martinez Canillas authored
If the rtc-max77686 driver is built as a module, modalias information is not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE() macro to export the platform ID table so the module contains that data. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Axel Lin authored
The device table is required to load modules based on modaliases. After adding MODULE_DEVICE_TABLE, below entries will be added to modules.alias: alias i2c:ds1672 rtc_ds1672 alias i2c:max6900 rtc_max6900 alias platform:lp3974-rtc rtc_max8998 alias platform:max8998-rtc rtc_max8998 Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Dale Farnsworth <dale@farnsworth.org> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
On some !ARM 32bits platforms, the following compilation error happens because of the division on a 64bits value in mtk_rtc_read_time(): drivers/built-in.o: In function `mtk_rtc_read_time': rtc-mt6397.c:(.text+0x265d13f): undefined reference to `__divdi3' rtc-mt6397.c:(.text+0x265d150): undefined reference to `__moddi3' Use div_s64() as done in rtc_time64_to_tm() to solve that. Reported-by: kbuild test robot <fengguang.wu@intel.com> Acked-by: Eddie Huang <eddie.huang@mediatek.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Rasmus Villemoes authored
According to C99, %2.s means 'print two spaces' (a precision of . without following digits or * means 0). The kernel's printf implementation, however, treats that case as if no precision was given, but relying on that quirk is rather silly. Also, since no - (aka left-justify) flag is given, the field with of 2 would then cause the alarm->enabled case to come out as "o n". Deobfuscate it. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Eddie Huang authored
Add Mediatek RTC driver to maintainer entry. Signed-off-by: Eddie Huang <eddie.huang@mediatek.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Tianping Fang authored
Add Mediatek MT6397 RTC driver Signed-off-by: Tianping Fang <tianping.fang@mediatek.com> Signed-off-by: Eddie Huang <eddie.huang@mediatek.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Eddie Huang authored
Provide MT6397 RTC interrupt, base address, and register in MT6397 MFD. Signed-off-by: Eddie Huang <eddie.huang@mediatek.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Jean Delvare authored
The rtc-xgene driver is only useful on X-Gene SoC. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Iyappan Subramanian <isubramanian@apm.com> Cc: Keyur Chudgar <kchudgar@apm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Hans-Christian Egtvedt authored
This patch updates the email address of the rtc-at32ap700x driver supported by me to an email account I will use on a more regular basis in the future. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 19 Jun, 2015 10 commits
-
-
Juergen Borleis authored
If the DryICE unit is locked it is impossible to set the time. Provide an error message for this case. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Robert Schwebel <rsc@pengutronix.de> [rsc: got NDA clearance from Freescale] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Juergen Borleis authored
Maybe the unit enters the hardware related state at runtime and not at system boot time (after a power cycle). Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Robert Schwebel <rsc@pengutronix.de> [rsc: got NDA clearance from Freescale] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Juergen Borleis authored
This code is required to recover the unit from a security violation. Hopefully this code can recover the unit from a hardware related invalid state as well. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Robert Schwebel <rsc@pengutronix.de> [rsc: got NDA clearance from Freescale] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Juergen Borleis authored
Document the i.MX DryIce machine states. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Robert Schwebel <rsc@pengutronix.de> [rsc: got NDA clearance from Freescale] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Juergen Borleis authored
Be independent of the endianness of the kernel. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Krzysztof Kozlowski authored
There are now no differences between RTC on Exynos3250 and S3C6410. Merge everything into one so duplicated code could be removed. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Krzysztof Kozlowski authored
The rtc_timer_cancel() always returns 0 and cannot fail (calls only other void-returning functions). Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Krzysztof Kozlowski authored
Fix issues reported by checkpatch: ERROR: open brace '{' following struct go on the same line ERROR: "foo* bar" should be "foo *bar" Additionally adjust alignment of wrapped function arguments. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Krzysztof Kozlowski authored
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Krzysztof Kozlowski authored
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-