aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-cpcap.c
AgeCommit message (Collapse)AuthorFilesLines
2020-07-02rtc: cpcap: fix rangeSebastian Reichel1-1/+1
Unbreak CPCAP driver, which has one more bit in the day counter increasing the max. range from 2014 to 2058. The original commit introducing the range limit was obviously wrong, since the driver has only been written in 2017 (3 years after 14 bits would have run out). Fixes: d2377f8cc5a7 ("rtc: cpcap: set range") Reported-by: Sicelo A. Mhlongo <[email protected]> Reported-by: Dev Null <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Tested-by: Merlijn Wajer <[email protected]> Acked-by: Tony Lindgren <[email protected]> Acked-by: Merlijn Wajer <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-03-16rtc: cpcap: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-2/+2
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: cpcap: set rangeAlexandre Belloni1-0/+1
The CPCAP rtc is a 14bit day counter plus a 17bit seconds counter. Note that this failed on Nov 10 2014 so it is very likely this driver as never been used since. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2020-03-16rtc: cpcap: 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-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner1-9/+1
Based on 1 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 distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-07-07headers: separate linux/mod_devicetable.h from linux/platform_device.hRandy Dunlap1-0/+1
At over 4000 #includes, <linux/platform_device.h> is the 9th most #included header file in the Linux kernel. It does not need <linux/mod_devicetable.h>, so drop that header and explicitly add <linux/mod_devicetable.h> to source files that need it. 4146 #include <linux/platform_device.h> After this patch, there are 225 files that use <linux/mod_devicetable.h>, for a reduction of around 3900 times that <linux/mod_devicetable.h> does not have to be read & parsed. 225 #include <linux/mod_devicetable.h> This patch was build-tested on 20 different arch-es. It also makes these drivers SubmitChecklist#1 compliant. Signed-off-by: Randy Dunlap <[email protected]> Reported-by: kbuild test robot <[email protected]> # drivers/media/platform/vimc/ Reported-by: kbuild test robot <[email protected]> # drivers/pinctrl/pinctrl-u300.c Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-03-02rtc: cpcap: 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. Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2017-04-14rtc: cpcap: fix improper use of IRQ_NONE for request_threaded_irqTony Lindgren1-2/+2
There's a funny typo where IRQ_NONE is used instead of IRQF_TRIGGER_NONE for request_threaded_irq(). Let's fix it before it gets copied elsewhere. Fixes: dd3bf50b35e3 ("rtc: cpcap: new rtc driver") Signed-off-by: Tony Lindgren <[email protected]> Reviewed-By: Sebastian Reichel <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2017-03-16rtc: cpcap: kfreeing devm allocated memoryDan Carpenter1-3/+1
We shouldn't kfree(rtc) because is devm_ managed memory. It leads to a double free. Fixes: dd3bf50b35e3 ("rtc: cpcap: new rtc driver") Signed-off-by: Dan Carpenter <[email protected]> Acked-By: Sebastian Reichel <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2017-03-09rtc: cpcap: new rtc driverSebastian Reichel1-0/+332
This driver supports the Motorola CPCAP PMIC found on some of Motorola's mobile phones, such as the Droid 4. Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>