GitHub/LineageOS/android_kernel_motorola_exynos9610.git
10 years agomfd: wm5110: Correct default for HEADPHONE_DETECT_1
Charles Keepax [Thu, 20 Mar 2014 16:49:23 +0000 (16:49 +0000)]
mfd: wm5110: Correct default for HEADPHONE_DETECT_1

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Correct small errors in the DT binding documentation
Charles Keepax [Wed, 19 Mar 2014 10:18:54 +0000 (10:18 +0000)]
mfd: arizona: Correct small errors in the DT binding documentation

This patch does not alter the binding at all it only brings the
documentation up to date with the existing binding.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: arizona: Mark DSP clocking register as volatile
Charles Keepax [Thu, 20 Mar 2014 16:49:24 +0000 (16:49 +0000)]
mfd: arizona: Mark DSP clocking register as volatile

The DSPs will often control there own clock speeds whilst running as
such we should mark the registers controlling this as volatile.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: devicetree: bindings: Add pm8xxx RTC description
Josh Cartwright [Wed, 12 Mar 2014 17:17:24 +0000 (12:17 -0500)]
mfd: devicetree: bindings: Add pm8xxx RTC description

The PM8xxx family of PMICs contain an RTC.  This RTC is described as a
subnode of the PM8xxx.  Document these bindings, and replace the pwrkey
node in the example with the RTC, which is now described in this
document.

While we're here, add a short description to the device tree bindings
describing what the the PM8xxx devices are and how they are expected to
be used.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: kempld-core: Fix potential hang-up during boot
Guenter Roeck [Thu, 20 Mar 2014 15:12:28 +0000 (08:12 -0700)]
mfd: kempld-core: Fix potential hang-up during boot

On PXT and COMe-cPC2 boards it is observed that the hardware
mutex is acquired but not being released during initialization.
This can result in a hang-up during boot if the driver is built
into the kernel.

Releasing the mutex twice if it was acquired fixes the problem.
Subsequent request/release cycles work as expected, so the fix is
only needed during initialization.

Cc: <stable@vger.kernel.org>
Reviewed-by: Michael Brunner <michael.brunner@kontron.com>
Tested-by: Michael Brunner <michael.brunner@kontron.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Fix uninitialized 'regmap_rtc' on S2MPA01
Krzysztof Kozlowski [Tue, 18 Mar 2014 13:11:26 +0000 (14:11 +0100)]
mfd: sec-core: Fix uninitialized 'regmap_rtc' on S2MPA01

Initialize the 'regmap_rtc' on S2MPA01 to some sane value. Sane at least
for S5M87X chipsets, not S2MPS/S2MPA but it won't be used because
rtc-s5m driver does not support S2MPA01.

This fixes following error:
drivers/mfd/sec-core.c:342:45: warning: ‘regmap_rtc’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: tps65910: Fix regmap_irq_chip_data leak on mfd_add_devices fail
Krzysztof Kozlowski [Wed, 12 Mar 2014 15:50:45 +0000 (16:50 +0100)]
mfd: tps65910: Fix regmap_irq_chip_data leak on mfd_add_devices fail

The tps65910_i2c_probe() allocates regmap_irq_chip in
tps65910_irq_init() but it does not clean this up in case of
mfd_add_devices() failure.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: tps65910: Fix possible invalid pointer dereference on regmap_add_irq_chip fail
Krzysztof Kozlowski [Wed, 12 Mar 2014 15:50:44 +0000 (16:50 +0100)]
mfd: tps65910: Fix possible invalid pointer dereference on regmap_add_irq_chip fail

Fixes: 4aab3fadad32 ("mfd: tps65910: Move interrupt implementation code to mfd file")

tps65910_irq_init() sets 'tps65910->chip_irq' before calling
regmap_add_irq_chip(). If the regmap_add_irq_chip() call fails in
memory allocation of regmap_irq_chip_data members then:

1. The 'tps65910->chip_irq' will still hold some value
2. 'tps65910->irq_data' will be pointing to already freed memory
   (because regmap_add_irq_chip() will free it on error)

This results in invalid memory access during driver remove because the
tps65910_irq_exit() tests whether 'tps65910->chip_irq' is not zero.

Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Fix I2C dummy device resource leak on probe failure
Krzysztof Kozlowski [Tue, 18 Mar 2014 12:57:50 +0000 (13:57 +0100)]
mfd: sec-core: Fix I2C dummy device resource leak on probe failure

Dummy I2C device allocated in sec_pmic_probe() leaked if
devm_regmap_init_i2c() failed. Unregister it before returning from
probe.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Add of_compatible strings for clock MFD cells
Krzysztof Kozlowski [Mon, 17 Mar 2014 09:19:17 +0000 (10:19 +0100)]
mfd: sec-core: Add of_compatible strings for clock MFD cells

Add of_compatible strings for S5M8767 and S2MPS14 clock MFD cells.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Remove obsolete ti-ssp driver
Arnd Bergmann [Tue, 18 Mar 2014 14:56:00 +0000 (15:56 +0100)]
mfd: Remove obsolete ti-ssp driver

