DS1307 RTC update
cover DS1307 RTC update
The first patch is the addition of a KConfig option for the date command. I haven't updated any boards to use the new option due to the sheer number of boards that would affect. It's probably better if board maintainers switch if/when they're ready.
The second patch is the change I really want to see. As it allows me to switch a board I'm working on over to the driver model. I've tried to replicate the non-DM version of the driver faithfully but I've only got access to a ds1340 device so I can't be sure that the mcp7941x specific code is correct.
Chris Packham (2):
cmd: add Kconfig option for 'date' command
rtc: Add DM support to ds1307
cmd/Kconfig | 6 ++ drivers/rtc/Kconfig | 7 ++ drivers/rtc/ds1307.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 190 insertions(+), 19 deletions(-)
Signature · 1 line
2.10.1
PATCH 1/2 cmd: add Kconfig option for 'date' command
---
cmd/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
cmd/Kconfig +6 -0
@@ -676,6 +676,12 @@ config CMD_LED with led on/off/togle/blink. Any LED drivers can be controlled with this command, e.g. led_gpio. +config CMD_DATE + bool "date" + help + Enable the 'date' command for getting/setting the time/date in RTC + devices. + config CMD_TIME bool "time" help
Signature · 1 line
2.10.1
PATCH 2/2 rtc: Add DM support to ds1307
In reply to Chris PackhamAdd an implementation of the ds1307 driver that uses the driver model i2c APIs.
---
drivers/rtc/Kconfig | 7 ++ drivers/rtc/ds1307.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 184 insertions(+), 19 deletions(-)
drivers/rtc/Kconfig +7 -0
@@ -23,4 +23,11 @@ config RTC_PCF2127 has a selectable I2C-bus or SPI-bus, a backup battery switch-over circuit, a programmable watchdog function, a timestamp function, and many other features. +config RTC_DS1307 + bool "Enable DS1307 driver" + depends on DM_RTC + help + Support for Dallas Semiconductor (now Maxim) DS1307 and DS1338/9 and + compatible Real Time Clock devices. + endmenu
drivers/rtc/ds1307.c +177 -19
216 lines not on this page · raw message
Signature · 1 line
2.10.1
cover DS1307 RTC update
In reply to Chris Packham+Tom
Hi Chris,
Quoted 5 lines · Chris Packham
The first patch is the addition of a KConfig option for the date command. I haven't updated any boards to use the new option due to the sheer number of boards that would affect. It's probably better if board maintainers switch if/when they're ready.
You should be able to use moveconfig.py to do this automatically.
I'm not sure of the best method here.
Tom, do you expect people to run the tool or are you doing this yourself before you apply it?
Quoted 11 lines
The second patch is the change I really want to see. As it allows me to switch a board I'm working on over to the driver model. I've tried to replicate the non-DM version of the driver faithfully but I've only got access to a ds1340 device so I can't be sure that the mcp7941x specific code is correct.
Chris Packham (2):
cmd: addKconfigoption for 'date' command
rtc: Add DM support to ds1307
Quoted 8 lines
cmd/Kconfig | 6 ++ drivers/rtc/Kconfig | 7 ++ drivers/rtc/ds1307.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 190 insertions(+), 19 deletions(-)--
2.10.1
Regards,
Simon
cover DS1307 RTC update
Quoted 11 lines · Simon Glass
+Tom
Hi Chris,
Quoted 5 lines · Chris Packham
The first patch is the addition of a KConfig option for the date command. I haven't updated any boards to use the new option due to the sheer number of boards that would affect. It's probably better if board maintainers switch if/when they're ready.
Quoted 6 lines
You should be able to use
moveconfig.pyto do this automatically.I'm not sure of the best method here.
Tom, do you expect people to run the tool or are you doing this yourself before you apply it?
It depends greatly on the complexity. I appreciate it when people do it and this is probably an easy one to move. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170425/ee88d974/attachment.sig>