Add driver for the ST M41T94 SPI RTC
PATCH 1/1 Add driver for the ST M41T94 SPI RTC
This RTC is used in some Calao boards. The driver code is taken from the linux rtc-m41t94 driver
---
I guess the bin2bcd and bcd2bin functions belong somewhere in common/ rather than this particular driver ... Where should I put them ?
drivers/rtc/Makefile | 1 + drivers/rtc/m41t94.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 0 deletions(-) create mode 100644 drivers/rtc/m41t94.c
drivers/rtc/Makefile +1 -0
@@ -44,6 +44,7 @@ COBJS-$(CONFIG_RTC_ISL1208) += isl1208.o COBJS-$(CONFIG_RTC_M41T11) += m41t11.o COBJS-$(CONFIG_RTC_M41T60) += m41t60.o COBJS-$(CONFIG_RTC_M41T62) += m41t62.o +COBJS-$(CONFIG_RTC_M41T94) += m41t94.o COBJS-$(CONFIG_RTC_M48T35A) += m48t35ax.o COBJS-$(CONFIG_RTC_MAX6900) += max6900.o COBJS-$(CONFIG_RTC_MC13783) += mc13783-rtc.o
drivers/rtc/m41t94.c new file +137 -0
137 lines not on this page · raw message
Signature · 1 line
1.6.0.4
PATCH 1/1 Add driver for the ST M41T94 SPI RTC
Quoted 8 lines · On Thursday 13 August 2009 12:14:30 Albin Tonnerre wrote:
This RTC is used in some Calao boards. The driver code is taken from the linux rtc-m41t94 driver
Signed-off-by Albin Tonnerre <[email protected]>---
I guess the bin2bcd and bcd2bin functions belong somewhere in common/ rather than this particular driver ... Where should I put them ?
Currently we also have BIN2BCD/BCD2BIN macros in include/bcd.h. We should probably move to these lowercase inlined functions though. Perhaps you could create a patch to switch from BIN2BCD to bin2bcd in the RTC drivers and add those functions to bcd.h?
Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 1/1 Add driver for the ST M41T94 SPI RTC
Quoted 7 lines · Stefan Roese
Quoted 6 lines · On Thursday 13 August 2009 12:14:30 Albin Tonnerre wrote:
This RTC is used in some Calao boards. The driver code is taken from the linux rtc-m41t94 driver
Signed-off-by Albin Tonnerre <[email protected]>---
Quoted 7 lines
Quoted 2 lines
I guess the bin2bcd and bcd2bin functions belong somewhere in common/ rather than this particular driver ... Where should I put them ?
Currently we also have BIN2BCD/BCD2BIN macros in
include/bcd.h. We should probably move to these lowercase inlined functions though. Perhaps you could create a patch to switch from BIN2BCD to bin2bcd in the RTC drivers and add those functions tobcd.h?
Heh, I see that nearly all the rtc drivers define those functions too ... Will submit a patch to clean that up
Regards,
Signature · 4 lines
Albin Tonnerre, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v2 1/1 Add driver for the ST M41T94 SPI RTC
In reply to Stefan RoeseThis RTC is used in some Calao boards. The driver code is taken from the linux rtc-m41t94 driver
---
Changelog since V1:
- Use the common bin2bcd/bcd2bin functions. This patch depends on:
1250170272-25909-2-git-send-email-albin.tonnerre at free-electrons.com
drivers/rtc/Makefile | 1 + drivers/rtc/m41t94.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 drivers/rtc/m41t94.c
drivers/rtc/Makefile +1 -0
@@ -44,6 +44,7 @@ COBJS-$(CONFIG_RTC_ISL1208) += isl1208.o COBJS-$(CONFIG_RTC_M41T11) += m41t11.o COBJS-$(CONFIG_RTC_M41T60) += m41t60.o COBJS-$(CONFIG_RTC_M41T62) += m41t62.o +COBJS-$(CONFIG_RTC_M41T94) += m41t94.o COBJS-$(CONFIG_RTC_M48T35A) += m48t35ax.o COBJS-$(CONFIG_RTC_MAX6900) += max6900.o COBJS-$(CONFIG_RTC_MC13783) += mc13783-rtc.o
drivers/rtc/m41t94.c new file +124 -0
124 lines not on this page · raw message
Signature · 1 line
1.6.0.4
PATCH v2 1/1 Add driver for the ST M41T94 SPI RTC
Dear Albin Tonnerre,
Quoted 7 lines · In message <1250183564-6140-1-git-send-email-albin.tonnerre@free-electrons.com>…
This RTC is used in some Calao boards. The driver code is taken from the linux rtc-m41t94 driver
Signed-off-by Albin Tonnerre <[email protected]>---
Changelog since V1:
- Use the common bin2bcd/bcd2bin functions. This patch depends on:
Quoted 6 lines
1250170272-25909-2-git-send-email-albin.tonnerre at free-electrons.comdrivers/rtc/Makefile | 1 + drivers/rtc/m41t94.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 drivers/rtc/m41t94.c
Aplied to "next", thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There are three things I always forget. Names, faces - the third I can't remember. - Italo Svevo