- 01 9月, 2016 1 次提交
-
-
由 Christophe JAILLET 提交于
It is likely that checking the result of 'pcf2123_write_reg' is expected here. Also fix a small style issue. The '{' at the beginning of the function is misplaced. Fixes: 809b453b ("rtc: pcf2123: clean up writes to the rtc chip") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 08 8月, 2016 2 次提交
-
-
由 Chen-Yu Tsai 提交于
The AC100's RTC side has 3 clock outputs on external pins, which can provide a clock signal to the SoC or other modules, such as WiFi or GSM modules. Support this with a custom clk driver integrated with the rtc driver. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Chen-Yu Tsai 提交于
X-Powers AC100 is a codec / RTC combo chip. This driver supports the RTC sub-device. The RTC block also has clock outputs and non-volatile storage. Non-volatile storage wthin the RTC hardware is not supported. Clock output support is added in the next patch. Signed-off-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 28 7月, 2016 6 次提交
-
-
由 Benoît Thébaudeau 提交于
V1F indicates that the time accuracy may have been compromised because of a voltage drop (possibly only temporary) below VLOW1, which stops the temperature compensation. When the time is set, the accuracy is restored, so V1F should be cleared in order to indicate this and to be able to detect the next temperature compensation loss. This is the same principle as for V2F, which is cleared when the time is set to indicate that the time is no longer invalid and to be able to detect the next data loss. Signed-off-by: NBenoît Thébaudeau <benoit@wsystem.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Benoît Thébaudeau 提交于
According to the application manual of the RX8900, the RESET bit must be set to 1 to prevent a timer update while setting the time. This also resets the subsecond counter. The application manual of the RV-8803 does not mention such a requirement, and it says that the 100th Seconds register is cleared when writing to the Seconds register, but using the RESET bit for the RV-8803 too should not be an issue and is probably safer. This change also ensures that the RESET bit is initialized properly in all cases. Indeed, all the registers must be initialized if the voltage has been lower than VLOW2 (triggering V2F), but not low enough to trigger a POR. Signed-off-by: NBenoît Thébaudeau <benoit@wsystem.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Benoît Thébaudeau 提交于
The I²C NACK issue of the RV-8803 may occur after any I²C START condition, depending on the timings. Consequently, the workaround must be applied for all the I²C transfers. This commit abstracts the I²C transfer code into register access functions. This avoids duplicating the I²C workaround everywhere. This also avoids the duplication of the code handling the return value of i2c_smbus_read_i2c_block_data(). Error messages are issued in case of definitive register access failures (if the workaround fails). This change also makes the I²C transfer return value checks consistent. Signed-off-by: NBenoît Thébaudeau <benoit@wsystem.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Benoît Thébaudeau 提交于
The Weekday register is encoded as 2^tm_wday, with tm_wday in 0..6, so using tm_wday = ffs(reg) to fill tm_wday from the register value is wrong because this gives the expected value + 1. This could be fixed as tm_wday = ffs(reg) - 1, but tm_wday = ilog2(reg) works as well and is more direct. Signed-off-by: NBenoît Thébaudeau <benoit@wsystem.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Benoît Thébaudeau 提交于
The RTC core always calls rtc_valid_tm() after ->read_time() in case of success (in __rtc_read_time()), so do not call it twice. Signed-off-by: NBenoît Thébaudeau <benoit@wsystem.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Benoît Thébaudeau 提交于
This driver supports the Epson RX8900, but this was not indicated in Kconfig. Signed-off-by: NBenoît Thébaudeau <benoit@wsystem.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 27 7月, 2016 1 次提交
-
-
由 Wei Yongjun 提交于
Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 26 7月, 2016 1 次提交
-
-
由 Wei Yongjun 提交于
The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 22 7月, 2016 2 次提交
-
-
由 Stefan Christ 提交于
Allow the alarm IRQ of RTC to be used as a wakeup source for the system suspend. Signed-off-by: NStefan Christ <s.christ@phytec.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Stefan Christ 提交于
It should be a real error message, when the driver cannot enable the IRQ of the device. Signed-off-by: NStefan Christ <s.christ@phytec.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 20 7月, 2016 4 次提交
-
-
由 Chris DeBruin 提交于
The current rtc-pcf85063 driver only supports the PCF85063TP device. Using the existing driver on a PCF85063A will result in the time being set correctly into the RTC, but the RTC is held in the stopped state. Therefore, the time will no longer advance and no error is indicated. The PCF85063A device has a bigger memory map than the PCF85063TP. The existing driver make use of an address rollover condition, but the rollover point is different in the two devices. Signed-off-by: NChris DeBruin <cdeb5783@gmail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Alexandre Belloni 提交于
The year range is not validated properly As the driver has been mainlined in 2014, it is not an issue to stop handling dates between 1970 and 2000 with the benefit of handling dates up to 2100. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
Set .tm_sec to 0 instead of -1 to signal minute accuracy. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
Since all time members of the alarm data is initialized to -1 the drivers are responsible to set the tm_sec member to 0. Fixes: d68778b8 ("rtc: initialize output parameter for read alarm to "uninitialized"") Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 19 7月, 2016 4 次提交
-
-
由 Alim Akhtar 提交于
As per code flow s3c_rtc_setfreq() will get called with rtc clock disabled and in set_freq we perform h/w registers read/write, which results in a kernel crash on exynos7 platform while probing rtc driver. Below is code flow: s3c_rtc_probe() clk_prepare_enable(info->rtc_clk) // rtc clock enabled s3c_rtc_gettime() // will enable clk if not done, and disable it upon exit s3c_rtc_setfreq() //then this will be called with clk disabled This patch take cares of such issue by adding s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq(). Fixes: 24e14554 ("drivers/rtc/rtc-s3c.c: delete duplicate clock control") Cc: <stable@vger.kernel.org> Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: NPankaj Dubey <pankaj.dubey@samsung.com> Tested-by: NPankaj Dubey <pankaj.dubey@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Alim Akhtar 提交于
At the end of s3c_rtc_probe(), s3c_rtc_disable_clk() being called with rtc clock already disabled (by s3c_rtc_gettime()), which looks extra and unnecessary call. Lets clean it up. Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: NPankaj Dubey <pankaj.dubey@samsung.com> Tested-by: NPankaj Dubey <pankaj.dubey@samsung.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Sudip Mukherjee 提交于
If devm_add_action() fails we are explicitly calling the cleanup to free the resources allocated. Lets use the helper devm_add_action_or_reset() and return directly in case of error, as we know that the cleanup function has been already called by the helper if there was any error. Signed-off-by: NSudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Sudip Mukherjee 提交于
If devm_add_action() fails we are explicitly calling the cleanup to free the resources allocated. Lets use the helper devm_add_action_or_reset() and return directly in case of error, as we know that the cleanup function has been already called by the helper if there was any error. Signed-off-by: NSudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 12 7月, 2016 8 次提交
-
-
由 Uwe Kleine-König 提交于
Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
Be more explicit in some comments. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
On some QNAP NAS devices the rtc can wake the machine. Several people noticed that once the machine was woken this way it fails to shut down. That's because the driver fails to acknowledge the interrupt and so it keeps active and restarts the machine immediatly after shutdown. See https://bugs.debian.org/794266 for a bug report. Doing this correctly requires to interpret the INT2 flag of the first read of the STATUS1 register because this bit is cleared by read. Note this is not maximally robust though because a pending irq isn't detected when the STATUS1 register was already read (and so INT2 is not set) but the irq was not disabled. But that is a hardware imposed problem that cannot easily be fixed by software. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
There were two deviations from the reference manual: you have to wait half a second when POC is active and you might have to repeat initialization when POC or BLD are still set after the sequence. Note however that as POC and BLD are cleared by read the driver might not be able to detect that a reset is necessary. I don't have a good idea how to fix this. Additionally report the value read from STATUS1 to the caller. This prepares the next patch. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
There are several issues fixed in this patch: - When alarm isn't enabled, set .enabled to zero instead of returning -EINVAL. - Ignore how IRQ1 is configured when determining if IRQ2 is on. - The three alarm registers have an enable flag which must be evaluated. - The chip always triggers when the seconds register gets 0. Note that the rtc framework however doesn't handle the result correctly because it doesn't check wday being initialized and so interprets an alarm being set for 10:00 AM in three days as 10:00 AM tomorrow (or today if that's not over yet). Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
The rtc core doesn't give broken dates to a driver's .set_alarm callback, so there should be no need for validation. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
This rtc doesn't support triggering on years, so don't assign tm_year instead of claiming the alarm is to trigger in year 67435. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Uwe Kleine-König 提交于
The rtc chip doesn't support triggering on month and year. So just don't assign the respective fields in .read_alarm and let the rtc core interpret this accordingly. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 09 7月, 2016 3 次提交
-
-
由 Uwe Kleine-König 提交于
Since commit d68778b8 ("rtc: initialize output parameter for read alarm to "uninitialized"") there is no need to explicitly set unsupported members to -1. So drop the respective assignments from drivers. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Keerthy 提交于
The reset value of weekday is 0x1. This is wrong since the reset values of the day/month/year make up to Jan 1 2001. When computed weekday comes out to be Monday. On a scale of 1-7(Sunday - Saturday) it should be 0x2. So we should not be relying on the reset value. Hence compute the wday using the current date/month/year values. Check if reset wday is any different from the computed wday, If different then set the wday which we computed using date/month/year values. Document Referred: http://ww1.microchip.com/downloads/en/DeviceDoc/20002266F.pdf Fixes: 1d1945d2 "drivers/rtc/rtc-ds1307.c: add alarm support for mcp7941x chips" Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Alexandre Belloni 提交于
rtc-v3020.h belongs to include/linux/platform_data/ Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 08 7月, 2016 1 次提交
-
-
由 Alexandre Belloni 提交于
Move ds1286.h to rtc specific folder. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 29 6月, 2016 1 次提交
-
-
由 Suraj Jitindar Singh 提交于
An opal_msg of type OPAL_MSG_ASYNC_COMP contains the return code in the params[1] struct member. However this isn't intuitive or obvious when reading the code and requires that a user look at the skiboot documentation or opal-api.h to verify this. Add an inline function to get the return code from an opal_msg and update call sites accordingly. Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com> Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
-
- 28 6月, 2016 1 次提交
-
-
由 Alexandre Belloni 提交于
m48t86.h belongs to include/linux/platform_data/ Acked-by: NJason Cooper <jason@lakedaemon.net> Acked-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: NAlexander Clouter <alex@digriz.org.uk> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 27 6月, 2016 1 次提交
-
-
由 Alexandre Belloni 提交于
rtc-ds2404.h belongs to include/linux/platform_data/ Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 26 6月, 2016 3 次提交
-
-
由 Alexandre Belloni 提交于
The previous workaround may still fail as there are actually 4 retries to be done to ensure the communication succeed. Also, some I2C adapter drivers may return -EIO instead of -ENXIO. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Arnd Bergmann 提交于
The mc146818_get_time/mc146818_set_time functions are rather large inline functions in a global header file and are used in several drivers and in x86 specific code. Here we move them into a separate .c file that is compiled whenever any of the users require it. This also lets us remove the linux/acpi.h header inclusion from mc146818rtc.h, which in turn avoids some warnings about duplicate definition of the TRUE/FALSE macros. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
由 Arnd Bergmann 提交于
nn10300 has a dependency on mc146818_get_time/mc146818_set_time, which we want to move from the mc146818rtc.h header into the rtc subsystem, which in turn is not usable on mn10300. This changes mn10300 to use the modern rtc-cmos driver instead of the old RTC driver, and that in turn lets us completely remove the read_persistent_clock/update_persistent_clock callbacks. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-
- 06 6月, 2016 1 次提交
-
-
由 Alexander Graf 提交于
While the EFI spec mandates an RTC, not every implementation actually adheres to that rule (or can adhere to it - some systems just don't have an RTC). For those, we really don't want to probe the EFI RTC driver at all, because if we do we'd get a non-functional driver that does nothing useful but only spills our kernel log with warnings. Signed-off-by: NAlexander Graf <agraf@suse.de> Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
-