summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
Commit message (Collapse)AuthorAgeFilesLines
* rtc: omap: Add internal clock enabling supportKeerthy2015-09-051-0/+10
| | | | | | | | | The rtc can be clocked by an internal 32K clock. Adding the support to enable the same. Signed-off-by: Keerthy <j-keerthy@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: s5m: fix to update ctrl registerJoonyoung Shim2015-09-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | According to datasheet, the S2MPS13X and S2MPS14X should update write buffer via setting WUDR bit to high after ctrl register is written. If not, ALARM interrupt of rtc-s5m doesn't happen first time when i use tools/testing/selftests/timers/rtctest.c test program and hour format is used to 12 hour mode in Odroid-XU3 board. One more issue is the RTC doesn't keep time on Odroid-XU3 board when i turn on board after power off even if RTC battery is connected. It can be solved as setting WUDR & RUDR bits to high at the same time after RTC_CTRL register is written. It's same with condition of only writing ALARM registers, so this is for only S2MPS14 and we should set WUDR & A_UDR bits to high on S2MPS13. I can't find any reasonable description about this like fix from datasheet, but can find similar codes from rtc driver source of hardkernel kernel and vendor kernel. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Cc: <stable@vger.kernel.org> # v3.16 Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: add xilinx zynqmp rtc driverSuneel Garapati2015-09-053-0/+287
| | | | | | | | | Add support for RTC controller found on Xilinx Zynq Ultrascale+ MPSoC platform. Signed-off-by: Suneel Garapati <suneel.garapati@xilinx.com> Acked-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: as3722: correct month valueBibek Basu2015-09-051-2/+2
| | | | | | | | | The RTC month value is 1-indexed, but the kernel assumes it is 0-indexed. This may result in the RTC not rolling over correctly. Signed-off-by: Bibek Basu <bbasu@nvidia.com> Signed-off-by: Felix Janda <felix.janda@posteo.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: sa1100/pxa: convert to run-time register mappingRob Herring2015-09-053-27/+63
| | | | | | | | | | | | | | | | | SA1100 and PXA differ only in register offsets which are currently hardcoded in a machine specific header. Some arm64 platforms (PXA1928) have this RTC block as well (and not the PXA270 variant). Convert the driver to use ioremap and set the register offsets dynamically. Since we are touching all the register accesses, convert them all to readl_relaxed/writel_relaxed. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: rtc-linux@googlegroups.com Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: pxa: convert to use shared sa1100 functionsRob Herring2015-09-052-32/+31
| | | | | | | | | | | | | | | | | | | | | | | Currently, the rtc-sa1100 and rtc-pxa drivers co-exist as rtc-pxa has a superset of functionality. Having 2 drivers sharing the same memory resource is not allowed by the driver model if resources are properly declared. This problem was avoided by not adding memory resources to the SA1100 RTC driver, but that prevents clean-up of the SA1100 driver. This commit converts the PXA RTC to use the exported SA1100 RTC functions. Now the sa1100-rtc and pxa-rtc devices are mutually exclusive, so we must remove the sa1100-rtc from pxa27x and pxa3xx. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Russell King <linux@arm.linux.org.uk> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: linux-arm-kernel@lists.infradead.org Cc: rtc-linux@googlegroups.com Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: sa1100: prepare to share sa1100_rtc_opsRob Herring2015-09-052-29/+49
| | | | | | | | | | | | | | Factor out the RTC initialization from the platform device specific parts in order to share the RTC device ops with other drivers. Specifically, it will be shared with rtc-pxa driver. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Russell King <linux@arm.linux.org.uk> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: rtc-linux@googlegroups.com Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds3232: fix WARNING trace in resume functionWang Dongsheng2015-09-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If ds3232 work on some platform that is not implementing irq_set_wake, ds3232 will get a WARNING trace in resume. So fix ds3232->suspended state to false when irq_set_irq_wake return error. WARNING: CPU: 0 PID: 729 at kernel/irq/manage.c:604 irq_set_irq_wake+0x4b/0x8c() Unbalanced IRQ 201 wake disable Modules linked in: CPU: 0 PID: 729 Comm: sh Not tainted 3.12.19-rt30+ #25 [<800107d9>] (unwind_backtrace+0x1/0x88) from [<8000e4ef>] (show_stack+0xb/0xc) [<8000e4ef>] (show_stack+0xb/0xc) from [<802b5fa9>] (dump_stack+0x4d/0x60) [<802b5fa9>] (dump_stack+0x4d/0x60) from [<800186dd>] (warn_slowpath_common+0x45/0x64) [<800186dd>] (warn_slowpath_common+0x45/0x64) from [<80018717>] (warn_slowpath_fmt+0x1b/0x24) [<80018717>] (warn_slowpath_fmt+0x1b/0x24) from [<8003a8d3>] (irq_set_irq_wake+0x4b/0x8c) [<8003a8d3>] (irq_set_irq_wake+0x4b/0x8c) from [<80204fcb>] (ds3232_resume+0x2d/0x36) [<80204fcb>] (ds3232_resume+0x2d/0x36) from [<801954c7>] (dpm_run_callback.isra.13+0xb/0x28) [<801954c7>] (dpm_run_callback.isra.13+0xb/0x28) from [<80195b1b>] (device_resume+0x7b/0xa2) [<80195b1b>] (device_resume+0x7b/0xa2) from [<80195f0f>] (dpm_resume+0xbb/0x19c) [<80195f0f>] (dpm_resume+0xbb/0x19c) from [<801960d9>] (dpm_resume_end+0x9/0x12) [<801960d9>] (dpm_resume_end+0x9/0x12) from [<80037e1d>] (suspend_devices_and_enter+0x17d/0x1d0) [<80037e1d>] (suspend_devices_and_enter+0x17d/0x1d0) from [<80037ee1>] (pm_suspend+0x71/0x128) [<80037ee1>] (pm_suspend+0x71/0x128) from [<80037449>] (state_store+0x6d/0x80) [<80037449>] (state_store+0x6d/0x80) from [<800af4d5>] (sysfs_write_file+0x9f/0xde) [<800af4d5>] (sysfs_write_file+0x9f/0xde) from [<8007a437>] (vfs_write+0x7b/0x104) [<8007a437>] (vfs_write+0x7b/0x104) from [<8007a7f7>] (SyS_write+0x27/0x48) [<8007a7f7>] (SyS_write+0x27/0x48) from [<8000c121>] (ret_fast_syscall+0x1/0x44) Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: s3c: remove unnecessary NULL assignmentJoonyoung Shim2015-09-051-1/+0
| | | | | | | | | It's unnecessary the code that assigns info->rtc_clk to NULL in s3c_rtc_remove. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: s3c: add missing clk controlJoonyoung Shim2015-09-051-0/+3
| | | | | | | | | | It's missed to call clk_unprepare() about info->rtc_src_clk in s3c_rtc_remove and to call clk_disable_unprepare about info->rtc_clk in error routine of s3c_rtc_probe. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: s3c: fix disabled clocks for alarmJoonyoung Shim2015-09-051-6/+18
| | | | | | | | | | | | | | | | The clock enable/disable codes for alarm have been removed from commit 24e1455493da ("drivers/rtc/rtc-s3c.c: delete duplicate clock control") and the clocks are disabled even if alarm is set, so alarm interrupt can't happen. The s3c_rtc_setaie function can be called several times with 'enabled' argument having same value, so it needs to check whether clocks are enabled or not. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Cc: <stable@vger.kernel.org> # v4.1 Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: at91sam9: remove useless includeAlexandre Belloni2015-09-051-1/+0
| | | | | | | Definitions from linux/platform_data/atmel.h are not used, remove the include. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: at91sam9: include linux/of.hAlexandre Belloni2015-09-051-0/+1
| | | | | | This driver is using device tree but is not including of.h Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: armada38x: Align RTC set time procedure with the official errataNadav Haklai2015-09-051-20/+12
| | | | | | | | | | | | | | | | | According to the Armada38x functional errata FE-3124064, writing to the RTC TIME register may fail. As a workaround, after writing to RTC TIME register, issue a dummy write of 0x0 twice to the RTC Status register. This is the updated implementation of the Errata that eliminates the need of the long 100ms delay during the RTC set time procedure. [gregory.clement@free-electrons.com]: removed the mutex and use the spinlock again Signed-off-by: Nadav Haklai <nadavh@marvell.com> Reviewed-by: Neta Zur Hershkovits <neta@marvell.com> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: check time validity when necessaryAlexandre Belloni2015-09-051-29/+29
| | | | | | Check time validity when reading time as this is when we need to know. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: fix RX8025_BIT_CTRL2_CTFG initializationAlexandre Belloni2015-09-051-1/+1
| | | | | | RX8025_BIT_CTRL2_CTFG was set to 0 only when it was already 0. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: remove useless initializationAlexandre Belloni2015-09-051-1/+0
| | | | | | irq_freq is already initialized to 1 in rtc_device_register() Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: reset validity when setting timeAlexandre Belloni2015-09-051-11/+20
| | | | | | | Wait for the user to set the time to reset the validity bits. Until then, the time may be invalid. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: fix rx8025_init_client()Alexandre Belloni2015-09-051-1/+1
| | | | | | | rx8025_init_client is modifying ctrl[0] and writing it to RX8025_REG_CTRL2 but ctrl[0] is actually RX8025_REG_CTRL1. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: continue without alarm when irq request failsAlexandre Belloni2015-09-051-2/+2
| | | | | | | | Instead of bailing out, disable alarms and continue when devm_request_threaded_irq() fails. This allows to still provide some functionality. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: cleanup accessorsAlexandre Belloni2015-09-051-54/+31
| | | | | | | | | | | | Remove useless error messages, at that point, the user already knows something went wrong but will not be able to do anything about it anyway. It is also highly unlikely that some registers are readable/writable but not some other ones. Also, transform rx8025_read_reg to be more resemblant to i2c_smbus_read_byte_data() Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: don't reset the timeAlexandre Belloni2015-09-051-16/+22
| | | | | | | | Stop setting the time to epoch when it is invalid. The proper way to handle that is to return an error when it is invalid instead of returning an incorrect value. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: fix transfer modeAlexandre Belloni2015-09-051-3/+3
| | | | | | | | The datasheet specifies that transfer mode must be 0 for write and either 0x4 (simplified read) or 0 (standard read). 0x8 is not specified, use standard mode. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: only handle dates between 2000 and 2099Alexandre Belloni2015-09-051-10/+4
| | | | | | | The hardware is only capable of handling dates between 2000 and 2099, enforce that. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: use BIT()Alexandre Belloni2015-09-051-11/+12
| | | | | | Use BIT() instead of hand coding. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: remove useless probe error messageAlexandre Belloni2015-09-051-16/+6
| | | | | | | It is useless to print a message when probe fails as the user is already aware that it failed. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: switch to managed irq allocationAlexandre Belloni2015-09-051-10/+4
| | | | | | | Use devm_request_threaded_irq() so it is not necessary to call free_irq() explicitly. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: Convert to threaded IRQAlexandre Belloni2015-09-051-33/+4
| | | | | | | The driver currently emulates the concept of threaded IRQ using a workqueue, switch to threaded IRQ instead. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rx8025: remove useless headers and reorder themAlexandre Belloni2015-09-051-5/+2
| | | | | | Remove the useless includes and order the remaining ones alphabetically. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: tx4939: clean up tx4939_rtc_nvram_read()/tx4939_rtc_nvram_write()Vladimir Zapolskiy2015-09-051-4/+2
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: stk17ta8: clean up stk17ta8_nvram_read()/stk17ta8_nvram_write()Vladimir Zapolskiy2015-09-051-2/+2
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: rp5c01: clean up rp5c01_nvram_read()/rp5c01_nvram_write()Vladimir Zapolskiy2015-09-051-2/+2
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: m48t59: clean up m48t59_nvram_read()/m48t59_nvram_write()Vladimir Zapolskiy2015-09-051-8/+10
| | | | | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Spinlock acquisition/release is moved out of the loop body to get atomic states of NVRAM reading and writing operations. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1742: clean up ds1742_nvram_read()/ds1742_nvram_write()Vladimir Zapolskiy2015-09-051-2/+2
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1553: clean up ds1553_nvram_read()/ds1553_nvram_write()Vladimir Zapolskiy2015-09-051-2/+2
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1511: clean up ds1511_nvram_read()/ds1511_nvram_write()Vladimir Zapolskiy2015-09-051-37/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c The change enables burst mode of access to SRAM for any read()/write() operations, it is worth to mention that this may influence on userspace, for instance prior to the change read(fd, buf, 1); read(fd, buf + 1, 1); and read(fd, buf, 2); sequences of syscalls over DS1511's sysfs "nvram" fd led to different DS1511 state changes and/or buf content, if some userspace applications are written specifically for DS1511 and exploit this strange "feature", they may be impacted. Also the change corrects NVRAM size accessible to userspace from 255 bytes to 256 bytes. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1343: clean up ds1343_nvram_read()/ds1343_nvram_write()Vladimir Zapolskiy2015-09-051-12/+0
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1307: clean up ds1307_nvram_read()/ds1307_nvram_write()Vladimir Zapolskiy2015-09-051-14/+0
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: ds1305: clean up ds1305_nvram_read()/ds1305_nvram_write()Vladimir Zapolskiy2015-09-051-18/+0
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller size in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: cmos: clean up cmos_nvram_read()/cmos_nvram_write()Vladimir Zapolskiy2015-09-051-13/+0
| | | | | | | | The change removes redundant sysfs binary file boundary checks, since this task is already done on caller side in fs/sysfs/file.c Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: at91rm9200: get and use slow clockAlexandre Belloni2015-09-051-3/+24
| | | | | | | | | | | Commit dca1a4b5ff6e ("clk: at91: keep slow clk enabled to prevent system hang") added a workaround for the slow clock as it is not properly handled by its users. Get and use the slow clock as it is necessary for the at91rm9200 rtc. Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: gemini: fix ptr_ret.cocci warningskbuild test robot2015-09-051-4/+1
| | | | | | | | | | | | drivers/rtc/rtc-gemini.c:151:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: Drop (un)likely before IS_ERR(_OR_NULL)viresh kumar2015-09-053-3/+3
| | | | | | | | | | | | | | IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there is no need to do that again from its callers. Drop it. gemini driver was using likely() for a failure case while the rtc driver is getting registered. That looks wrong and it should really be unlikely. But because we are killing all the unlikely() flags, lets kill that too. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: at91rm9200: sort headers alphabeticallyAlexandre Belloni2015-09-051-8/+8
| | | | | | | | Sort included headers alphabetically. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: at91sam9: get sclk rate after enabling itAlexandre Belloni2015-09-051-6/+7
| | | | | | | | | | | See help for clk_get_rate(): "obtain the current clock rate (in Hz) for a clock source. This is only valid once the clock source has been enabled." It currently returns the correct value but that may not stay that way. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: at91sam9: sort headers alphabeticallyAlexandre Belloni2015-09-051-8/+8
| | | | | | | | Sort included headers alphabetically. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: at91sam9: remove useless checkAlexandre Belloni2015-09-051-2/+1
| | | | | | | | | rtc->sclk necessarily points to a valid clocks at this point. Else the probe would have aborted. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: at91sam9: properly handle error caseAlexandre Belloni2015-09-051-3/+10
| | | | | | | | | | In case of a probe error, it is possible to abort after issuing clk_prepare_enable(). Ensure the clock is disabled and unprepared in that case. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* rtc: pl031: fix typo for author emailLeo Yan2015-09-051-1/+1
| | | | | | | The email address missed character ">", so add it. Signed-off-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: Export OF module alias information in missing driversJavier Martinez Canillas2015-09-053-0/+3
| | | | | | | | | | | | | | | | | | | | | | | The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So technically there's no need for a driver to export the OF table since currently it's not used. In fact, the I2C device ID table is mandatory for I2C drivers since a i2c_device_id is passed to the driver's probe function even if the I2C core used the OF table to match the driver. And since the I2C core uses different tables, OF-only drivers needs to have duplicated data that has to be kept in sync and also the dev node compatible manufacturer prefix is stripped when reporting the MODALIAS. To avoid the above, the I2C core behavior may be changed in the future to not require an I2C device table for OF-only drivers and report the OF module alias. So, it's better to also export the OF table to prevent breaking module autoloading if that happens. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
OpenPOWER on IntegriCloud