mfd: Use gpio_request_one from omap-usb-host

Use gpio_request_one() instead of multiple gpiolib calls.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Use gpio_request_one from twl6040-core

Use gpio_request_one() instead of multiple gpiolib calls.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Add missing mutex.h inclusion to WM8994 core.h

struct wm8994 includes a mutex so we need to include mutex.h before we
declare it. All current users rely on this being done implicitly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Unify abx500 headers in mfd/abx500

This moves all the header files related to the abx500 family into
a common include directory below mfd. From now on we place any
subchip header in that directory. Headers previously in e.g.
<linux/mfd/ab8500/gpio.h> get prefixed and are now e.g.
<linux/mfd/abx500/ab8500-gpio.h>. The top-level abstract interface
remains in <linux/mfd/abx500.h>.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Convert WM8400 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Return an error on failed wm831x register writes

Got dropped in the regmap conversion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: twl-core: Add initial DT support for twl4030/twl6030

Add initial device-tree support for twl familly chips.
The current version is missing the regulator entries due
to the lack of DT regulator bindings for the moment.
Only the simple sub-modules that do not depend on
platform_data information can be initialized properly.

Add irqdomain support.

Add documentation for the Texas Instruments TWL Integrated Chip.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Balaji T K <balajitk@ti.com>
Cc: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
[grant.likely@secretlab.ca: Fix IRQ_DOMAIN dependency in kconfig]
Cc: Grant Likely <grant.likely@secretlab.ca>
mfd: Add power off functionality to TWL

TWL family of PMICs, used in master mode, have a power off
functionality. The resulting power off sequence shuts down all the SoC
supplies, LDOs, etc. The sequence is described in the datasheets
chapter "Power-Off Sequence".
Note, that board must be wired correctly for the power off to work as
expected.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Make TPS65910 usable without interrupts

TPS65910 can be used without interrupts.
Hence let probe succeed in case interrupt can't be
configured and let Kernel only to complain about it

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Add platform data and devices for MAX8997 LED control

MAX8997 device does not support LED control function of it.
To enable MAX8997-LED driver, platform data and devices for LED are updated.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
leds: Add suuport for MAX8997-LED driver

This patch enables LED controller in MAX8997 PMIC.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Remove unused wm831x_irq_data_to_mask_reg()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
misc: Remove max8997-muic sysfs attributes

The 'switch' sysfs attribute is used for
showing and setting the switch state of the device.
However, setting it from the userspace focibly is not appropriate.
And showing the state can be handled from
other places (e.g. external connector) in a unified manner.
This patch removes the sysfs attribute.
Plus, uevent messages for interrupts are also removed.

The initial max8997-muic driver is merged at:
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git for-next

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Separate out STMPE controller and interface specific code

Few STMPE controller can have register interface over SPI or I2C. Current
implementation only supports I2C and all code is present in a single file
stmpe.c. It would be better to separate out I2C interface specific code from
controller specific code. Later SPI specific code can be added in a separate
file.

This patch separates out I2C and controller specific code into separate files,
making stmpe.c independent of I2C.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Add support for STMPE SPI interface

Few STMPE controller can have register interface over SPI or I2C. Current
implementation only supports I2C.

This patch adds support for SPI interface for accessing STMPE's address space.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Add support for stmpe variant 610

STMPE610 is very much like STMPE811, except the number of gpio pins, which is 8
in 811 and 6 in 610. This patch adds support for variant 610. STMPE610 will
share most of the code with STMPE811.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Add support for stmpe variant 801

STMPE801 is a GPIO expander. Registers for 801 are much different from other
variants. This patch adds support for STMPE801 in stmpe mfd driver.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
gpio: Add support for stmpe variant 801

STMPE801 is a GPIO expander. GPIO registers for 801 are slightly different from other
variants. This patch adds support for STMPE801 in stmpe gpio driver.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: Constify aat2870-core i2c_device_id table

Signed-off-by: Axel Lin <axel.lin@gmail.com>
mfd: Fix STMPE I2c build failure

STMPE i2c is a bool and should depend on I2c=y.
That fixes:

drivers/built-in.o: In function `i2c_block_write':
stmpe-i2c.c:(.text+0xf4553): undefined reference to
+`i2c_smbus_write_i2c_block_data'
drivers/built-in.o: In function `i2c_block_read':
stmpe-i2c.c:(.text+0xf457f): undefined reference to
+`i2c_smbus_read_i2c_block_data'
drivers/built-in.o: In function `i2c_reg_write':
stmpe-i2c.c:(.text+0xf45ab): undefined reference to
`i2c_smbus_write_byte_data'
drivers/built-in.o: In function `i2c_reg_read':
stmpe-i2c.c:(.text+0xf45d4): undefined reference to `i2c_smbus_read_byte_data'
drivers/built-in.o: In function `stmpe_init':
stmpe-i2c.c:(.init.text+0xaf22): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `stmpe_exit':
stmpe-i2c.c:(.exit.text+0x5e5): undefined reference to `i2c_del_driver'

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>