The tnetv107x platform is getting removed, so this driver
is not needed any more.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoDocumentation: mfd: s2mps11: Describe S5M8767 and S2MPS14 clocks
Krzysztof Kozlowski [Mon, 17 Mar 2014 09:19:18 +0000 (10:19 +0100)]
Documentation: mfd: s2mps11: Describe S5M8767 and S2MPS14 clocks

Add bindings documentation for clocks on S5M8767 and S2MPS14 devices.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: bcm590xx: Fix type argument for module device table
Axel Lin [Sat, 15 Mar 2014 01:24:50 +0000 (09:24 +0800)]
mfd: bcm590xx: Fix type argument for module device table

This fixes below build error.

FATAL: drivers/mfd/bcm590xx: sizeof(struct i2c_device_id)=24 is not a modulo of the size of section __mod_i2c_device_table=392.
Fix definition of struct i2c_device_id in mod_devicetable.h
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Add support for Intel Bay Trail SoC
Peter Tyser [Mon, 10 Mar 2014 21:34:58 +0000 (16:34 -0500)]
mfd: lpc_ich: Add support for Intel Bay Trail SoC

This patch adds the LPC Controller Device IDs for Watchdog and GPIO for
the Intel Bay Trail Atom SoC.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Add support for NM10 GPIO
Peter Tyser [Mon, 10 Mar 2014 21:34:57 +0000 (16:34 -0500)]
mfd: lpc_ich: Add support for NM10 GPIO

The NM10's GPIO is compatible with ICH v7 GPIO.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Dan Weinlader <danw@vs-networks.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Change Avoton to iTCO v3
Peter Tyser [Mon, 10 Mar 2014 21:34:56 +0000 (16:34 -0500)]
mfd: lpc_ich: Change Avoton to iTCO v3

The register layout of the Avoton is compatible with the iTCO v3
register layout.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agowatchdog: iTCO_wdt: Add support for v3 silicon
Peter Tyser [Mon, 10 Mar 2014 21:34:55 +0000 (16:34 -0500)]
watchdog: iTCO_wdt: Add support for v3 silicon

Some new Atom's, eg Avoton and Bay Trail, have slightly different iTCO
functionality:
- The watchdog timer ticks at 1 second instead of .6 seconds

- Some 8 and 16-bit registers were combined into 32-bit registers

- Some registers were removed (DAT_IN, DAT_OUT, MESSAGE)

- The BOOT_STS field in TCO_STS was removed

- The NO_REBOOT bit is in the PMC area instead of GCS

Update the driver to support the above changes and bump the version to
1.11.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Add support for iTCO v3
Peter Tyser [Mon, 10 Mar 2014 21:34:54 +0000 (16:34 -0500)]
mfd: lpc_ich: Add support for iTCO v3

Some newer Atom CPUs, eg Avoton and Bay Trail, use slightly different
register layouts for the iTCO than the current v1 and v2 iTCO.
Differences from previous iTCO versions include:
- The ACPI space is enabled in the "ACPI base address" register instead
  of the "ACPI control register"

- The "no reboot" functionality is set in the "Power Management
  Configuration" register instead of the "General Control and Status"
  (GCS) register or PCI configuration space.

- The "ACPI Control Register" is not present on v3.  The "Power
  Management Configuration Base Address" register resides at the same
  address is Avoton/Bay Trail.

To differentiate these newer chipsets create a new v3 iTCO version and
update the MFD driver to support them.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Remove lpc_ich_cfg struct use
Peter Tyser [Mon, 10 Mar 2014 21:34:53 +0000 (16:34 -0500)]
mfd: lpc_ich: Remove lpc_ich_cfg struct use

Future chipsets will use different register layouts that don't map
cleanly to the lpc_ich_cfg fields.  Remove the lpc_ich_cfg struct and
add explicit fields to the higher level lpc_ich_priv structure.

This change should have no functional impact.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Only configure watchdog or GPIO when present
Peter Tyser [Mon, 10 Mar 2014 21:34:52 +0000 (16:34 -0500)]
mfd: lpc_ich: Only configure watchdog or GPIO when present

Some chipsets don't currently have GPIO support enabled.  For these
chipsets don't go through the process of initializing the GPIO region.

Make the same change for the watchdog initialization for chipsets which
may not enable the WDT in the future.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Fix ACPI enable bitmask
Peter Tyser [Mon, 10 Mar 2014 21:34:51 +0000 (16:34 -0500)]
mfd: lpc_ich: Fix ACPI enable bitmask

The original bitmask of 0x10 was incorrect and would result in a write
to a reserved read-only bit instead of enabling the ACPI I/O
region.  Update it to the proper value of 0x80.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Add bcm590xx pmu driver
Matt Porter [Tue, 11 Mar 2014 23:33:54 +0000 (19:33 -0400)]
mfd: Add bcm590xx pmu driver

