linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Motorola CPCAP PMIC RTC
@ 2017-02-20  7:35 Sebastian Reichel
  2017-02-20  7:35 ` [PATCH 1/1] rtc: cpcap: new rtc driver Sebastian Reichel
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Sebastian Reichel @ 2017-02-20  7:35 UTC (permalink / raw)
  To: Sebastian Reichel, Tony Lindgren, Alessandro Zummo, Alexandre Belloni
  Cc: rtc-linux, linux-kernel

Hi,

Here is a driver for the RTC found inside of the
Motorola Droid 4 based on linux-next 2017021.
I tried to set & get the time using hwclock and
used ./tools/testing/selftests/timers/rtctest.c:

$ ./rtctest 

			RTC Driver Test Example.

Counting 5 update (1/sec) interrupts from reading /dev/rtc0: 1 2 3 4 5
Again, from using select(2) on /dev/rtc: 1 2 3 4 5

Current RTC date/time is 20-2-2017, 07:11:22.
Alarm time now set to 07:11:27.
Waiting 5 seconds for alarm... okay. Alarm rang.

Periodic IRQ rate is 1Hz.
Counting 20 interrupts at:
2Hz:	 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
4Hz:	 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
8Hz:	 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
16Hz:	 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
32Hz:	 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
64Hz:	 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

			 *** Test complete ***

I did not include a patch for omap4-droid4-xt894.dts,
since the CPCAP DT entry has not yet been added. The
following DT snippet can be used for testing on droid4:

&cpcap {
	cpcap_rtc: rtc {
		compatible = "motorola,cpcap-rtc";

		interrupt-parent = <&cpcap>;
		interrupts = <39 IRQ_TYPE_NONE>, <26 IRQ_TYPE_NONE>;
	};
};

-- Sebastian

Sebastian Reichel (1):
  rtc: cpcap: new rtc driver

 .../devicetree/bindings/rtc/cpcap-rtc.txt          |  13 +
 drivers/rtc/Kconfig                                |   7 +
 drivers/rtc/Makefile                               |   1 +
 drivers/rtc/rtc-cpcap.c                            | 318 +++++++++++++++++++++
 4 files changed, 339 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/cpcap-rtc.txt
 create mode 100644 drivers/rtc/rtc-cpcap.c

-- 
2.11.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2017-03-09  0:42 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-20  7:35 [PATCH 0/1] Motorola CPCAP PMIC RTC Sebastian Reichel
2017-02-20  7:35 ` [PATCH 1/1] rtc: cpcap: new rtc driver Sebastian Reichel
2017-02-20 16:31   ` Tony Lindgren
2017-02-20 16:38     ` Alexandre Belloni
2017-02-20 17:21       ` Tony Lindgren
2017-02-20 17:27         ` Tony Lindgren
2017-02-20 19:35           ` Sebastian Reichel
2017-02-21  6:16 ` [PATCHv2] " Sebastian Reichel
2017-02-21 23:52   ` Alexandre Belloni
2017-02-22  1:56     ` Sebastian Reichel
2017-02-22  8:18       ` Alexandre Belloni
2017-02-23  1:03 ` [PATCHv3 1/2] dt-bindings: Add vendor prefix for Motorola Sebastian Reichel
2017-02-23  1:03   ` [PATCHv3 2/2] rtc: cpcap: new rtc driver Sebastian Reichel
2017-02-27 23:49     ` Rob Herring
2017-02-27 23:48   ` [PATCHv3 1/2] dt-bindings: Add vendor prefix for Motorola Rob Herring
2017-03-02  0:27 ` [PATCHv4 " Sebastian Reichel
2017-03-02  0:27   ` [PATCHv4 2/2] rtc: cpcap: new rtc driver Sebastian Reichel
2017-03-02 14:11     ` Rob Herring
2017-03-09  0:34     ` Alexandre Belloni
2017-03-09  0:33   ` [PATCHv4 1/2] dt-bindings: Add vendor prefix for Motorola Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).