aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-10-10 10:58:13 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2008-10-13 16:51:56 -0400
commitbcdd4efc1b6b8b98f30e127115f4bc7bbcd6f7ce (patch)
tree5f58a36bcfefb07cc9a44faf38c91b8bc7e3c1c1 /include/linux/mfd
parent0e7203933224cbe09b5a9125f55b177b8dd5b1bd (diff)
mfd: Add initialisation callback for WM8350
Some functions of the WM8350 require board-specific initialisation on startup. Provide a callback to the WM8350 driver in platform data for platforms to use to configure the chip. Use of a callback allows platforms to control the ordering of initialisation which can be important. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/wm8350/core.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/mfd/wm8350/core.h b/include/linux/mfd/wm8350/core.h
index 94778c1669dc..8f2beae6278e 100644
--- a/include/linux/mfd/wm8350/core.h
+++ b/include/linux/mfd/wm8350/core.h
@@ -564,10 +564,22 @@ struct wm8350 {
564 u16 *reg_cache; 564 u16 *reg_cache;
565}; 565};
566 566
567/**
568 * Data to be supplied by the platform to initialise the WM8350.
569 *
570 * @init: Function called during driver initialisation. Should be
571 * used by the platform to configure GPIO functions and similar.
572 */
573struct wm8350_platform_data {
574 int (*init)(struct wm8350 *wm8350);
575};
576
577
567/* 578/*
568 * WM8350 device initialisation and exit. 579 * WM8350 device initialisation and exit.
569 */ 580 */
570int wm8350_device_init(struct wm8350 *wm8350); 581int wm8350_device_init(struct wm8350 *wm8350,
582 struct wm8350_platform_data *pdata);
571void wm8350_device_exit(struct wm8350 *wm8350); 583void wm8350_device_exit(struct wm8350 *wm8350);
572 584
573/* 585/*