Add a driver for the BCM590xx PMU multi-function devices. The driver
initially supports regmap initialization and instantiation of the
voltage regulator device function of the PMU.

Signed-off-by: Matt Porter <mporter@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Add bcm590xx pmu DT binding
Matt Porter [Wed, 12 Mar 2014 14:07:13 +0000 (10:07 -0400)]
mfd: Add bcm590xx pmu DT binding

Add a DT binding for the BCM590xx PMUs. The binding inherits from
the generic regulator bindings.

Signed-off-by: Matt Porter <mporter@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max14577: Select REGMAP_IRQ
Krzysztof Kozlowski [Tue, 11 Mar 2014 14:21:42 +0000 (15:21 +0100)]
mfd: max14577: Select REGMAP_IRQ

MAXIM 14577 MFD driver uses the regmap_irq_chip so it's Kconfig entry
should select REGMAP_IRQ.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: twl-core: Fix accessibility of some twl4030 audio registers
Tomas Novotny [Mon, 10 Mar 2014 18:12:50 +0000 (19:12 +0100)]
mfd: twl-core: Fix accessibility of some twl4030 audio registers

There are some unused registers in twl4030 at I2C address 0x49 and function
twl4030_49_nop_reg() is used to check accessibility of that registers. These
registers are written in decimal format but the values are correct in
hexadecimal format. (It can be checked few lines above the patched code -
these registers are marked as unused there.)

As a consequence three registers of audio submodule are treated as
inaccessible (preamplifier carkit right and both handsfree registers).

Cc: stable@vger.kernel.org
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: tps65218: Fix reported randconfig error
Lee Jones [Mon, 10 Mar 2014 15:23:25 +0000 (15:23 +0000)]
mfd: tps65218: Fix reported randconfig error

Reported error was:
  ERROR: "regmap_del_irq_chip" [drivers/mfd/tps65218.ko] undefined!
    when CONFIG_REGMAP_IRQ is not enabled.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: da9063: Upgrade of register definitions to support production silicon
Opensource [Steve Twiss] [Thu, 6 Mar 2014 16:40:02 +0000 (16:40 +0000)]
mfd: da9063: Upgrade of register definitions to support production silicon

This patch updates the register definitions for DA9063 to support the
production silicon variant code ID (0x5). These changes are not backwards
compatible with the previous register definitions and can only be used
with the production variant of DA9063.

Signed-off-by: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: syscon: Simplify syscon_match_pdevname()
Alexander Shiyan [Mon, 10 Mar 2014 10:57:33 +0000 (14:57 +0400)]
mfd: syscon: Simplify syscon_match_pdevname()

Since we do not want to add new platform IDs for the syscon driver,
there is no reason to iterate over IDs. This patch simplifies
syscon_match_pdevname() function to remove such iteration.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: da9055: Add DT binding documentation for PMIC
Adam Thomson [Wed, 5 Mar 2014 14:18:37 +0000 (14:18 +0000)]
mfd: da9055: Add DT binding documentation for PMIC

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8921: Fixup probe() error path when irq invalid
Josh Cartwright [Wed, 5 Mar 2014 19:34:25 +0000 (13:34 -0600)]
mfd: pm8921: Fixup probe() error path when irq invalid

platform_get_irq() returns a negative error code when an IRQ is invalid
or unspecified.  Make 'irq' signed to properly handle this.

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: da9055: Add DT support for PMIC
Adam Thomson [Wed, 5 Mar 2014 14:18:35 +0000 (14:18 +0000)]
mfd: da9055: Add DT support for PMIC

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: vexpress: Staticize vexpress_config_bridges
Sachin Kamat [Tue, 4 Mar 2014 09:41:47 +0000 (15:11 +0530)]
mfd: vexpress: Staticize vexpress_config_bridges

vexpress_config_bridges is local to this file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: as3722: Make FUSE7_REG readable
Stephen Warren [Tue, 4 Mar 2014 16:50:32 +0000 (09:50 -0700)]
mfd: as3722: Make FUSE7_REG readable

The FUSE7_REG register is not currently marked readable. This causes
as3722_sd0_is_low_voltage() to emit an error during boot, and assume
the range of the SD0 regulator:

as3722-regulator as3722-regulator: Reg 0xa7 read failed: -5

Fixes: d4807ad2c4c0 ("regmap: Check readable regs in _regmap_read")
  [exposed the bug, by checking for readability]
Fixes: 762a8ee80897 ("regulator: as3722: detect SD0 low-voltage mode")
  [left out this register from the readable list]

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8921: Use IRQCHIP_SKIP_SET_WAKE
Stephen Boyd [Tue, 4 Mar 2014 18:48:52 +0000 (10:48 -0800)]
mfd: pm8921: Use IRQCHIP_SKIP_SET_WAKE

We don't need to implement a dummy irq_set_wake op if we just set
IRQCHIP_SKIP_SET_WAKE.

