Skip to contentSkip to conversation

lemote: rtc driver binary mode support

PATCH In review yanhua 3 participants 3 messages Apr 9, 2009 – Apr 13, 2009

Subsystems (2)
lore
Share & tools
lore

yanhua

author
#0 lore raw

PATCH 10/14 lemote: rtc driver binary mode support

The original driver will exit when detect rtc binary mode. In fact both the binary mode and bcd are supported
---
drivers/rtc/rtc-cmos.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
drivers/rtc/rtc-cmos.c +0 -0
index b6d35f5..85c327e 100644
@@ -757,7 +757,7 @@ cmos_do_probe(struct device *dev, struct resource

*ports, int rtc_irq)
* <asm-generic/rtc.h> doesn't know 12-hour mode either.
*/
if (is_valid_irq(rtc_irq) &&
- (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY)))) {
+ (!(rtc_control & RTC_24H) /*|| (rtc_control & (RTC_DM_BINARY))*/)) { dev_dbg(dev, "only 24-hr BCD mode supported\n");
retval = -ENXIO;
goto cleanup1;

Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 2 lines · yanhua

The original driver will exit when detect rtc binary mode. In fact both the binary mode and bcd are supported

[...]

Quoted 8 lines
drivers/rtc/rtc-cmos.c +0 -0
index b6d35f5..85c327e 100644
@@ -757,7 +757,7 @@ cmos_do_probe(struct device *dev, struct resource
 *ports, int rtc_irq)
 * <asm-generic/rtc.h> doesn't know 12-hour mode either.
 */
Quoted 4 lines

if (is_valid_irq(rtc_irq) &&
- (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY)))) {
+ (!(rtc_control & RTC_24H) /*|| (rtc_control & (RTC_DM_BINARY))*/)) { dev_dbg(dev, "only 24-hr BCD mode supported\n");

Perhaps the message should be changed too then...

Quoted 2 lines

retval = -ENXIO;
goto cleanup1;

WBR, Sergei

#2 lore raw
In reply to yanhua
Quoted 3 lines · yanhua

if (is_valid_irq(rtc_irq) &&
- (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY)))) {
+ (!(rtc_control & RTC_24H) /*|| (rtc_control & (RTC_DM_BINARY))*/)) {

Why not just remove this part "/*|| (rtc_control & (RTC_DM_BINARY))*/" ?

Quoted 3 lines

dev_dbg(dev, "only 24-hr BCD mode supported\n");
retval = -ENXIO;
goto cleanup1;

Zhang, Le