aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-08-31rtc: pic32: Delete owner assignmentMarkus Elfring1-1/+0
The field "owner" is set by core. Thus delete an extra initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31rtc: bq32k: Fix handling of oscillator failure flagJan Östlund1-5/+9
While the oscillator failure flag is set, the RTC registers should be considered invalid. bq32k_rtc_read_time() now returns an error instead of an invalid time. The failure flag is cleared the next time the clock is set. Signed-off-by: Jan Östlund <jao@hms.se> Signed-off-by: Daniel Romell <daro@hms.se> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31rtc: bq32k: Use correct mask name for 'minutes' register.Jan Östlund1-1/+1
The BQ32K_SECONDS_MASK and BQ32K_MINUTES_MASK both has the same value. This is no functional change. Signed-off-by: Jan Östlund <jao@hms.se> Signed-off-by: Daniel Romell <daro@hms.se> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31rtc: sysfs: fix a cast removing the const attributeLABBE Corentin1-2/+2
The char pointer buf_ptr is assigned an address from a const char pointer buf (parameter of wakealarm_store). The data pointer by buf_ptr is never modified. So casting it to a (char *) is useless. This patch remove this cast, and transform buf_ptr to a const char pointer. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31rtc: isl12057: remove driverAlexandre Belloni3-654/+0
The Intersil isl12057 is now supported by the ds1307 driver. Acked-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31rtc: ds1307: add Intersil ISL12057 supportAlexandre Belloni2-4/+10
Intersil ISL12057 is a drop-in replacement for DS1337. It can be supported by the ds1307 driver. Acked-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31rtc: ds1307: fix century bit supportAlexandre Belloni2-5/+57
Add an option to properly support the century bit of ds1337 and compatibles and ds1340. Because the driver had a bug until now, it is not possible to switch users to the fixed code directly as RTCs in the field will wrongly have the century bit set. Acked-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31rtc: pcf2123: Add missing error code assignment before testChristophe JAILLET1-2/+3
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: 809b453b76e15 ("rtc: pcf2123: clean up writes to the rtc chip") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31rtc: Kconfig: Name RK818 in Kconfig for RTC_DRV_RK808Wadim Egorov1-2/+2
The RK808 and RK818 PMICs are using a similar register map. We can reuse the rtc driver for the RK818 PMIC. So let's add the RK818 in the Kconfig description. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-08-31rtc: rtc-pm8xxx: Add support for pm8018 rtcNeil Armstrong1-0/+1
In order to support RTC on Qualcomm MDM9615 SoC, add support for the pm8018 rtc in rtc-pm8xxx driver. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-08-08rtc: ac100: Add clk output supportChen-Yu Tsai1-0/+302
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: Chen-Yu Tsai <wens@csie.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-08-08rtc: ac100: Add RTC driver for X-Powers AC100Chen-Yu Tsai3-0/+336
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: Chen-Yu Tsai <wens@csie.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-08-05Merge tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linuxLinus Torvalds39-373/+835
Pull RTC updates from Alexandre Belloni: "RTC for 4.8 Cleanups: - huge cleanup of rtc-generic and char/genrtc this allowed to cleanup rtc-cmos, rtc-sh, rtc-m68k, rtc-powerpc and rtc-parisc - move mn10300 to rtc-cmos Subsystem: - fix wakealarms after hibernate - multiples fixes for rctest - simplify implementations of .read_alarm New drivers: - Maxim MAX6916 Drivers: - ds1307: fix weekday - m41t80: add wakeup support - pcf85063: add support for PCF85063A variant - rv8803: extend i2c fix and other fixes - s35390a: fix alarm reading, this fixes instant reboot after shutdown for QNAP TS-41x - s3c: clock fixes" * tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (65 commits) rtc: rv8803: Clear V1F when setting the time rtc: rv8803: Stop the clock while setting the time rtc: rv8803: Always apply the I²C workaround rtc: rv8803: Fix read day of week rtc: rv8803: Remove the check for valid time rtc: rv8803: Kconfig: Indicate rx8900 support rtc: asm9260: remove .owner field for driver rtc: at91sam9: Fix missing spin_lock_init() rtc: m41t80: add suspend handlers for alarm IRQ rtc: m41t80: make it a real error message rtc: pcf85063: Add support for the PCF85063A device rtc: pcf85063: fix year range rtc: hym8563: in .read_alarm set .tm_sec to 0 to signal minute accuracy rtc: explicitly set tm_sec = 0 for drivers with minute accurancy rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq() rtc: s3c: Remove unnecessary call to disable already disabled clock rtc: abx80x: use devm_add_action_or_reset() rtc: m41t80: use devm_add_action_or_reset() rtc: fix a typo and reduce three empty lines to one rtc: s35390a: improve two comments in .set_alarm ...
2016-07-28rtc: rv8803: Clear V1F when setting the timeBenoît Thébaudeau1-1/+1
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: Benoît Thébaudeau <benoit@wsystem.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-28rtc: rv8803: Stop the clock while setting the timeBenoît Thébaudeau1-1/+17
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: Benoît Thébaudeau <benoit@wsystem.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-28rtc: rv8803: Always apply the I²C workaroundBenoît Thébaudeau1-66/+113
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: Benoît Thébaudeau <benoit@wsystem.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-28rtc: rv8803: Fix read day of weekBenoît Thébaudeau1-1/+2
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: Benoît Thébaudeau <benoit@wsystem.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-28rtc: rv8803: Remove the check for valid timeBenoît Thébaudeau1-1/+1
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: Benoît Thébaudeau <benoit@wsystem.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-28rtc: rv8803: Kconfig: Indicate rx8900 supportBenoît Thébaudeau1-3/+3
This driver supports the Epson RX8900, but this was not indicated in Kconfig. Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-27rtc: asm9260: remove .owner field for driverWei Yongjun1-1/+0
Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-26rtc: at91sam9: Fix missing spin_lock_init()Wei Yongjun1-0/+1
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: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-21rtc: m41t80: add suspend handlers for alarm IRQStefan Christ1-0/+25
Allow the alarm IRQ of RTC to be used as a wakeup source for the system suspend. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-21rtc: m41t80: make it a real error messageStefan Christ1-1/+1
It should be a real error message, when the driver cannot enable the IRQ of the device. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19rtc: pcf85063: Add support for the PCF85063A deviceChris DeBruin1-9/+38
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: Chris DeBruin <cdeb5783@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19rtc: pcf85063: fix year rangeAlexandre Belloni1-7/+5
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: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19rtc: hym8563: in .read_alarm set .tm_sec to 0 to signal minute accuracyUwe Kleine-König1-1/+1
Set .tm_sec to 0 instead of -1 to signal minute accuracy. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19rtc: explicitly set tm_sec = 0 for drivers with minute accurancyUwe Kleine-König5-0/+6
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: d68778b80dd7 ("rtc: initialize output parameter for read alarm to "uninitialized"") Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq()Alim Akhtar1-0/+2
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: 24e1455493da ("drivers/rtc/rtc-s3c.c: delete duplicate clock control") Cc: <stable@vger.kernel.org> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com> Tested-by: Pankaj Dubey <pankaj.dubey@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19rtc: s3c: Remove unnecessary call to disable already disabled clockAlim Akhtar1-2/+0
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: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com> Tested-by: Pankaj Dubey <pankaj.dubey@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19rtc: abx80x: use devm_add_action_or_reset()Sudip Mukherjee1-7/+5
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: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-19rtc: m41t80: use devm_add_action_or_reset()Sudip Mukherjee1-3/+2
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: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-11rtc: fix a typo and reduce three empty lines to oneUwe Kleine-König1-3/+1
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-11rtc: s35390a: improve two comments in .set_alarmUwe Kleine-König1-2/+2
Be more explicit in some comments. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-11rtc: s35390a: improve irq handlingUwe Kleine-König1-17/+31
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: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-11rtc: s35390a: implement reset routine as suggested by the referenceUwe Kleine-König1-10/+55
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: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-11rtc: s35390a: fix reading out alarmUwe Kleine-König1-9/+31
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: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-11rtc: sh: don't validate alarm time provided to .set_alarmUwe Kleine-König1-40/+1
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: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-11rtc: sh: drop bogus assignment of tm_year in .read_alarmUwe Kleine-König1-1/+0
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: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-11rtc: isl12057: let the rtc core interpret the partial alarmUwe Kleine-König1-32/+1
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: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-09rtc: simplify implementations of read_alarmUwe Kleine-König16-98/+5
Since commit d68778b80dd7 ("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: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-09rtc: ds1307: Fix relying on reset value for weekdayKeerthy1-1/+27
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: 1d1945d261a2af "drivers/rtc/rtc-ds1307.c: add alarm support for mcp7941x chips" Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-09rtc: v3020: move rtc-v3020.h to platform_dataAlexandre Belloni1-1/+1
rtc-v3020.h belongs to include/linux/platform_data/ Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-07-08rtc: ds1286: move header to linux/rtcAlexandre Belloni1-1/+1
Move ds1286.h to rtc specific folder. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-29powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msgSuraj Jitindar Singh1-2/+2
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: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-06-27rtc: m48t86: move m48t86.h to platform_dataAlexandre Belloni1-1/+1
m48t86.h belongs to include/linux/platform_data/ Acked-by: Jason Cooper <jason@lakedaemon.net> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Alexander Clouter <alex@digriz.org.uk> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-27rtc: ds2404: move rtc-ds2404.h to platform_dataAlexandre Belloni1-1/+1
rtc-ds2404.h belongs to include/linux/platform_data/ Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-26rtc: rv8803: broaden workaroundAlexandre Belloni1-3/+3
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: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-26rtc: move mc146818 helper functions out-of-lineArnd Bergmann3-0/+205
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: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-26mn10300: use RTC_DRV_CMOS instead of CONFIG_RTCArnd Bergmann2-2/+2
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: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-06-06rtc: efi: Fail probing if RTC reads don't workAlexander Graf1-0/+6
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: Alexander Graf <agraf@suse.de> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>