Suggested-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8921: Drop irq_set_lockdep_class() code
Stephen Boyd [Tue, 4 Mar 2014 18:48:51 +0000 (10:48 -0800)]
mfd: pm8921: Drop irq_set_lockdep_class() code

This isn't necessary as we aren't setting the summary interrupt
to wake up the system in the irq_wake() callback.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: mc13xxx: Add missing spi_setup()
Alexander Shiyan [Sun, 2 Mar 2014 07:44:34 +0000 (11:44 +0400)]
mfd: mc13xxx: Add missing spi_setup()

The probe routine should call spi_setup() to configure the SPI bus
so it can properly communicate with the device.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: mc13xxx: Limit maximum SPI speed
Alexander Shiyan [Sun, 2 Mar 2014 07:44:33 +0000 (11:44 +0400)]
mfd: mc13xxx: Limit maximum SPI speed

The patch adds the maximum speed limit in accordance with the
PMIC datasheet if other value is not given in the devicetree
description or board data.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()
Alexander Gordeev [Fri, 21 Feb 2014 16:58:09 +0000 (17:58 +0100)]
mfd: timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ucb1x00-core: Use SIMPLE_DEV_PM_OPS macro
Jingoo Han [Thu, 27 Feb 2014 11:39:18 +0000 (20:39 +0900)]
mfd: ucb1x00-core: Use SIMPLE_DEV_PM_OPS macro

Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: devicetree: bindings: Document PM8921/8058 PMICs
Stephen Boyd [Wed, 26 Feb 2014 18:59:26 +0000 (10:59 -0800)]
mfd: devicetree: bindings: Document PM8921/8058 PMICs

PM8921 and PM8058 are PMICs found paired with MSM8960 and MSM8660
devices respectively. They contain subdevices such as keypads,
RTC, regulators, clocks, etc.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8921: Loosen Kconfig dependency
Stephen Boyd [Wed, 26 Feb 2014 18:59:25 +0000 (10:59 -0800)]
mfd: pm8921: Loosen Kconfig dependency

Allow this driver to be compiled on all ARM builds as it doesn't
rely on anything within arm/mach-msm.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8921: Add DT match table
Stephen Boyd [Wed, 26 Feb 2014 18:59:24 +0000 (10:59 -0800)]
mfd: pm8921: Add DT match table

Allow this driver to probe based on devicetree.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8921: Use ssbi regmap
Stephen Boyd [Wed, 26 Feb 2014 18:59:23 +0000 (10:59 -0800)]
mfd: pm8921: Use ssbi regmap

Use a regmap so that the pm8xxx read/write APIs can be removed
once all consumer drivers are converted.

Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ssbi: Add regmap read/write helpers
Stephen Boyd [Wed, 26 Feb 2014 18:59:22 +0000 (10:59 -0800)]
mfd: ssbi: Add regmap read/write helpers

Add read and write helper functions that the pm8921-core driver
can use to read and write ssbi registers via a "no-bus" regmap.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8921: Migrate to irqdomains
Stephen Boyd [Wed, 26 Feb 2014 18:59:21 +0000 (10:59 -0800)]
mfd: pm8921: Migrate to irqdomains

Convert this driver to use irqdomains so that the PMIC's child
devices can be converted to devicetree.

Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
10 years agomfd: pm8921: Update for genirq changes
Stephen Boyd [Wed, 26 Feb 2014 18:59:20 +0000 (10:59 -0800)]
mfd: pm8921: Update for genirq changes

Since this code has been marked broken for some time a few genirq
tree wide changes weren't made. set_irq_wake() was renamed to
irq_set_irq_wake() in commit a0cd9ca2b (genirq: Namespace
cleanup, 2011-02-10) and commit 10a8c383 (irq: introduce entry
and exit functions for chained handlers) introduced the chained
irq functions but this driver wasn't updated to use them. Fix
these problems and remove the BROKEN marking on this driver.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: pm8xxx: Move pm8xxx-irq.c contents into only driver that uses it
Stephen Boyd [Wed, 26 Feb 2014 18:59:19 +0000 (10:59 -0800)]
mfd: pm8xxx: Move pm8xxx-irq.c contents into only driver that uses it

The pm8xxx-irq.c code is practically mandatory given that the
pm8921-core driver will WARN about it missing and the Kconfig
marks it as default y when a PM8xxx chips is enabled. The only
reason the file was split out was because we planned to support
other pm8xxx chips with different pm8xxx-core.c files. Now that
we have DT on ARM this isn't necessary because we should be able
to support all the ssbi based PM8xxx chips in one driver and one
file with no data bloat. Let's move this code into the only
driver that uses it right now (pm8921) so that it's always compiled when
needed. In the future we can rename pm8921-core.c to something
more generic.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: twl6040: Check for error when reading revision register
Florian Vaussard [Tue, 25 Feb 2014 13:28:19 +0000 (14:28 +0100)]
mfd: twl6040: Check for error when reading revision register

