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>
This commit is contained in:
committed by
Lee Jones
parent
a29264b68a
commit
cfc0849c66
@ -525,19 +525,19 @@ static int ab8500_registers_print(struct device *dev, u32 bank,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (s) {
|
if (s) {
|
||||||
err = seq_printf(s, " [%u/0x%02X]: 0x%02X\n",
|
err = seq_printf(s, " [0x%02X/0x%02X]: 0x%02X\n",
|
||||||
bank, reg, value);
|
bank, reg, value);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(dev,
|
dev_err(dev,
|
||||||
"seq_printf overflow bank=%d reg=%d\n",
|
"seq_printf overflow bank=0x%02X reg=0x%02X\n",
|
||||||
bank, reg);
|
bank, reg);
|
||||||
/* Error is not returned here since
|
/* Error is not returned here since
|
||||||
* the output is wanted in any case */
|
* the output is wanted in any case */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_INFO" [%u/0x%02X]: 0x%02X\n", bank,
|
printk(KERN_INFO" [0x%02X/0x%02X]: 0x%02X\n",
|
||||||
reg, value);
|
bank, reg, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -551,7 +551,7 @@ static int ab8500_print_bank_registers(struct seq_file *s, void *p)
|
|||||||
|
|
||||||
seq_printf(s, AB8500_NAME_STRING " register values:\n");
|
seq_printf(s, AB8500_NAME_STRING " register values:\n");
|
||||||
|
|
||||||
seq_printf(s, " bank %u:\n", bank);
|
seq_printf(s, " bank 0x%02X:\n", bank);
|
||||||
|
|
||||||
ab8500_registers_print(dev, bank, s);
|
ab8500_registers_print(dev, bank, s);
|
||||||
return 0;
|
return 0;
|
||||||
@ -579,9 +579,9 @@ static int ab8500_print_all_banks(struct seq_file *s, void *p)
|
|||||||
seq_printf(s, AB8500_NAME_STRING " register values:\n");
|
seq_printf(s, AB8500_NAME_STRING " register values:\n");
|
||||||
|
|
||||||
for (i = 1; i < AB8500_NUM_BANKS; i++) {
|
for (i = 1; i < AB8500_NUM_BANKS; i++) {
|
||||||
err = seq_printf(s, " bank %u:\n", i);
|
err = seq_printf(s, " bank 0x%02X:\n", i);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
dev_err(dev, "seq_printf overflow, bank=%d\n", i);
|
dev_err(dev, "seq_printf overflow, bank=0x%02X\n", i);
|
||||||
|
|
||||||
ab8500_registers_print(dev, i, s);
|
ab8500_registers_print(dev, i, s);
|
||||||
}
|
}
|
||||||
@ -596,7 +596,7 @@ void ab8500_dump_all_banks(struct device *dev)
|
|||||||
printk(KERN_INFO"ab8500 register values:\n");
|
printk(KERN_INFO"ab8500 register values:\n");
|
||||||
|
|
||||||
for (i = 1; i < AB8500_NUM_BANKS; i++) {
|
for (i = 1; i < AB8500_NUM_BANKS; i++) {
|
||||||
printk(KERN_INFO" bank %u:\n", i);
|
printk(KERN_INFO" bank 0x%02X:\n", i);
|
||||||
ab8500_registers_print(dev, i, NULL);
|
ab8500_registers_print(dev, i, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -630,7 +630,7 @@ static const struct file_operations ab8500_all_banks_fops = {
|
|||||||
|
|
||||||
static int ab8500_bank_print(struct seq_file *s, void *p)
|
static int ab8500_bank_print(struct seq_file *s, void *p)
|
||||||
{
|
{
|
||||||
return seq_printf(s, "%d\n", debug_bank);
|
return seq_printf(s, "0x%02X\n", debug_bank);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ab8500_bank_open(struct inode *inode, struct file *file)
|
static int ab8500_bank_open(struct inode *inode, struct file *file)
|
||||||
|
Reference in New Issue
Block a user