aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds2404.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-23rtc: ds2404: use hw endiannes variableNicholas Mc Guire1-2/+3
Converting from hardware to host endiannes was done using reassignment to the same variable which makes sparse unhappy as it can not verify the endiannes handling properly. To allow sparse to verify endiannes handling an explicit __le32 is introduced. Note that this patch does not change the generated binary (x86_64 and ppc64 binary diff). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-19rtc: ds2404: simplify .probe and remove .removeAlexandre Belloni1-18/+7
Use devm_add_action_or_reset to simplify .probe and remove .remove Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-19rtc: ds2404: remove ds2404_chip_opsAlexandre Belloni1-19/+3
There is only one ds2404_chip_ops struct that is implemented, remove the unnecessary indirection. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-19rtc: ds2404: convert to SPDX identifierAlexandre Belloni1-8/+2
Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-19rtc: ds2404: use .set_timeAlexandre Belloni1-3/+3
Use .set_time instead of the deprecated .set_mmss. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-19rtc: ds2404: switch to rtc_time64_to_tmAlexandre Belloni1-1/+1
Call the 64bit version of rtc_time_to_tm now that the range is enforced by the core. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-19rtc: ds2404: set rangeAlexandre Belloni1-5/+9
The real-time clock is a 5-byte binary counter. It is incremented 256 times per second. The least significant byte is a count of fractional seconds. The upper four bytes are a count of seconds. The realtime clock can accumulate 136 years of seconds before rolling over. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-02rtc: stop validating rtc_time in .read_timeAlexandre Belloni1-1/+1
The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.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-01-11rtc: rtc-ds2404: constify ds2404_chip_ops structuresJulia Lawall1-2/+2
The ds2404_chip_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2014-10-20rtc: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-11-13drivers/rtc/rtc-ds2404.c: use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. 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>
2013-04-29rtc: rtc-ds2404: use devm_*() functionsJingoo Han1-9/+3
Use devm_*() functions to make cleanup paths 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>
2013-02-21rtc: rtc-ds2404: use dev_err() instead of printk()Jingoo Han1-2/+2
Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... 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>
2013-02-21drivers/rtc/rtc-ds2404.c: use module_platform_driver macroSrinivas Kandagatla1-13/+1
Remove removes some code duplication by using module_platform_driver(). Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-06rtc: add Dallas DS2404 driverSven Schnelle1-0/+303
[akpm@linux-foundation.org: fix warning] Signed-off-by: Sven Schnelle <svens@stackframe.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>