We may have an error when reading the revision register, so check for
the returned value.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: twl6040: Remove duplicate register write
Florian Vaussard [Tue, 25 Feb 2014 13:28:20 +0000 (14:28 +0100)]
mfd: twl6040: Remove duplicate register write

When probing, regmap_register_patch() will bypass the cache and perform
i2c writes for the given patches. It is thus unnecessary to manually set
the TWL6040_REG_ACCCTL register just before, as it will be done when
registering the twl6040_patch.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: da9052: Extend support to a new chip
Opensource [Anthony Olech] [Wed, 19 Feb 2014 16:32:46 +0000 (16:32 +0000)]
mfd: da9052: Extend support to a new chip

Add the hash define for the new variant of the DA9053 PMIC called BC.

Signed-off-by: Anthony Olech <anthony.olech.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: da9052: Add new DA9053 BC chip variant
Opensource [Anthony Olech] [Wed, 19 Feb 2014 16:32:47 +0000 (16:32 +0000)]
mfd: da9052: Add new DA9053 BC chip variant

Add support for a new BC variant of the DA9053 PMIC.

There is one difference between it and the AA, BA and BB.

This patch also corrects a typing mistake in one of the BA
name strings that was incorrectly typed as "ab".

Signed-off-by: Anthony Olech <anthony.olech.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: syscon: Move diagnostic messages to dev_dbg()
Alexander Shiyan [Sat, 22 Feb 2014 06:02:25 +0000 (10:02 +0400)]
mfd: syscon: Move diagnostic messages to dev_dbg()

This patch moves diagnostic messages used for debugging purposes
to dev_dbg().

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: kempld: Add support for COMe-mBT10, COMe-cBT6 and COMe-cHL6 to Kontron PLD driver
Michael Brunner [Mon, 24 Feb 2014 07:53:46 +0000 (08:53 +0100)]
mfd: kempld: Add support for COMe-mBT10, COMe-cBT6 and COMe-cHL6 to Kontron PLD driver

This patch adds DMI system IDs for the Kontron modules COMe-mBT10, COMe-cBT6
and COMe-cHL6 to the Kontron PLD driver. The list of supported products in
the module description is also updated.

Signed-off-by: Michael Brunner <michael.brunner@kontron.com>
Acked-by: Christian Rauch <christian.rauch@kontron.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agogpio: ich: Add support for Intel Avoton
Vincent Donnefort [Fri, 14 Feb 2014 14:01:58 +0000 (15:01 +0100)]
gpio: ich: Add support for Intel Avoton

This patch adds support for Atom C2000 series (Avoton and Rangeley). And has
the following options:
  - New addresses register.
  - Caching output levels (see Intel external design spec, table 48-29)
  - No hardware blink.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agogpio: ich: Add output levels cache support
Vincent Donnefort [Fri, 14 Feb 2014 14:01:57 +0000 (15:01 +0100)]
gpio: ich: Add output levels cache support

This patch allows GPIO driver to cache GPIO_LVL output registers. The aim is to
support chipsets on which GPIO_LVL value can't be read for output pins.

Caching output levels implies the first output values reading as 0. The driver
so can't be aware of set values GPIOs by bootloader or BIOS.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agogpio: ich: Add support for multiple register addresses
Vincent Donnefort [Fri, 14 Feb 2014 14:01:56 +0000 (15:01 +0100)]
gpio: ich: Add support for multiple register addresses

This patch introduces regs and reglen pointers which allow a chipset to have
register addresses differing from ICH ones.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agogpio: ich: Add blink capability option
Vincent Donnefort [Fri, 14 Feb 2014 14:01:55 +0000 (15:01 +0100)]
gpio: ich: Add blink capability option

This patch allows gpio_ich driver to be aware of non blink capable chipsets.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Add support for Intel Avoton GPIOs
Vincent Donnefort [Fri, 14 Feb 2014 14:01:54 +0000 (15:01 +0100)]
mfd: lpc_ich: Add support for Intel Avoton GPIOs

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: lpc_ich: Convert ICH GPIOs IDs to enum
Vincent Donnefort [Fri, 14 Feb 2014 14:01:53 +0000 (15:01 +0100)]
mfd: lpc_ich: Convert ICH GPIOs IDs to enum

All those IDs are arbitrary and so can be encapsulated into an enumeration.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: da9063: Add support for production silicon variant code
Opensource [Steve Twiss] [Fri, 14 Feb 2014 14:08:11 +0000 (14:08 +0000)]
mfd: da9063: Add support for production silicon variant code

Add the correct silicon variant code ID (0x5) to the driver. This
new code is the 'production' variant code ID for DA9063.

This patch will remove the older variant code ID which matches the
pre-production silicon ID (0x3) for the DA9063 chip.

There is also some small amount of correction done in this patch:
it splits the revision code and correctly names it according to
the hardware specification and moves the dev_info() call before
the variant ID test.

Signed-off-by: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: wm8400-core: Remove unnecessary goto
Sachin Kamat [Fri, 14 Feb 2014 09:51:05 +0000 (15:21 +0530)]
mfd: wm8400-core: Remove unnecessary goto

