aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/ab8500-core.c1
-rw-r--r--drivers/mfd/ab8500-debugfs.c13
-rw-r--r--include/linux/mfd/abx500/ab8500.h6
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index e1650badd106..d228697f5d9b 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -319,6 +319,7 @@ static struct abx500_ops ab8500_ops = {
319 .mask_and_set_register = ab8500_mask_and_set_register, 319 .mask_and_set_register = ab8500_mask_and_set_register,
320 .event_registers_startup_state_get = NULL, 320 .event_registers_startup_state_get = NULL,
321 .startup_irq_enabled = NULL, 321 .startup_irq_enabled = NULL,
322 .dump_all_banks = ab8500_dump_all_banks,
322}; 323};
323 324
324static void ab8500_irq_lock(struct irq_data *data) 325static void ab8500_irq_lock(struct irq_data *data)
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;
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 5251bca56326..dbec7b00ea83 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -345,4 +345,10 @@ static inline int is_ab8500_2p0(struct ab8500 *ab)
345 return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0)); 345 return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0));
346} 346}
347 347
348#ifdef CONFIG_AB8500_DEBUG
349void ab8500_dump_all_banks(struct device *dev);
350#else
351static inline void ab8500_dump_all_banks(struct device *dev) {}
352#endif
353
348#endif /* MFD_AB8500_H */ 354#endif /* MFD_AB8500_H */