1
0
Fork 0
Commit Graph

6 Commits (redonkable)

Author SHA1 Message Date
Daniel Gomez f9bf089a70 rtc: rx6110: declare missing of table
Add missing <of_device_id> table for SPI driver relying on SPI
device match since compatible is in a DT binding or in a DTS.

Before this patch:
modinfo drivers/rtc/rtc-rx6110.ko | grep alias
alias:          spi:rx6110

After this patch:
modinfo drivers/rtc/rtc-rx6110.ko | grep alias
alias:          spi:rx6110
alias:          of:N*T*Cepson,rx6110C*
alias:          of:N*T*Cepson,rx6110

Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-29 15:53:42 +02:00
Andy Shevchenko a3f60bb35f rtc: rx6110: Switch to use %ptR
Use %ptR instead of open coded variant to print content of
struct rtc_time in human readable format.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-12-10 22:40:05 +01:00
Alexandre Belloni 22652ba724 rtc: stop validating rtc_time in .read_time
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>
2018-03-02 10:09:58 +01:00
Julia Lawall 34c7b3ac4c rtc: constify rtc_class_ops structures
Check for rtc_class_ops structures that are only passed to
devm_rtc_device_register, rtc_device_register,
platform_device_register_data, all of which declare the corresponding
parameter as const.  Declare rtc_class_ops structures that have these
properties as const.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct rtc_class_ops i@p = { ... };

@ok@
identifier r.i;
expression e1,e2,e3,e4;
position p;
@@
(
devm_rtc_device_register(e1,e2,&i@p,e3)
|
rtc_device_register(e1,e2,&i@p,e3)
|
platform_device_register_data(e1,e2,e3,&i@p,e4)
)

@bad@
position p != {r.p,ok.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct rtc_class_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-09-02 01:24:06 +02:00
Alexandre Belloni 1bc40cb1cc rtc: rx6110: remove owner assignment
.owner is already set by the spi core.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-08-31 18:21:35 +02:00
Steffen Trumtrar 68298c2dac rtc: add driver for RX6110SA real time clock
The RX6110 comes in two different variants: SPI and I2C.
This driver only supports the SPI variant.

If the need ever arises to also support the I2C variant, this driver
could easily be refactored to support both cases.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14 17:08:10 +01:00