Return directly to avoid redundant lines of code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Add realtek USB card reader driver
Roger Tseng [Wed, 12 Feb 2014 10:00:36 +0000 (18:00 +0800)]
mfd: Add realtek USB card reader driver

Realtek USB card reader provides a channel to transfer command or data to flash
memory cards. This driver exports host instances for mmc and memstick subsystems
and handles basic works.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Roger Tseng <rogerable@realtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: stw481x: Check the return value of devm_regmap_init_i2c
Sachin Kamat [Wed, 12 Feb 2014 09:10:13 +0000 (14:40 +0530)]
mfd: stw481x: Check the return value of devm_regmap_init_i2c

devm_regmap_init_i2c can fail. Check for it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: stw481x: Staticize stw481x_regmap_config
Sachin Kamat [Wed, 12 Feb 2014 09:10:12 +0000 (14:40 +0530)]
mfd: stw481x: Staticize stw481x_regmap_config

stw481x_regmap_config is local to this file.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max14577: Include missing err.h
Sachin Kamat [Wed, 12 Feb 2014 09:10:11 +0000 (14:40 +0530)]
mfd: max14577: Include missing err.h

Add this header explicitly for IS_ERR and friends.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: vexpress-sysreg: Initialize 'site' variable
Semen Protsenko [Thu, 13 Feb 2014 16:39:54 +0000 (18:39 +0200)]
mfd: vexpress-sysreg: Initialize 'site' variable

'site' variable should be initialized with 0 so that when 'site'
property doesn't exist in DTB it can be handled correctly.

'0' value means board site number is motherboard (see
Documentation/devicetree/bindings/arm/vexpress.txt for details).

Signed-off-by: Semen Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: 88pm800: Fix I2C device resource leak if probe fails
Krzysztof Kozlowski [Wed, 12 Feb 2014 10:10:56 +0000 (11:10 +0100)]
mfd: 88pm800: Fix I2C device resource leak if probe fails

During probe the driver allocates two dummy I2C devices for subchips in
function pm800_pages_init(). Additionally this function allocates
regmaps for these subchips. If any of these steps fail then these dummy
I2C devices are not freed and resources leak.

On pm800_pages_init() fail the driver must call pm800_pages_exit() to
unregister dummy I2C devices.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Trivial: Fix a grammar issues in MFD Kconfig
Laszlo Papp [Tue, 11 Feb 2014 04:50:51 +0000 (04:50 +0000)]
mfd: Trivial: Fix a grammar issues in MFD Kconfig

s/to support for/to add support for/

Signed-off-by: Laszlo Papp <lpapp@kde.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: ti_am335x_tscadc: Use devm_ioremap_resource()
Jingoo Han [Wed, 12 Feb 2014 05:31:49 +0000 (14:31 +0900)]
mfd: ti_am335x_tscadc: Use devm_ioremap_resource()

Use devm_ioremap_resource() in order to make the code simpler,
and remove redundant return value check of platform_get_resource()
because the value is checked by devm_ioremap_resource().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: da9052: Fix volatile register definition ommissions
anthony.olech.opensource@diasemi.com [Thu, 6 Feb 2014 17:33:24 +0000 (17:33 +0000)]
mfd: da9052: Fix volatile register definition ommissions

Three of the PMIC registers have some bits that are changed
autonomously by the PMIC itself (some time) after being set
by some component driver of the DA9052 PMIC and hence they
need to be marked as volatile so that the regmap API will
not cache their values.

Acked-by: David Dajun Chen <david.chen@diasemi.com>
Signed-off-by: Anthony Olech <anthony.olech.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max77693: Fix possible NULL pointer dereference on i2c_new_dummy error
Krzysztof Kozlowski [Tue, 11 Feb 2014 10:03:32 +0000 (11:03 +0100)]
mfd: max77693: Fix possible NULL pointer dereference on i2c_new_dummy error

During probe the driver allocates dummy I2C devices for MUIC and haptic
with i2c_new_dummy() but it does not check the return value of this
calls.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by devm_regmap_init_i2c() and i2c_unregister_device().

If i2c_new_dummy() fails for MUIC or haptic devices, fail also the probe
for main MFD driver.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy error
Krzysztof Kozlowski [Tue, 11 Feb 2014 10:03:29 +0000 (11:03 +0100)]
mfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy error

During probe the driver allocates dummy I2C device for companion chip
with i2c_new_dummy() but it does not check the return value of this call.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by regmap_init_i2c().

If i2c_new_dummy() fails for companion device, fail also the probe for
main MFD driver.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: 88pm860x: Fix I2C device resource leak on regmap init fail
Krzysztof Kozlowski [Tue, 11 Feb 2014 10:03:30 +0000 (11:03 +0100)]
mfd: 88pm860x: Fix I2C device resource leak on regmap init fail

