aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab8500-debugfs.c
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>2012-01-27 05:35:41 -0500
committerLee Jones <lee.jones@linaro.org>2013-02-04 03:31:46 -0500
commit1d843a6c8c2067615fea0ff8cb62d4a5c4a6f8ae (patch)
tree1675f7b8f36d8703cac6086d49b81ab9cfc542f6 /drivers/mfd/ab8500-debugfs.c
parent42002c6de9ee1916a118d6a732c533bfe138ed6f (diff)
mfd: ab8500-core: Allow the possibility to dump all AB8500 registers
Implement an API so that a user may dump all AB8500 registers via debugfs file access. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers/mfd/ab8500-debugfs.c')
-rw-r--r--drivers/mfd/ab8500-debugfs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index cd3cee814fb7..af6f774e658a 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -581,6 +581,19 @@ static int ab8500_print_all_banks(struct seq_file *s, void *p)
581 return 0; 581 return 0;
582} 582}
583 583
584/* Dump registers to kernel log */
585void ab8500_dump_all_banks(struct device *dev)
586{
587 unsigned int i;
588
589 printk(KERN_INFO"ab8500 register values:\n");
590
591 for (i = 1; i < AB8500_NUM_BANKS; i++) {
592 printk(KERN_INFO" bank %u:\n", i);
593 ab8500_registers_print(dev, i, NULL);
594 }
595}
596
584static int ab8500_all_banks_open(struct inode *inode, struct file *file) 597static int ab8500_all_banks_open(struct inode *inode, struct file *file)
585{ 598{
586 struct seq_file *s; 599 struct seq_file *s;