diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-ds1305.c | 8 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds1307.c | 17 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds1685.c | 12 |
3 files changed, 11 insertions, 26 deletions
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c index 85706a9f82c9..f39691eea736 100644 --- a/drivers/rtc/rtc-ds1305.c +++ b/drivers/rtc/rtc-ds1305.c | |||
@@ -186,9 +186,7 @@ static int ds1305_get_time(struct device *dev, struct rtc_time *time) | |||
186 | if (status < 0) | 186 | if (status < 0) |
187 | return status; | 187 | return status; |
188 | 188 | ||
189 | dev_vdbg(dev, "%s: %02x %02x %02x, %02x %02x %02x %02x\n", | 189 | dev_vdbg(dev, "%s: %3ph, %4ph\n", "read", &buf[0], &buf[3]); |
190 | "read", buf[0], buf[1], buf[2], buf[3], | ||
191 | buf[4], buf[5], buf[6]); | ||
192 | 190 | ||
193 | /* Decode the registers */ | 191 | /* Decode the registers */ |
194 | time->tm_sec = bcd2bin(buf[DS1305_SEC]); | 192 | time->tm_sec = bcd2bin(buf[DS1305_SEC]); |
@@ -232,9 +230,7 @@ static int ds1305_set_time(struct device *dev, struct rtc_time *time) | |||
232 | *bp++ = bin2bcd(time->tm_mon + 1); | 230 | *bp++ = bin2bcd(time->tm_mon + 1); |
233 | *bp++ = bin2bcd(time->tm_year - 100); | 231 | *bp++ = bin2bcd(time->tm_year - 100); |
234 | 232 | ||
235 | dev_dbg(dev, "%s: %02x %02x %02x, %02x %02x %02x %02x\n", | 233 | dev_dbg(dev, "%s: %3ph, %4ph\n", "write", &buf[1], &buf[4]); |
236 | "write", buf[1], buf[2], buf[3], | ||
237 | buf[4], buf[5], buf[6], buf[7]); | ||
238 | 234 | ||
239 | /* use write-then-read since dma from stack is nonportable */ | 235 | /* use write-then-read since dma from stack is nonportable */ |
240 | return spi_write_then_read(ds1305->spi, buf, sizeof(buf), | 236 | return spi_write_then_read(ds1305->spi, buf, sizeof(buf), |
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index aa705bb4748c..cf685f67b391 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c | |||
@@ -460,13 +460,8 @@ static int ds1337_read_alarm(struct device *dev, struct rtc_wkalrm *t) | |||
460 | return -EIO; | 460 | return -EIO; |
461 | } | 461 | } |
462 | 462 | ||
463 | dev_dbg(dev, "%s: %02x %02x %02x %02x, %02x %02x %02x, %02x %02x\n", | 463 | dev_dbg(dev, "%s: %4ph, %3ph, %2ph\n", "alarm read", |
464 | "alarm read", | 464 | &ds1307->regs[0], &ds1307->regs[4], &ds1307->regs[7]); |
465 | ds1307->regs[0], ds1307->regs[1], | ||
466 | ds1307->regs[2], ds1307->regs[3], | ||
467 | ds1307->regs[4], ds1307->regs[5], | ||
468 | ds1307->regs[6], ds1307->regs[7], | ||
469 | ds1307->regs[8]); | ||
470 | 465 | ||
471 | /* | 466 | /* |
472 | * report alarm time (ALARM1); assume 24 hour and day-of-month modes, | 467 | * report alarm time (ALARM1); assume 24 hour and day-of-month modes, |
@@ -522,12 +517,8 @@ static int ds1337_set_alarm(struct device *dev, struct rtc_wkalrm *t) | |||
522 | control = ds1307->regs[7]; | 517 | control = ds1307->regs[7]; |
523 | status = ds1307->regs[8]; | 518 | status = ds1307->regs[8]; |
524 | 519 | ||
525 | dev_dbg(dev, "%s: %02x %02x %02x %02x, %02x %02x %02x, %02x %02x\n", | 520 | dev_dbg(dev, "%s: %4ph, %3ph, %02x %02x\n", "alarm set (old status)", |
526 | "alarm set (old status)", | 521 | &ds1307->regs[0], &ds1307->regs[4], control, status); |
527 | ds1307->regs[0], ds1307->regs[1], | ||
528 | ds1307->regs[2], ds1307->regs[3], | ||
529 | ds1307->regs[4], ds1307->regs[5], | ||
530 | ds1307->regs[6], control, status); | ||
531 | 522 | ||
532 | /* set ALARM1, using 24 hour and day-of-month modes */ | 523 | /* set ALARM1, using 24 hour and day-of-month modes */ |
533 | buf[0] = bin2bcd(t->time.tm_sec); | 524 | buf[0] = bin2bcd(t->time.tm_sec); |
diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c index 05a51ef52703..5038122aa8de 100644 --- a/drivers/rtc/rtc-ds1685.c +++ b/drivers/rtc/rtc-ds1685.c | |||
@@ -853,7 +853,7 @@ ds1685_rtc_proc(struct device *dev, struct seq_file *seq) | |||
853 | "Periodic Rate\t: %s\n" | 853 | "Periodic Rate\t: %s\n" |
854 | "SQW Freq\t: %s\n" | 854 | "SQW Freq\t: %s\n" |
855 | #ifdef CONFIG_RTC_DS1685_PROC_REGS | 855 | #ifdef CONFIG_RTC_DS1685_PROC_REGS |
856 | "Serial #\t: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n" | 856 | "Serial #\t: %8phC\n" |
857 | "Register Status\t:\n" | 857 | "Register Status\t:\n" |
858 | " Ctrl A\t: UIP DV2 DV1 DV0 RS3 RS2 RS1 RS0\n" | 858 | " Ctrl A\t: UIP DV2 DV1 DV0 RS3 RS2 RS1 RS0\n" |
859 | "\t\t: %s\n" | 859 | "\t\t: %s\n" |
@@ -872,7 +872,7 @@ ds1685_rtc_proc(struct device *dev, struct seq_file *seq) | |||
872 | " Ctrl 4B\t: ABE E32k CS RCE PRS RIE WIE KSE\n" | 872 | " Ctrl 4B\t: ABE E32k CS RCE PRS RIE WIE KSE\n" |
873 | "\t\t: %s\n", | 873 | "\t\t: %s\n", |
874 | #else | 874 | #else |
875 | "Serial #\t: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", | 875 | "Serial #\t: %8phC\n", |
876 | #endif | 876 | #endif |
877 | model, | 877 | model, |
878 | ((ctrla & RTC_CTRL_A_DV1) ? "enabled" : "disabled"), | 878 | ((ctrla & RTC_CTRL_A_DV1) ? "enabled" : "disabled"), |
@@ -888,7 +888,7 @@ ds1685_rtc_proc(struct device *dev, struct seq_file *seq) | |||
888 | (!((ctrl4b & RTC_CTRL_4B_E32K)) ? | 888 | (!((ctrl4b & RTC_CTRL_4B_E32K)) ? |
889 | ds1685_rtc_sqw_freq[(ctrla & RTC_CTRL_A_RS_MASK)] : "32768Hz"), | 889 | ds1685_rtc_sqw_freq[(ctrla & RTC_CTRL_A_RS_MASK)] : "32768Hz"), |
890 | #ifdef CONFIG_RTC_DS1685_PROC_REGS | 890 | #ifdef CONFIG_RTC_DS1685_PROC_REGS |
891 | ssn[0], ssn[1], ssn[2], ssn[3], ssn[4], ssn[5], ssn[6], ssn[7], | 891 | ssn, |
892 | ds1685_rtc_print_regs(ctrla, bits[0]), | 892 | ds1685_rtc_print_regs(ctrla, bits[0]), |
893 | ds1685_rtc_print_regs(ctrlb, bits[1]), | 893 | ds1685_rtc_print_regs(ctrlb, bits[1]), |
894 | ds1685_rtc_print_regs(ctrlc, bits[2]), | 894 | ds1685_rtc_print_regs(ctrlc, bits[2]), |
@@ -896,7 +896,7 @@ ds1685_rtc_proc(struct device *dev, struct seq_file *seq) | |||
896 | ds1685_rtc_print_regs(ctrl4a, bits[4]), | 896 | ds1685_rtc_print_regs(ctrl4a, bits[4]), |
897 | ds1685_rtc_print_regs(ctrl4b, bits[5])); | 897 | ds1685_rtc_print_regs(ctrl4b, bits[5])); |
898 | #else | 898 | #else |
899 | ssn[0], ssn[1], ssn[2], ssn[3], ssn[4], ssn[5], ssn[6], ssn[7]); | 899 | ssn); |
900 | #endif | 900 | #endif |
901 | return 0; | 901 | return 0; |
902 | } | 902 | } |
@@ -1160,9 +1160,7 @@ ds1685_rtc_sysfs_serial_show(struct device *dev, | |||
1160 | ds1685_rtc_get_ssn(rtc, ssn); | 1160 | ds1685_rtc_get_ssn(rtc, ssn); |
1161 | ds1685_rtc_switch_to_bank0(rtc); | 1161 | ds1685_rtc_switch_to_bank0(rtc); |
1162 | 1162 | ||
1163 | return snprintf(buf, 24, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", | 1163 | return snprintf(buf, 24, "%8phC\n", ssn); |
1164 | ssn[0], ssn[1], ssn[2], ssn[3], ssn[4], ssn[5], | ||
1165 | ssn[6], ssn[7]); | ||
1166 | 1164 | ||
1167 | return 0; | 1165 | return 0; |
1168 | } | 1166 | } |