During probe the driver allocates dummy I2C device for companion chip
and then allocates a regmap for it. If regmap_init_i2c() fails then the
I2C driver (allocated with i2c_new_dummy()) is not freed and this
resource leaks.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy error
Krzysztof Kozlowski [Tue, 11 Feb 2014 10:03:33 +0000 (11:03 +0100)]
mfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy error

During probe the driver allocates dummy I2C devices for RTC and ADC
with i2c_new_dummy() but it does not check the return value of this
calls.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by i2c_unregister_device().

If i2c_new_dummy() fails for RTC or ADC devices, fail also the probe
for main MFD driver.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max8998: Fix possible NULL pointer dereference on i2c_new_dummy error
Krzysztof Kozlowski [Tue, 11 Feb 2014 10:03:35 +0000 (11:03 +0100)]
mfd: max8998: Fix possible NULL pointer dereference on i2c_new_dummy error

During probe the driver allocates dummy I2C device for RTC with i2c_new_dummy() but it does not check the return value of this call.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for
main MFD driver.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max77686: Fix possible NULL pointer dereference on i2c_new_dummy error
Krzysztof Kozlowski [Tue, 11 Feb 2014 10:03:31 +0000 (11:03 +0100)]
mfd: max77686: Fix possible NULL pointer dereference on i2c_new_dummy error

During probe the driver allocates dummy I2C device for RTC with
i2c_new_dummy() but it does not check the return value of this call.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for main
MFD driver.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max8997: Fix possible NULL pointer dereference on i2c_new_dummy error
Krzysztof Kozlowski [Tue, 11 Feb 2014 10:03:34 +0000 (11:03 +0100)]
mfd: max8997: Fix possible NULL pointer dereference on i2c_new_dummy error

During probe the driver allocates dummy I2C devices for RTC, haptic and
MUIC with i2c_new_dummy() but it does not check the return value of this
calls.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by i2c_unregister_device().

If i2c_new_dummy() fails for RTC, haptic or MUIC devices, fail also the
probe for main MFD driver.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Delete non-required instances of include <linux/init.h>
Paul Gortmaker [Tue, 21 Jan 2014 21:23:01 +0000 (16:23 -0500)]
mfd: Delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: stmpe: Trivial: Remove unnecessary semicolon
Sachin Kamat [Tue, 4 Feb 2014 09:07:13 +0000 (14:37 +0530)]
mfd: stmpe: Trivial: Remove unnecessary semicolon

Semicolon is not necessary after the while statement.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: tps65218: Add driver for the TPS65218 PMIC
Keerthy [Thu, 6 Feb 2014 05:50:12 +0000 (11:20 +0530)]
mfd: tps65218: Add driver for the TPS65218 PMIC

The TPS65218 chip is a power management IC for Portable Navigation Systems
and Tablet Computing devices. It contains the following components:

 - Regulators.
 - Over Temperature warning and Shut down.

This patch adds support for tps65218 mfd device. At this time only
the regulator functionality is made available.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: tc3589x: Reform device tree probing
Linus Walleij [Thu, 23 Jan 2014 12:43:28 +0000 (13:43 +0100)]
mfd: tc3589x: Reform device tree probing

This changes the following mechanisms in the TC3589x device tree
probing path:

- Use the .of_match_table in struct device_driver to match the
  device in the device tree.
- Add matches for the proper compatible strings "toshiba,..."
  and all sub-variants, just as is done for the .id matches.
- Move over all the allocation of platform data etc to the
  tc3589x_of_probe() function and follow the pattern of passing
  a platform data pointer back, or an error pointer on error,
  as found in the STMPE driver.
- Match the new (proper) compatible strings for the GPIO and
  keypad MFD cells.
- Use of_device_is_compatible() rather than just !strcmp()
  to discover which cells to instantiate.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: wm5110: Make additional DSP registers available to the user
Charles Keepax [Wed, 22 Jan 2014 13:04:24 +0000 (13:04 +0000)]
mfd: wm5110: Make additional DSP registers available to the user

Expose some DSP registers which are useful for DSP users to be able to
access whilst debugging their firmware.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: wm5102: Make additional DSP registers available to the user
Charles Keepax [Wed, 22 Jan 2014 13:04:23 +0000 (13:04 +0000)]
mfd: wm5102: Make additional DSP registers available to the user

Expose some DSP registers which are useful for DSP users to be able to
access whilst debugging their firmware.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max14577: Add of_compatible to extcon mfd_cell
Krzysztof Kozlowski [Tue, 28 Jan 2014 12:18:28 +0000 (13:18 +0100)]
mfd: max14577: Add of_compatible to extcon mfd_cell

Add of_compatible ("maxim,max14577-muic") to the mfd_cell for extcon
driver. If entry with such compatible is present in the DTS, the extcon
driver will have of_node set.

This may be useful for extcon consumers and it is documented in
bindings documentation.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max14577: Remove not needed header inclusion
Krzysztof Kozlowski [Tue, 28 Jan 2014 12:18:27 +0000 (13:18 +0100)]
mfd: max14577: Remove not needed header inclusion

