aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds3232.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-04-17rtc: use more standard kernel logging stylesJoe Perches1-2/+4
Neaten the logging a bit by adding #define pr_fmt Miscellanea: o Remove __FILE__/__func__ uses o Coalesce formats adding missing spaces o Align arguments o (rtc-cmos) Integrated 2 consecutive messages Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Joshua Kinard <kumba@gentoo.org> Cc: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-03drivers/rtc/rtc-ds3232.c: enable ds3232 to work as wakeup sourceWang Dongsheng1-24/+70
Add suspend/resume and device_init_wakeup to enable ds3232 as wakeup source, /sys/class/rtc/rtcX/wakealarm for set wakeup alarm. Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-03drivers/rtc/rtc-ds3232.c: make it possible to share an irqBharat Bhushan1-2/+2
It's possible to have RTC irq shared with other device (e.g. t4240qds board shares ds3232irq with phy one). Handle this in driver. Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-03rtc: fix potential race conditionAlessandro Zummo1-2/+0
RTC drivers must not return an error after device registration. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Reported-by: Ales Novak <alnovak@suse.cz> Cc: Alexander Shiyan <shc_work@mail.ru> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Srikanth Srinivasan <srikanth.srinivasan@freescale.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-29drivers/rtc/rtc-ds3232.c: use devm_* APIsSachin Kamat1-18/+7
devm_* functions are device managed and make cleanup code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Srikanth Srinivasan <srikanth.srinivasan@freescale.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>
2013-01-03Drivers: rtc: remove __dev* attributes.Greg Kroah-Hartman1-4/+4
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>
2012-03-23rtc: convert rtc i2c drivers to module_i2c_driverAxel Lin1-12/+1
Factor out some boilerplate code for i2c driver registration into module_i2c_driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Piotr Ziecik <kosmo@semihalf.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Scott Wood <scottwood@freescale.com> Cc: Srikanth Srinivasan <srikanth.srinivasan@freescale.com> Cc: Mike Rapoport <mike@compulab.co.il> Cc: Sergey Lapin <slapin@ossfans.org> Cc: Roman Fietze <roman.fietze@telemotive.de> Cc: Herbert Valerio Riedel <hvr@gnu.org> Cc: Alexander Bigga <ab@mycable.de> Cc: Dale Farnsworth <dale@farnsworth.org> Cc: Gregory Hermant <gregory.hermant@calao-systems.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Martyn Welch <martyn.welch@ge.com> Cc: Byron Bradley <byron.bbradley@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-09RTC: Cleanup rtc_class_ops->update_irq_enable()John Stultz1-18/+0
Now that the generic code handles UIE mode irqs via periodic alarm interrupts, no one calls the rtc_class_ops->update_irq_enable() method anymore. This patch removes the driver hooks and implementations of update_irq_enable if no one else is calling it. CC: Thomas Gleixner <tglx@linutronix.de> CC: Alessandro Zummo <a.zummo@towertech.it> CC: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> CC: rtc-linux@googlegroups.com Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-02-25drivers/rtc/rtc-ds3232.c: fix time range difference between linux and RTC chipLei Xu1-5/+9
In linux rtc_time struct, tm_mon range is 0~11, tm_wday range is 0~6, while in RTC HW REG, month range is 1~12, day of the week range is 1~7, this patch adjusts difference of them. The efect of this bug was that most of month will be operated on as the next month by the hardware (When in Jan it maybe even worse). For example, if in May, software wrote 4 to the hardware, which handled it as April. Then the logic would be different between software and hardware, which would cause weird things to happen. Signed-off-by: Lei Xu <B33228@freescale.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: john stultz <johnstul@us.ibm.com> Cc: Jack Lan <jack.lan@freescale.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-24rtc: don't use flush_scheduled_work()Tejun Heo1-1/+1
flush_scheduled_work() is deprecated and scheduled to be removed. On removal, directly cancel the work, and flush the uie_task in rtc-dev.c::clear_uie(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: rtc-linux@googlegroups.com
2010-10-27drivers/rtc/rtc-ds3232.c: add alarm functionLan Chunhe-B258061-0/+181
The DS3232 RTC driver only has the tick function. Add an alarm function so the driver is complete. Signed-off-by: Lan Chunhe-B25806 <b25806@freescale.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-30i2c: Remove obsolete cleanup for clientdataWolfram Sang1-2/+0
A few new i2c-drivers came into the kernel which clear the clientdata-pointer on exit. This is obsolete meanwhile, so fix it and hope the word will spread. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-08-11rtc: add support for DS3232 RTCRoy Zang1-0/+326
Add a driver for the DS3232 RTC chip via the I2C bus. Alarms are not supported in this version of the driver. [akpm@linux-foundation.org: fix Kconfig help text] Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Jingchang Lu <b22599@freescale.com> Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Acked-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Kumar Gala <kumar.gala@freescale.com> 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>