diff options
author | Mattias Wallin <mattias.wallin@stericsson.com> | 2012-05-28 09:53:58 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-03-06 23:27:25 -0500 |
commit | cfc0849c66099dc62ed6d879d8128977bd087aa7 (patch) | |
tree | e13e4805cddc98fcf70d6f24c3dac2fc270f212f /drivers/mfd/ab8500-debugfs.c | |
parent | a29264b68a93556a09005b9f18cbd3f61f6fd355 (diff) |
mfd: ab8500-debug: Print banks in hex
This patch changes bank prints to use hex value.
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Daniel WILLERUD <daniel.willerud@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/ab8500-debugfs.c')
-rw-r--r-- | drivers/mfd/ab8500-debugfs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c index 59ecd8c680ed..75366b55f16c 100644 --- a/drivers/mfd/ab8500-debugfs.c +++ b/drivers/mfd/ab8500-debugfs.c | |||
@@ -525,19 +525,19 @@ static int ab8500_registers_print(struct device *dev, u32 bank, | |||
525 | } | 525 | } |
526 | 526 | ||
527 | if (s) { | 527 | if (s) { |
528 | err = seq_printf(s, " [%u/0x%02X]: 0x%02X\n", | 528 | err = seq_printf(s, " [0x%02X/0x%02X]: 0x%02X\n", |
529 | bank, reg, value); | 529 | bank, reg, value); |
530 | if (err < 0) { | 530 | if (err < 0) { |
531 | dev_err(dev, | 531 | dev_err(dev, |
532 | "seq_printf overflow bank=%d reg=%d\n", | 532 | "seq_printf overflow bank=0x%02X reg=0x%02X\n", |
533 | bank, reg); | 533 | bank, reg); |
534 | /* Error is not returned here since | 534 | /* Error is not returned here since |
535 | * the output is wanted in any case */ | 535 | * the output is wanted in any case */ |
536 | return 0; | 536 | return 0; |
537 | } | 537 | } |
538 | } else { | 538 | } else { |
539 | printk(KERN_INFO" [%u/0x%02X]: 0x%02X\n", bank, | 539 | printk(KERN_INFO" [0x%02X/0x%02X]: 0x%02X\n", |
540 | reg, value); | 540 | bank, reg, value); |
541 | } | 541 | } |
542 | } | 542 | } |
543 | } | 543 | } |
@@ -551,7 +551,7 @@ static int ab8500_print_bank_registers(struct seq_file *s, void *p) | |||
551 | 551 | ||
552 | seq_printf(s, AB8500_NAME_STRING " register values:\n"); | 552 | seq_printf(s, AB8500_NAME_STRING " register values:\n"); |
553 | 553 | ||
554 | seq_printf(s, " bank %u:\n", bank); | 554 | seq_printf(s, " bank 0x%02X:\n", bank); |
555 | 555 | ||
556 | ab8500_registers_print(dev, bank, s); | 556 | ab8500_registers_print(dev, bank, s); |
557 | return 0; | 557 | return 0; |
@@ -579,9 +579,9 @@ static int ab8500_print_all_banks(struct seq_file *s, void *p) | |||
579 | seq_printf(s, AB8500_NAME_STRING " register values:\n"); | 579 | seq_printf(s, AB8500_NAME_STRING " register values:\n"); |
580 | 580 | ||
581 | for (i = 1; i < AB8500_NUM_BANKS; i++) { | 581 | for (i = 1; i < AB8500_NUM_BANKS; i++) { |
582 | err = seq_printf(s, " bank %u:\n", i); | 582 | err = seq_printf(s, " bank 0x%02X:\n", i); |
583 | if (err < 0) | 583 | if (err < 0) |
584 | dev_err(dev, "seq_printf overflow, bank=%d\n", i); | 584 | dev_err(dev, "seq_printf overflow, bank=0x%02X\n", i); |
585 | 585 | ||
586 | ab8500_registers_print(dev, i, s); | 586 | ab8500_registers_print(dev, i, s); |
587 | } | 587 | } |
@@ -596,7 +596,7 @@ void ab8500_dump_all_banks(struct device *dev) | |||
596 | printk(KERN_INFO"ab8500 register values:\n"); | 596 | printk(KERN_INFO"ab8500 register values:\n"); |
597 | 597 | ||
598 | for (i = 1; i < AB8500_NUM_BANKS; i++) { | 598 | for (i = 1; i < AB8500_NUM_BANKS; i++) { |
599 | printk(KERN_INFO" bank %u:\n", i); | 599 | printk(KERN_INFO" bank 0x%02X:\n", i); |
600 | ab8500_registers_print(dev, i, NULL); | 600 | ab8500_registers_print(dev, i, NULL); |
601 | } | 601 | } |
602 | } | 602 | } |
@@ -630,7 +630,7 @@ static const struct file_operations ab8500_all_banks_fops = { | |||
630 | 630 | ||
631 | static int ab8500_bank_print(struct seq_file *s, void *p) | 631 | static int ab8500_bank_print(struct seq_file *s, void *p) |
632 | { | 632 | { |
633 | return seq_printf(s, "%d\n", debug_bank); | 633 | return seq_printf(s, "0x%02X\n", debug_bank); |
634 | } | 634 | } |
635 | 635 | ||
636 | static int ab8500_bank_open(struct inode *inode, struct file *file) | 636 | static int ab8500_bank_open(struct inode *inode, struct file *file) |