summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-tegra.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers/rtc: don't check resource with devm_ioremap_resourceWolfram Sang2013-05-181-6/+0
| | | | | | | | devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Stephen Warren <swarren@nvidia.com>
* drivers/rtc/rtc-tegra.c: use managed rtc_device_register()Laxman Dewangan2013-04-291-23/+5
| | | | | | | | | | | | | Use devm_rtc_device_register() for registering RTC device. This will reduce the code for unregistering RTC device in cleanup path and remove the implementation of remove callback of platform driver. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/rtc/rtc-tegra.c: set irq name as device nameLaxman Dewangan2013-04-291-1/+1
| | | | | | | | | | | | | | The irq name of tegra rtc shows as "rtc alarm" which actually does not reflect the name related to driver. Passing the device name to have the irq names with driver name. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/rtc/rtc-tegra.c: use struct dev_pm_ops for power managementLaxman Dewangan2013-04-291-10/+8
| | | | | | | | | | | | | Make the Tegra RTC controller driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/rtc/rtc-tegra.c: protect suspend/resume callbacks with CONFIG_PM_SLEEPLaxman Dewangan2013-04-291-2/+2
| | | | | | | | | | | | | | | CONFIG_PM doesn't actually enable any of the PM callbacks, it only allows to enable CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME. This means if CONFIG_PM is used to protect system sleep callbacks then it may end up unreferenced if only runtime PM is enabled. Hence protecting sleep callbacks with CONFIG_PM_SLEEP. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: rtc-tegra: use module_platform_driver_probe()Jingoo Han2013-04-291-11/+1
| | | | | | | | | Use module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: rtc-tegra: add __init/__exit annotationJingoo Han2013-04-291-3/+3
| | | | | | | | | When platform_driver_probe() is used, bind/unbind via sysfs is disabled. Thus, __init/__exit annotations can be added to probe()/remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: Convert to devm_ioremap_resource()Thierry Reding2013-01-221-5/+3
| | | | | | | | | | | | | Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/rtc/rtc-tegra.c: convert to DT driverJoseph Lo2013-01-041-0/+7
| | | | | | | | | | | | After Kernel 3.7, the Tegra device will only support booting with DT. The legacy Tegra RTC platform driver will not work anymore. This patch converts the driver to support DT. Signed-off-by: Joseph Lo <josephl@nvidia.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Joseph Lo <josephl@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Drivers: rtc: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-3/+3
| | | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Mike Frysinger <vapier.adi@gmail.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/rtc/rtc-tegra.c: clean up probe/remove routinesHannu Heikkinen2012-05-291-37/+13
| | | | | | | | | | | | | | | | Use the devres managed resource functions in the probe routine. Also affects the remove routine where the previously used free and release functions are not needed. The devm_* functions eliminate the need for manual resource releasing and simplify error handling. Resources allocated by devm_* are freed automatically on driver detach. Signed-off-by: Hannu Heikkinen <ext-hannu.m.heikkinen@nokia.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/rtc/rtc-tegra.c: properly initialize spinlockUwe Kleine-König2011-07-251-1/+1
| | | | | | | | | | | Using __SPIN_LOCK_UNLOCKED for a dynamically allocated lock is wrong and breaks the build with PREEMPT_RT_FULL. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Andrew Chew <achew@nvidia.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: add real-time clock driver for NVIDIA TegraAndrew Chew2011-03-221-0/+488
This is a platform driver that supports the built-in real-time clock on Tegra SOCs. Signed-off-by: Andrew Chew <achew@nvidia.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Jon Mayo <jmayo@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud