diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-02-17 18:45:25 +0000 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-03-07 22:17:29 +0100 |
commit | f92e8f8144243a3651b2e350b706ea2d04931f8c (patch) | |
tree | e008f4b0896cdeb2fb354a1e1babd2a568172498 /drivers/mfd/wm831x-core.c | |
parent | 6b8274fafeec9b112cee5b6ced5f9189957c889f (diff) | |
download | linux-3.10-f92e8f8144243a3651b2e350b706ea2d04931f8c.tar.gz linux-3.10-f92e8f8144243a3651b2e350b706ea2d04931f8c.tar.bz2 linux-3.10-f92e8f8144243a3651b2e350b706ea2d04931f8c.zip |
mfd: Add WM831x revision B support
Revision B of the WM831x devices changes the sense of the tristate
bit for GPIO configuration, inverting it to become an enable instead.
Take account of this in the gpiolib driver.
A current sink regulation status bit has also been added in revision B,
add a flag indicating if it's present but don't use it yet.
This revision also adds an interrupt on key up for the ON pin event
which the existing code is able to take advantage of.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm831x-core.c')
-rw-r--r-- | drivers/mfd/wm831x-core.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index 4b2021af1d9..c428d9f918f 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c @@ -1449,18 +1449,33 @@ static int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) case WM8310: parent = WM8310; wm831x->num_gpio = 16; + if (rev > 0) { + wm831x->has_gpio_ena = 1; + wm831x->has_cs_sts = 1; + } + dev_info(wm831x->dev, "WM8310 revision %c\n", 'A' + rev); break; case WM8311: parent = WM8311; wm831x->num_gpio = 16; + if (rev > 0) { + wm831x->has_gpio_ena = 1; + wm831x->has_cs_sts = 1; + } + dev_info(wm831x->dev, "WM8311 revision %c\n", 'A' + rev); break; case WM8312: parent = WM8312; wm831x->num_gpio = 16; + if (rev > 0) { + wm831x->has_gpio_ena = 1; + wm831x->has_cs_sts = 1; + } + dev_info(wm831x->dev, "WM8312 revision %c\n", 'A' + rev); break; |