diff options
-rw-r--r-- | drivers/mfd/wm8350-core.c | 18 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/audio.h | 6 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/core.h | 10 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/gpio.h | 6 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/rtc.h | 6 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/supply.h | 6 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/wdt.h | 8 |
7 files changed, 57 insertions, 3 deletions
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index cd1f76efed4e..382e38c66914 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c | |||
@@ -1234,6 +1234,15 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq, | |||
1234 | 1234 | ||
1235 | wm8350_reg_write(wm8350, WM8350_SYSTEM_INTERRUPTS_MASK, 0x0); | 1235 | wm8350_reg_write(wm8350, WM8350_SYSTEM_INTERRUPTS_MASK, 0x0); |
1236 | 1236 | ||
1237 | wm8350_client_dev_register(wm8350, "wm8350-codec", | ||
1238 | &(wm8350->codec.pdev)); | ||
1239 | wm8350_client_dev_register(wm8350, "wm8350-gpio", | ||
1240 | &(wm8350->gpio.pdev)); | ||
1241 | wm8350_client_dev_register(wm8350, "wm8350-power", | ||
1242 | &(wm8350->power.pdev)); | ||
1243 | wm8350_client_dev_register(wm8350, "wm8350-rtc", &(wm8350->rtc.pdev)); | ||
1244 | wm8350_client_dev_register(wm8350, "wm8350-wdt", &(wm8350->wdt.pdev)); | ||
1245 | |||
1237 | return 0; | 1246 | return 0; |
1238 | 1247 | ||
1239 | err: | 1248 | err: |
@@ -1247,8 +1256,13 @@ void wm8350_device_exit(struct wm8350 *wm8350) | |||
1247 | int i; | 1256 | int i; |
1248 | 1257 | ||
1249 | for (i = 0; i < ARRAY_SIZE(wm8350->pmic.pdev); i++) | 1258 | for (i = 0; i < ARRAY_SIZE(wm8350->pmic.pdev); i++) |
1250 | if (wm8350->pmic.pdev[i] != NULL) | 1259 | platform_device_unregister(wm8350->pmic.pdev[i]); |
1251 | platform_device_unregister(wm8350->pmic.pdev[i]); | 1260 | |
1261 | platform_device_unregister(wm8350->wdt.pdev); | ||
1262 | platform_device_unregister(wm8350->rtc.pdev); | ||
1263 | platform_device_unregister(wm8350->power.pdev); | ||
1264 | platform_device_unregister(wm8350->gpio.pdev); | ||
1265 | platform_device_unregister(wm8350->codec.pdev); | ||
1252 | 1266 | ||
1253 | free_irq(wm8350->chip_irq, wm8350); | 1267 | free_irq(wm8350->chip_irq, wm8350); |
1254 | flush_work(&wm8350->irq_work); | 1268 | flush_work(&wm8350->irq_work); |
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h index 43342f767112..217bb22ebb8e 100644 --- a/include/linux/mfd/wm8350/audio.h +++ b/include/linux/mfd/wm8350/audio.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef __LINUX_MFD_WM8350_AUDIO_H_ | 13 | #ifndef __LINUX_MFD_WM8350_AUDIO_H_ |
14 | #define __LINUX_MFD_WM8350_AUDIO_H_ | 14 | #define __LINUX_MFD_WM8350_AUDIO_H_ |
15 | 15 | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
16 | #define WM8350_CLOCK_CONTROL_1 0x28 | 18 | #define WM8350_CLOCK_CONTROL_1 0x28 |
17 | #define WM8350_CLOCK_CONTROL_2 0x29 | 19 | #define WM8350_CLOCK_CONTROL_2 0x29 |
18 | #define WM8350_FLL_CONTROL_1 0x2A | 20 | #define WM8350_FLL_CONTROL_1 0x2A |
@@ -589,4 +591,8 @@ | |||
589 | #define WM8350_IRQ_CODEC_MICSCD 41 | 591 | #define WM8350_IRQ_CODEC_MICSCD 41 |
590 | #define WM8350_IRQ_CODEC_MICD 42 | 592 | #define WM8350_IRQ_CODEC_MICD 42 |
591 | 593 | ||
594 | struct wm8350_codec { | ||
595 | struct platform_device *pdev; | ||
596 | }; | ||
597 | |||
592 | #endif | 598 | #endif |
diff --git a/include/linux/mfd/wm8350/core.h b/include/linux/mfd/wm8350/core.h index 348101cb00dc..6ebf97f2a475 100644 --- a/include/linux/mfd/wm8350/core.h +++ b/include/linux/mfd/wm8350/core.h | |||
@@ -17,7 +17,12 @@ | |||
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
19 | 19 | ||
20 | #include <linux/mfd/wm8350/audio.h> | ||
21 | #include <linux/mfd/wm8350/gpio.h> | ||
20 | #include <linux/mfd/wm8350/pmic.h> | 22 | #include <linux/mfd/wm8350/pmic.h> |
23 | #include <linux/mfd/wm8350/rtc.h> | ||
24 | #include <linux/mfd/wm8350/supply.h> | ||
25 | #include <linux/mfd/wm8350/wdt.h> | ||
21 | 26 | ||
22 | /* | 27 | /* |
23 | * Register values. | 28 | * Register values. |
@@ -574,7 +579,12 @@ struct wm8350 { | |||
574 | int chip_irq; | 579 | int chip_irq; |
575 | 580 | ||
576 | /* Client devices */ | 581 | /* Client devices */ |
582 | struct wm8350_codec codec; | ||
583 | struct wm8350_gpio gpio; | ||
577 | struct wm8350_pmic pmic; | 584 | struct wm8350_pmic pmic; |
585 | struct wm8350_power power; | ||
586 | struct wm8350_rtc rtc; | ||
587 | struct wm8350_wdt wdt; | ||
578 | }; | 588 | }; |
579 | 589 | ||
580 | /** | 590 | /** |
diff --git a/include/linux/mfd/wm8350/gpio.h b/include/linux/mfd/wm8350/gpio.h index c6cd2ca8854a..ed91e8f5d298 100644 --- a/include/linux/mfd/wm8350/gpio.h +++ b/include/linux/mfd/wm8350/gpio.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef __LINUX_MFD_WM8350_GPIO_H_ | 13 | #ifndef __LINUX_MFD_WM8350_GPIO_H_ |
14 | #define __LINUX_MFD_WM8350_GPIO_H_ | 14 | #define __LINUX_MFD_WM8350_GPIO_H_ |
15 | 15 | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
16 | /* | 18 | /* |
17 | * GPIO Registers. | 19 | * GPIO Registers. |
18 | */ | 20 | */ |
@@ -328,6 +330,10 @@ struct wm8350; | |||
328 | int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func, | 330 | int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func, |
329 | int pol, int pull, int invert, int debounce); | 331 | int pol, int pull, int invert, int debounce); |
330 | 332 | ||
333 | struct wm8350_gpio { | ||
334 | struct platform_device *pdev; | ||
335 | }; | ||
336 | |||
331 | /* | 337 | /* |
332 | * GPIO Interrupts | 338 | * GPIO Interrupts |
333 | */ | 339 | */ |
diff --git a/include/linux/mfd/wm8350/rtc.h b/include/linux/mfd/wm8350/rtc.h index cb337ea8082f..dfda69e9f440 100644 --- a/include/linux/mfd/wm8350/rtc.h +++ b/include/linux/mfd/wm8350/rtc.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #ifndef __LINUX_MFD_WM8350_RTC_H | 12 | #ifndef __LINUX_MFD_WM8350_RTC_H |
13 | #define __LINUX_MFD_WM8350_RTC_H | 13 | #define __LINUX_MFD_WM8350_RTC_H |
14 | 14 | ||
15 | #include <linux/platform_device.h> | ||
16 | |||
15 | /* | 17 | /* |
16 | * Register values. | 18 | * Register values. |
17 | */ | 19 | */ |
@@ -257,4 +259,8 @@ | |||
257 | #define WM8350_IRQ_RTC_SEC 8 | 259 | #define WM8350_IRQ_RTC_SEC 8 |
258 | #define WM8350_IRQ_RTC_ALM 9 | 260 | #define WM8350_IRQ_RTC_ALM 9 |
259 | 261 | ||
262 | struct wm8350_rtc { | ||
263 | struct platform_device *pdev; | ||
264 | }; | ||
265 | |||
260 | #endif | 266 | #endif |
diff --git a/include/linux/mfd/wm8350/supply.h b/include/linux/mfd/wm8350/supply.h index f1d4317cf022..1c8f3cde79b0 100644 --- a/include/linux/mfd/wm8350/supply.h +++ b/include/linux/mfd/wm8350/supply.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef __LINUX_MFD_WM8350_SUPPLY_H_ | 13 | #ifndef __LINUX_MFD_WM8350_SUPPLY_H_ |
14 | #define __LINUX_MFD_WM8350_SUPPLY_H_ | 14 | #define __LINUX_MFD_WM8350_SUPPLY_H_ |
15 | 15 | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
16 | /* | 18 | /* |
17 | * Charger registers | 19 | * Charger registers |
18 | */ | 20 | */ |
@@ -102,4 +104,8 @@ | |||
102 | #define WM8350_IRQ_EXT_WALL_FB 37 | 104 | #define WM8350_IRQ_EXT_WALL_FB 37 |
103 | #define WM8350_IRQ_EXT_BAT_FB 38 | 105 | #define WM8350_IRQ_EXT_BAT_FB 38 |
104 | 106 | ||
107 | struct wm8350_power { | ||
108 | struct platform_device *pdev; | ||
109 | }; | ||
110 | |||
105 | #endif | 111 | #endif |
diff --git a/include/linux/mfd/wm8350/wdt.h b/include/linux/mfd/wm8350/wdt.h index 72fc9f554569..f6135b5e5ef4 100644 --- a/include/linux/mfd/wm8350/wdt.h +++ b/include/linux/mfd/wm8350/wdt.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * wdt.h -- Watchdog Driver for Wolfson WM8350 PMIC | 2 | * wdt.h -- Watchdog Driver for Wolfson WM8350 PMIC |
3 | * | 3 | * |
4 | * Copyright 2007 Wolfson Microelectronics PLC | 4 | * Copyright 2007, 2008 Wolfson Microelectronics PLC |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
@@ -12,6 +12,8 @@ | |||
12 | #ifndef __LINUX_MFD_WM8350_WDT_H_ | 12 | #ifndef __LINUX_MFD_WM8350_WDT_H_ |
13 | #define __LINUX_MFD_WM8350_WDT_H_ | 13 | #define __LINUX_MFD_WM8350_WDT_H_ |
14 | 14 | ||
15 | #include <linux/platform_device.h> | ||
16 | |||
15 | #define WM8350_WDOG_HIB_MODE 0x0080 | 17 | #define WM8350_WDOG_HIB_MODE 0x0080 |
16 | #define WM8350_WDOG_DEBUG 0x0040 | 18 | #define WM8350_WDOG_DEBUG 0x0040 |
17 | #define WM8350_WDOG_MODE_MASK 0x0030 | 19 | #define WM8350_WDOG_MODE_MASK 0x0030 |
@@ -19,4 +21,8 @@ | |||
19 | 21 | ||
20 | #define WM8350_IRQ_SYS_WDOG_TO 24 | 22 | #define WM8350_IRQ_SYS_WDOG_TO 24 |
21 | 23 | ||
24 | struct wm8350_wdt { | ||
25 | struct platform_device *pdev; | ||
26 | }; | ||
27 | |||
22 | #endif | 28 | #endif |