aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-ds1347.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-07rtc: ds1347: handle century registerAlexandre Belloni1-13/+24
The DS1347 can handle years from 0 to 9999, add century register support. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-10-07rtc: ds1347: use regmap_update_bitsAlexandre Belloni1-4/+6
Use regmap_update_bits instead of open coding. Also add proper error handling. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-10-07rtc: ds1347: properly handle oscillator failuresAlexandre Belloni1-7/+23
The comment in the probe function stating that it disables oscillator stop detection and glitch filtering is incorrect as it sets bits 3 and 4 while it should be setting 5 and 6 to achieve that. Then, it is safe to assume that the oscillator failure detection is actually enabled. Properly handle oscillator failures by returning -EINVAL when the time and date are know to be incorrect and reset the flag when the time is set. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-10-07rtc: ds1347: set rangeAlexandre Belloni1-0/+2
The DS1347 handle dates from year 0000 to 9999. Leap years are claimed to be handled correctly in the datasheet. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-10-07rtc: ds1347: convert to devm_rtc_allocate_deviceAlexandre Belloni1-4/+4
This allows further improvement of the driver. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-10-07rtc: ds1347: mask ALM OUT when reading timeAlexandre Belloni1-1/+1
Bit 7 of the minutes registers is ALM OUT. It indicates an alarm fired. Mask it out when reading the time. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-10-07rtc: ds1347: simplify getting .driver_dataAlexandre Belloni1-8/+2
Get 'driver_data' from 'struct device' directly. Going via spi_device is an unnecessary step. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-10-07rtc: ds1347: remove useless readAlexandre Belloni1-6/+0
DS1347_SECONDS_REG is read at probe time but the value is simply discarded. Remove that useless read. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-10-07rtc: ds1347: remove verbose messagesAlexandre Belloni1-7/+0
Printing debugging (and opaque) information is not useful and only clutters the boot log. Remove those messages. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-5/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
2016-09-22rtc: ds1347: changed raw spi calls to register map callsRaghavendra Ganiga1-43/+53
This patch changes calls of spi read write calls to register map read and write calls in rtc ds1347 Signed-off-by: Raghavendra Chandra Ganiga <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-10-28spi: Drop owner assignment from spi_driversAndrew F. Davis1-1/+0
An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-04-03rtc: add support for maxim dallas rtc ds1347Raghavendra Ganiga1-0/+166
Add support for maxim dallas rtc ds1347 Signed-off-by: Raghavendra Chandra Ganiga <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>