aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/abx500-core.c
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>2012-01-27 05:22:16 -0500
committerLee Jones <lee.jones@linaro.org>2013-02-04 03:31:34 -0500
commite0f4fec030ce412666cc127702adbf0a6cfa0855 (patch)
tree634efff527d473f99e995ec47173cd610b4c1cd4 /drivers/mfd/abx500-core.c
parentc73db9f7a20c3b6a7026cbb70df2603aa2ce2e5a (diff)
mfd: abx500-core: Provide an API to dump all ABx500 registers
Some drivers can detect subsystem failures e.g. shared memory driver can detect modem sub system failures. It would be helpful in analyzing these failures if AB register dump is available at that point. This patch adds the API for the drivers to dump AB registers in the kernel log. 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/abx500-core.c')
-rw-r--r--drivers/mfd/abx500-core.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
index 7ce65f49480f..9818afba2515 100644
--- a/drivers/mfd/abx500-core.c
+++ b/drivers/mfd/abx500-core.c
@@ -153,6 +153,22 @@ int abx500_startup_irq_enabled(struct device *dev, unsigned int irq)
153} 153}
154EXPORT_SYMBOL(abx500_startup_irq_enabled); 154EXPORT_SYMBOL(abx500_startup_irq_enabled);
155 155
156void abx500_dump_all_banks(void)
157{
158 struct abx500_ops *ops;
159 struct device dummy_child = {0};
160 struct abx500_device_entry *dev_entry;
161
162 list_for_each_entry(dev_entry, &abx500_list, list) {
163 dummy_child.parent = dev_entry->dev;
164 ops = &dev_entry->ops;
165
166 if ((ops != NULL) && (ops->dump_all_banks != NULL))
167 ops->dump_all_banks(&dummy_child);
168 }
169}
170EXPORT_SYMBOL(abx500_dump_all_banks);
171
156MODULE_AUTHOR("Mattias Wallin <mattias.wallin@stericsson.com>"); 172MODULE_AUTHOR("Mattias Wallin <mattias.wallin@stericsson.com>");
157MODULE_DESCRIPTION("ABX500 core driver"); 173MODULE_DESCRIPTION("ABX500 core driver");
158MODULE_LICENSE("GPL"); 174MODULE_LICENSE("GPL");