aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-15 12:54:53 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-10-24 08:09:13 -0400
commit5da721c87aee3d94cfc48384073c2ec51a0b9a3b (patch)
tree8204a041df21dd6364728d9915af3a142a88ad1b /include/linux/mfd
parentf09ee0451a44a4e913a7c3cec3805508f7de6c54 (diff)
mfd: Support software initiated shutdown of WM831x PMICs
In systems where there is no hardware signal from the processor to the PMIC to initiate the final power off sequence we must initiate the shutdown with a register write to the PMIC. Support such systems in the driver. Since this may prevent a full shutdown of the system platform data is used to enable the feature. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/wm831x/core.h3
-rw-r--r--include/linux/mfd/wm831x/pdata.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h
index 8dda8ded5cda..fb3e84f92e90 100644
--- a/include/linux/mfd/wm831x/core.h
+++ b/include/linux/mfd/wm831x/core.h
@@ -374,6 +374,8 @@ struct wm831x {
374 int irq_masks_cur[WM831X_NUM_IRQ_REGS]; /* Currently active value */ 374 int irq_masks_cur[WM831X_NUM_IRQ_REGS]; /* Currently active value */
375 int irq_masks_cache[WM831X_NUM_IRQ_REGS]; /* Cached hardware value */ 375 int irq_masks_cache[WM831X_NUM_IRQ_REGS]; /* Cached hardware value */
376 376
377 bool soft_shutdown;
378
377 /* Chip revision based flags */ 379 /* Chip revision based flags */
378 unsigned has_gpio_ena:1; /* Has GPIO enable bit */ 380 unsigned has_gpio_ena:1; /* Has GPIO enable bit */
379 unsigned has_cs_sts:1; /* Has current sink status bit */ 381 unsigned has_cs_sts:1; /* Has current sink status bit */
@@ -412,6 +414,7 @@ int wm831x_bulk_read(struct wm831x *wm831x, unsigned short reg,
412int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq); 414int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq);
413void wm831x_device_exit(struct wm831x *wm831x); 415void wm831x_device_exit(struct wm831x *wm831x);
414int wm831x_device_suspend(struct wm831x *wm831x); 416int wm831x_device_suspend(struct wm831x *wm831x);
417void wm831x_device_shutdown(struct wm831x *wm831x);
415int wm831x_irq_init(struct wm831x *wm831x, int irq); 418int wm831x_irq_init(struct wm831x *wm831x, int irq);
416void wm831x_irq_exit(struct wm831x *wm831x); 419void wm831x_irq_exit(struct wm831x *wm831x);
417void wm831x_auxadc_init(struct wm831x *wm831x); 420void wm831x_auxadc_init(struct wm831x *wm831x);
diff --git a/include/linux/mfd/wm831x/pdata.h b/include/linux/mfd/wm831x/pdata.h
index 0ba24599fe51..1d7a3f7b3b5d 100644
--- a/include/linux/mfd/wm831x/pdata.h
+++ b/include/linux/mfd/wm831x/pdata.h
@@ -123,6 +123,9 @@ struct wm831x_pdata {
123 /** Disable the touchscreen */ 123 /** Disable the touchscreen */
124 bool disable_touch; 124 bool disable_touch;
125 125
126 /** The driver should initiate a power off sequence during shutdown */
127 bool soft_shutdown;
128
126 int irq_base; 129 int irq_base;
127 int gpio_base; 130 int gpio_base;
128 int gpio_defaults[WM831X_GPIO_NUM]; 131 int gpio_defaults[WM831X_GPIO_NUM];