lemote: rtc driver binary mode support
Subsystems (2)
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
@@ -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
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@@ -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
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