Remove not needed max14577-private.h header inclusion in the main driver
header. Remove obvious comment.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: max14577: Remove unused enum max14577_irq_source
Krzysztof Kozlowski [Tue, 28 Jan 2014 12:18:26 +0000 (13:18 +0100)]
mfd: max14577: Remove unused enum max14577_irq_source

Remove unused symbol: enum max14577_irq_source.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Include all drivers in subsystem menu
Linus Walleij [Wed, 29 Jan 2014 10:09:53 +0000 (11:09 +0100)]
mfd: Include all drivers in subsystem menu

It is currently not possible to select the SA1100 or Vexpress
drivers in the MFD subsystem, because the menu for the entire
subsystem ends before these options are presented.

Move the main menu closing and the endif for HAS_IOMEM to the
end of the file so these are selectable again.

Cc: stable@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoMerge branch 'ib-mfd-io-3.15' into HEAD
Lee Jones [Wed, 19 Mar 2014 08:57:53 +0000 (08:57 +0000)]
Merge branch 'ib-mfd-io-3.15' into HEAD

10 years agoMerge branch 'ib-mfd-omap' into HEAD
Lee Jones [Wed, 19 Mar 2014 08:57:44 +0000 (08:57 +0000)]
Merge branch 'ib-mfd-omap' into HEAD

10 years agoMerge branch 'ib-mfd-regulator-3.15' into HEAD
Lee Jones [Wed, 19 Mar 2014 08:57:33 +0000 (08:57 +0000)]
Merge branch 'ib-mfd-regulator-3.15' into HEAD

10 years agomfd: wm5102: Update register patch
Charles Keepax [Fri, 31 Jan 2014 16:16:17 +0000 (16:16 +0000)]
mfd: wm5102: Update register patch

Update the register patch based on latest evaluation of the device.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoDocumentation: mfd: Add binding document for S2MPA01
Sachin Kamat [Fri, 14 Mar 2014 11:51:59 +0000 (17:21 +0530)]
Documentation: mfd: Add binding document for S2MPA01

Added initial binding documentation for S2MPA01 MFD.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agoregulator: Add support for S2MPA01 regulator
Sachin Kamat [Fri, 14 Mar 2014 11:51:58 +0000 (17:21 +0530)]
regulator: Add support for S2MPA01 regulator

Add support for S2MPA01 voltage and current regulator.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: Add support for S2MPA01 device
Sachin Kamat [Fri, 14 Mar 2014 11:51:57 +0000 (17:21 +0530)]
mfd: Add support for S2MPA01 device

Add the necessary entries required for S2MPA01 multi-function
device. While at it also convert whitespaces to tabs in core.h.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Silence compiler warning
Pankaj Dubey [Thu, 13 Mar 2014 02:14:07 +0000 (11:14 +0900)]
mfd: sec-core: Silence compiler warning

When used 64bit compiler GCC warns as
drivers/mfd/sec-core.c:199:10: warning:
cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error
Krzysztof Kozlowski [Tue, 11 Feb 2014 09:12:25 +0000 (10:12 +0100)]
mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error

During probe the sec-core driver allocates dummy I2C device for RTC with
i2c_new_dummy() but return value is not checked. In case of error
(i2c_new_device(): memory allocation failure or I2C address cannot be
used) this function returns NULL which is later used by
devm_regmap_init_i2c() or i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for main
MFD driver.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec: Add support for S2MPS14
Krzysztof Kozlowski [Fri, 28 Feb 2014 10:41:44 +0000 (11:41 +0100)]
mfd: sec: Add support for S2MPS14

Add support for S2MPS14 PMIC device to the MFD sec-core driver.
The S2MPS14 is similar to S2MPS11 but it has fewer regulators, two
clocks instead of three and a little different registers layout.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-irq: Use consistent S2MPS11 RTC alarm interrupt indexes
Krzysztof Kozlowski [Fri, 28 Feb 2014 10:41:43 +0000 (11:41 +0100)]
mfd: sec-irq: Use consistent S2MPS11 RTC alarm interrupt indexes

The S2MPS11 RTC has two alarms: alarm0 and alarm1 (corresponding
interrupts are named similarly). Use consistent names for interrupts to
limit possible errors.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Select different RTC regmaps for devices
Krzysztof Kozlowski [Fri, 28 Feb 2014 10:41:42 +0000 (11:41 +0100)]
mfd: sec-core: Select different RTC regmaps for devices

This patch prepares for adding support for S2MPS14 RTC driver by
selecting different regmaps for S2MPS1X/S5M876X RTC devices.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
10 years agomfd: sec-core: Add maximum RTC register for regmap config
Krzysztof Kozlowski [Fri, 28 Feb 2014 10:41:41 +0000 (11:41 +0100)]
mfd: sec-core: Add maximum RTC register for regmap config

Add maximum register to the regmap used by rtc-s5m driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>