Nobuhiro Iwamatsu
fa60b7e838
rtc: xgene: Remove unused struct device in struct xgene_rtc_dev
...
struct device in struct xgene_rtc_dev is not used, remove it.
Signed-off-by: Nobuhiro Iwamatsu <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected] >
2019-11-27 09:31:14 +01:00
YueHaibing
09ef18bcd5
rtc: use devm_platform_ioremap_resource() to simplify code
...
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected] >
2019-10-07 01:07:35 +02:00
Stephen Boyd
faac910201
rtc: Remove dev_err() usage after platform_get_irq()
...
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one
statement (manually).
Cc: Alessandro Zummo <[email protected] >
Cc: Alexandre Belloni <[email protected] >
Cc: [email protected]
Cc: Greg Kroah-Hartman <[email protected] >
Signed-off-by: Stephen Boyd <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected] >
2019-08-13 10:53:10 +02:00
Alexandre Belloni
58f889150a
rtc: xgene: use .set_time
...
Use .set_time instead of the deprecated .set_mmss.
Signed-off-by: Alexandre Belloni <[email protected] >
2019-04-04 10:07:08 +02:00
Alexandre Belloni
43f327fa48
rtc: xgene: switch to rtc_time64_to_tm/rtc_tm_to_time64
...
Call the 64bit versions of rtc_tm time conversion as the range is enforced
by the core.
Signed-off-by: Alexandre Belloni <[email protected] >
2019-04-04 10:07:08 +02:00
Alexandre Belloni
9a842a7ebb
rtc: xgene: stop caching alarm_time
...
There is no point in caching alarm_time for .read_alarm because
.read_alarm is only called at boo time and thus alarm_time is always 0.
Signed-off-by: Alexandre Belloni <[email protected] >
2019-04-04 10:07:08 +02:00
Alexandre Belloni
db7853414b
rtc: xgene: correct checkpatch issues
...
Correct trivial whitespace issues. Also sort the headers.
Signed-off-by: Alexandre Belloni <[email protected] >
2019-04-04 10:07:08 +02:00
Alexandre Belloni
3a205b9dc8
rtc: xgene: convert to SPDX identifier
...
Use SPDX-License-Identifier instead of a verbose license text.
Signed-off-by: Alexandre Belloni <[email protected] >
2019-04-04 10:07:08 +02:00
Alexandre Belloni
490595abfd
rtc: xgene: set range
...
CCVR is a 32bit second counter.
Signed-off-by: Alexandre Belloni <[email protected] >
2019-04-04 10:07:08 +02:00
Alexandre Belloni
a652e00ee1
rtc: xgene: fix possible race condition
...
The IRQ is requested before the struct rtc is allocated and registered, but
this struct is used in the IRQ handler. This may lead to a NULL pointer
dereference.
Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc
struct before requesting the IRQ.
Signed-off-by: Alexandre Belloni <[email protected] >
2019-04-04 10:07:08 +02:00
Alexandre Belloni
ab62670e57
rtc: stop validating rtc_time after rtc_time_to_tm
...
rtc_time_to_tm never generates an invalid tm. It is not necessary to
validate it.
Signed-off-by: Alexandre Belloni <[email protected] >
2018-03-01 10:49:41 +01:00
Arnd Bergmann
573e2bf054
rtc: xgene: mark PM functions as __maybe_unused
...
The new xgene_rtc_alarm_irq_enabled() function is only accessed
from PM code, which is inside of an #ifdef; this causes a harmless
build warning when CONFIG_PM is disabled:
drivers/rtc/rtc-xgene.c:108:12: error: 'xgene_rtc_alarm_irq_enabled' defined but not used [-Werror=unused-function]
Just remove the #ifdef and use __maybe_unused annotations instead,
to make the code more robust here.
Fixes: d0bcd82b13 ("rtc: xgene: Fix suspend/resume")
Signed-off-by: Arnd Bergmann <[email protected] >
Reviewed-by: Loc Ho <[email protected] >
Signed-off-by: Alexandre Belloni <[email protected] >
2017-11-09 01:25:47 +01:00
Loc Ho
d0bcd82b13
rtc: xgene: Fix suspend/resume
...
This patch fixes suspend/resume functions properly for the APM X-Gene
SoC RTC driver.
Signed-off-by: Loc Ho <[email protected] >
Reviewed-by: Mark Brown <[email protected] >
Signed-off-by: Alexandre Belloni <[email protected] >
2017-11-09 01:16:36 +01:00
Wolfram Sang
0929ae376e
rtc: drop owner assignment from platform_drivers
...
A platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <[email protected] >
2014-10-20 16:21:31 +02:00
Loc Ho
f12d869538
drivers/rtc: add APM X-Gene SoC RTC driver
...
Add support for the APM X-Gene SoC RTC driver.
Signed-off-by: Rameshwar Prasad Sahu <[email protected] >
Signed-off-by: Loc Ho <[email protected] >
Cc: Jon Masters <[email protected] >
Cc: Alessandro Zummo <[email protected] >
Cc: Catalin Marinas <[email protected] >
Cc: Will Deacon <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2014-06-06 16:08:06 -07:00