All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] rtc: add rtc_{read,write}8_array and rtc command
@ 2020-05-04 21:20 Rasmus Villemoes
  2020-05-04 21:20 ` [PATCH 1/6] rtc: add rtc_read8_array helper and ->read8_array method Rasmus Villemoes
                   ` (6 more replies)
  0 siblings, 7 replies; 39+ messages in thread
From: Rasmus Villemoes @ 2020-05-04 21:20 UTC (permalink / raw)
  To: u-boot

I need access to registers other than just the timekeeping ones of the
pcf2127, so I wanted to implement ->read8 and ->write8. But for
testing these it appeared there was no convenient way to invoke those
from the shell, so I also ended up adding such a command.

Also, it seemed more natural to provide array variants that can read
or write several registers at once, so rtc_ops is expanded a bit.

There are a few things one could do on top, but for now I just want
some feedback, especially on the new _array methods. "rtc set", "rtc
get" and "rtc reset" are rather obvious subsommands to add at some
point. Also, rtc_{read,write}{16,32} can be simplified a bit, along
the lines of

__le16 v;
int ret = rtc_read8_array(dev, reg, &v, 2);
if (ret)
  return ret;
*valuep = __le16_to_cpu(v);
return 0;

Rasmus Villemoes (6):
  rtc: add rtc_read8_array helper and ->read8_array method
  rtc: add rtc_write8_array() helper
  rtc: fall back to ->{read,write}8_array if ->{read,write}8 are not
    provided
  rtc: pcf2127: provide ->read8_array method
  rtc: pcf2127: provide ->write8_array method
  rtc: add rtc command

 cmd/Kconfig              |   6 ++
 cmd/Makefile             |   1 +
 cmd/rtc.c                | 153 +++++++++++++++++++++++++++++++++++++++
 drivers/rtc/pcf2127.c    |  14 +++-
 drivers/rtc/rtc-uclass.c |  53 +++++++++++++-
 include/rtc.h            |  48 ++++++++++++
 6 files changed, 270 insertions(+), 5 deletions(-)
 create mode 100644 cmd/rtc.c

-- 
2.23.0

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

end of thread, other threads:[~2020-06-02 20:56 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 21:20 [PATCH 0/6] rtc: add rtc_{read,write}8_array and rtc command Rasmus Villemoes
2020-05-04 21:20 ` [PATCH 1/6] rtc: add rtc_read8_array helper and ->read8_array method Rasmus Villemoes
2020-05-06  3:42   ` Simon Glass
2020-05-06  8:13     ` Rasmus Villemoes
2020-05-04 21:20 ` [PATCH 2/6] rtc: add rtc_write8_array() helper Rasmus Villemoes
2020-05-06  3:42   ` Simon Glass
2020-05-04 21:20 ` [PATCH 3/6] rtc: fall back to ->{read, write}8_array if ->{read, write}8 are not provided Rasmus Villemoes
2020-05-06  3:42   ` [PATCH 3/6] rtc: fall back to ->{read,write}8_array if ->{read,write}8 " Simon Glass
2020-05-04 21:20 ` [PATCH 4/6] rtc: pcf2127: provide ->read8_array method Rasmus Villemoes
2020-05-06  3:42   ` Simon Glass
2020-05-04 21:20 ` [PATCH 5/6] rtc: pcf2127: provide ->write8_array method Rasmus Villemoes
2020-05-06  3:42   ` Simon Glass
2020-05-04 21:20 ` [PATCH 6/6] rtc: add rtc command Rasmus Villemoes
2020-05-06  3:42   ` Simon Glass
2020-05-19 22:01 ` [PATCH v2 00/10] new rtc methods, rtc command, and tests Rasmus Villemoes
2020-05-19 22:01   ` [PATCH v2 01/10] rtc: add rtc_read helper and ->read method Rasmus Villemoes
2020-05-19 22:01   ` [PATCH v2 02/10] rtc: add rtc_write() helper Rasmus Villemoes
2020-05-19 22:01   ` [PATCH v2 03/10] rtc: fall back to ->{read, write} if ->{read, write}8 are not provided Rasmus Villemoes
2020-05-19 22:01   ` [PATCH v2 04/10] rtc: pcf2127: provide ->read method Rasmus Villemoes
2020-05-19 22:01   ` [PATCH v2 05/10] rtc: pcf2127: provide ->write method Rasmus Villemoes
2020-05-19 22:01   ` [PATCH v2 06/10] rtc: add rtc command Rasmus Villemoes
2020-05-31 14:07     ` Simon Glass
2020-06-02  9:13       ` Rasmus Villemoes
2020-06-02 13:22         ` Simon Glass
2020-06-02 14:36           ` Rasmus Villemoes
2020-06-02 19:29             ` Simon Glass
2020-05-19 22:01   ` [PATCH v2 07/10] rtc: sandbox-rtc: fix set method Rasmus Villemoes
2020-05-31 14:07     ` Simon Glass
2020-05-19 22:01   ` [PATCH v2 08/10] rtc: i2c_rtc_emul: catch any write to the "reset" register Rasmus Villemoes
2020-05-31 14:07     ` Simon Glass
2020-05-19 22:01   ` [PATCH v2 09/10] test: dm: rtc: add test of rtc_read, rtc_write Rasmus Villemoes
2020-05-31 14:07     ` Simon Glass
2020-05-19 22:01   ` [PATCH v2 10/10] test: dm: rtc: add tests of rtc shell command Rasmus Villemoes
2020-05-31 14:07     ` Simon Glass
2020-06-02  9:15       ` Rasmus Villemoes
2020-06-02 18:40   ` [PATCH v2 00/10] new rtc methods, rtc command, and tests Rasmus Villemoes
2020-06-02 19:29     ` Simon Glass
2020-06-02 19:44       ` Rasmus Villemoes
2020-06-02 20:56         ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.