aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-i2c.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-15 12:54:53 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-20 08:02:09 -0400
commit523d9cfbb2094e095ff08a01c4eac10cc7d287c3 (patch)
treed1cd9bc2434332e2e79170d6c21d443f2ce5c3ff /drivers/mfd/wm831x-i2c.c
parent92afb286d744511f51a05f8acb6c111d05737617 (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 'drivers/mfd/wm831x-i2c.c')
-rw-r--r--drivers/mfd/wm831x-i2c.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mfd/wm831x-i2c.c b/drivers/mfd/wm831x-i2c.c
index 3ec6085d5fc0..ac8da1d439da 100644
--- a/drivers/mfd/wm831x-i2c.c
+++ b/drivers/mfd/wm831x-i2c.c
@@ -65,6 +65,13 @@ static int wm831x_i2c_suspend(struct device *dev)
65 return wm831x_device_suspend(wm831x); 65 return wm831x_device_suspend(wm831x);
66} 66}
67 67
68static void wm831x_i2c_shutdown(struct i2c_client *i2c)
69{
70 struct wm831x *wm831x = i2c_get_clientdata(i2c);
71
72 wm831x_device_shutdown(wm831x);
73}
74
68static const struct i2c_device_id wm831x_i2c_id[] = { 75static const struct i2c_device_id wm831x_i2c_id[] = {
69 { "wm8310", WM8310 }, 76 { "wm8310", WM8310 },
70 { "wm8311", WM8311 }, 77 { "wm8311", WM8311 },
@@ -89,6 +96,7 @@ static struct i2c_driver wm831x_i2c_driver = {
89 }, 96 },
90 .probe = wm831x_i2c_probe, 97 .probe = wm831x_i2c_probe,
91 .remove = wm831x_i2c_remove, 98 .remove = wm831x_i2c_remove,
99 .shutdown = wm831x_i2c_shutdown,
92 .id_table = wm831x_i2c_id, 100 .id_table = wm831x_i2c_id,
93}; 101};
94 102