]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
11 years agomfd: db8500-prcmu: Support platform dependant device selection
Lee Jones [Tue, 9 Apr 2013 19:52:58 +0000 (20:52 +0100)]
mfd: db8500-prcmu: Support platform dependant device selection

The main aim for this cycle is to have the u8540 booting to a
console. However, the u8540 doesn't support all of the u8500
platform devices yet. After this stage is complete we can then
fill in the inadequacies, such as specific clock support at a
later date. To achieve this we're placing devices supported by
all platforms into a common device structure and the remaining
ones into a platform specific one.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: syscon: Fix warnings when printing resource_size_t
Alexander Shiyan [Tue, 9 Apr 2013 17:50:02 +0000 (21:50 +0400)]
mfd: syscon: Fix warnings when printing resource_size_t

Gets rid of these warnings when compile module for 64 bit targets:
  CC      drivers/mfd/syscon.o
  drivers/mfd/syscon.c: In function 'syscon_probe':
  drivers/mfd/syscon.c:155:2: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' [-Wformat]
  drivers/mfd/syscon.c:155:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat]

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoof: Add stub of_get_parent for non-OF builds
Alexander Shiyan [Tue, 9 Apr 2013 15:47:40 +0000 (19:47 +0400)]
of: Add stub of_get_parent for non-OF builds

Fixes build error on x86_64 allmodconfig, introduced by commit
5ab3a89a741f ("mfd: syscon: Add non-DT support").

drivers/regulator/anatop-regulator.c: In function 'anatop_regulator_probe':
drivers/regulator/anatop-regulator.c:134:2: error: implicit declaration of function 'of_get_parent' [-Werror=implicit-function-declaration]

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-tll: Convert to devm_ioremap_resource()
Sachin Kamat [Tue, 9 Apr 2013 10:46:37 +0000 (16:16 +0530)]
mfd: omap-usb-tll: Convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-host: Convert to devm_ioremap_resource()
Sachin Kamat [Tue, 9 Apr 2013 10:46:36 +0000 (16:16 +0530)]
mfd: omap-usb-host: Convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Kconfig alphabetical re-ordering
Samuel Ortiz [Tue, 9 Apr 2013 12:40:09 +0000 (14:40 +0200)]
mfd: Kconfig alphabetical re-ordering

Ordering so many Kconfig alphabetically makes it a lot easier to read e.g.
from menuconfig.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: support stmpe1801 18 bits enhanced port expander
Jean-Nicolas Graux [Tue, 9 Apr 2013 08:35:19 +0000 (10:35 +0200)]
mfd: support stmpe1801 18 bits enhanced port expander

Provides support for 1801 variant of stmpe gpio port expanders.
This chip has 18 gpios configurable as GPI, GPO, keypad matrix,
special key or dedicated key function.

Note that special/dedicated key function is not supported yet.

Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: stmpe: Use spi_get_drvdata()
Jingoo Han [Sat, 6 Apr 2013 06:44:51 +0000 (15:44 +0900)]
mfd: stmpe: Use spi_get_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Use spi_get_drvdata()
Jingoo Han [Sat, 6 Apr 2013 06:44:30 +0000 (15:44 +0900)]
mfd: arizona: Use spi_get_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: mc13xxx: Use spi_get_drvdata() and spi_set_drvdata()
Jingoo Han [Sat, 6 Apr 2013 06:44:14 +0000 (15:44 +0900)]
mfd: mc13xxx: Use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ezx-pcap: Use spi_get_drvdata() and spi_set_drvdata()
Jingoo Han [Sat, 6 Apr 2013 06:43:48 +0000 (15:43 +0900)]
mfd: ezx-pcap: Use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: da9052: Use spi_get_drvdata() and spi_set_drvdata()
Jingoo Han [Sat, 6 Apr 2013 06:43:23 +0000 (15:43 +0900)]
mfd: da9052: Use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm831x: Use spi_get_drvdata() and spi_set_drvdata()
Jingoo Han [Sat, 6 Apr 2013 06:42:48 +0000 (15:42 +0900)]
mfd: wm831x: Use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: vexpress: Give the "leds-gpio" device a real parent
Pawel Moll [Wed, 3 Apr 2013 12:26:27 +0000 (13:26 +0100)]
mfd: vexpress: Give the "leds-gpio" device a real parent

The registration of the "leds-gpio" device was using
"vexpress_sysreg_dev" as a parent before it was actually
set to something different than NULL.

Trivial fix by reordering the code.

Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500: sysctrl: Initialize driver at arch_initcall
Ulf Hansson [Tue, 2 Apr 2013 23:06:27 +0000 (01:06 +0200)]
mfd: ab8500: sysctrl: Initialize driver at arch_initcall

The abx500-clk driver is initiated at arch_initcall level. Moreover it
is relying on the ab8500-sysctrl API to be available. Therefore move
ab8500-sysctrl to arch_initcall level as well. The device is already
added before the abx500 clk device, thus it will be probed before as
well, which is exactly what we want.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: db8500-prcmu: Return early if the TCPM cannot be located
Lee Jones [Thu, 4 Apr 2013 10:39:00 +0000 (11:39 +0100)]
mfd: db8500-prcmu: Return early if the TCPM cannot be located

Currently we check to see if we obtained the Tightly Coupled Program
Memory (TCPM) base and only execute the code within the check if we
have it. It's more traditional to return early if we don't have it.
This way we can flatten most of the function's code down to a single
tab spacing.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: syscon: Add missing struct device_node declaration
Sylwester Nawrocki [Mon, 25 Mar 2013 16:56:23 +0000 (17:56 +0100)]
mfd: syscon: Add missing struct device_node declaration

syscon.h header uses struct device_node in functions' declarations
without declaring it. This causes compilation warnings like:

include/linux/mfd/syscon.h:20: warning: ‘struct device_node’
declared inside parameter list
include/linux/mfd/syscon.h:20: warning: its scope is only this
definition or declaration, which is probably not what you want

Fix it by adding a forward declaration of struct device_node.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Add of_compatilbe property for ab8500-usb
Fabio Baltieri [Tue, 9 Apr 2013 08:57:21 +0000 (10:57 +0200)]
mfd: ab8500-core: Add of_compatilbe property for ab8500-usb

Add of_comptabile string to the ab8500-usb cell to allow the driver to
grab properties from device-tree when available.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-host: Add device tree support and binding information
Roger Quadros [Tue, 9 Apr 2013 08:39:18 +0000 (11:39 +0300)]
mfd: omap-usb-host: Add device tree support and binding information

Allows the OMAP HS USB host controller to be specified
via device tree.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-host: Remove PHY reset handling code
Roger Quadros [Tue, 9 Apr 2013 08:39:17 +0000 (11:39 +0300)]
mfd: omap-usb-host: Remove PHY reset handling code

PHY reset GPIO handling will be done in the PHY driver

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm8994: Don't use system PM operations
Mark Brown [Fri, 22 Mar 2013 11:40:22 +0000 (12:40 +0100)]
mfd: wm8994: Don't use system PM operations

For realistic systems the power management is controlled entirely via
runtime PM - if the device is not runtime suspended then the suspend
will abort without doing anything as functionality such as accessory
detection or audio bypass will require the device to be enabled while
if the device is runtime suspended it is already in the lowest power
state. This means that system suspend is redundant and can be removed
which avoids issues with attempting to double disable the regulators.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Ignore masked out interrupts
Fabio Baltieri [Thu, 21 Mar 2013 13:49:44 +0000 (14:49 +0100)]
mfd: ab8500-core: Ignore masked out interrupts

AB8500 asserts LATCH bits for masked out interrupts.  This patch
explicitly masks those out using the cached mask value to prevent
handle_nested_irq() being called for masked IRQ on the same register as
unmasked ones.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Remove twelve unused Kconfig symbols
Paul Bolle [Wed, 20 Mar 2013 09:09:39 +0000 (10:09 +0100)]
mfd: Remove twelve unused Kconfig symbols

Twelve Kconfig symbols, all related to WM8350, WM8351, and WM8352, are
unused. Commit 19d57ed5a308472a02e773f33c03ad4cb2ec6a9 ("mfd: Remove
custom wm8350 cache implementation") removed all their (actual) users.
Remove these symbols too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: da9055: Change irq state to default
Ashish Jangam [Mon, 18 Mar 2013 09:12:38 +0000 (14:42 +0530)]
mfd: da9055: Change irq state to default

This patch changes the irq state from high to the now default low.
Because the default PMIC irq state of DA9055 got changed from high to low.
This change should not affect any of the existing users since all of them
use active low state.

This patch has been tested on smdkv6410.

Signed-off-by: Ashish <ashish.jangam@kpitcummins.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-tll: Add device tree support and binding information
Roger Quadros [Tue, 29 Jan 2013 13:20:55 +0000 (15:20 +0200)]
mfd: omap-usb-tll: Add device tree support and binding information

Allows the OMAP USB TLL module to be specified via device tree.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-tll: Move configuration code to omap_tll_init()
Roger Quadros [Tue, 29 Jan 2013 13:00:03 +0000 (15:00 +0200)]
mfd: omap-usb-tll: Move configuration code to omap_tll_init()

This is because we want to get rid of platform_data usage from probe().
The only information we need is PORT_MODE, and this can be supplied
to us by the user (i.e. omap-usb-host.c).

We also move channel clock management from runtime PM handlers into
omap_tll_enable/disable().

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-host: Update nports in platform_data
Roger Quadros [Tue, 8 Jan 2013 14:01:52 +0000 (16:01 +0200)]
mfd: omap-usb-host: Update nports in platform_data

EHCI driver would need to know the number of ports available
on the platform. We set the nports parameter of platform_data
based on IP version if it was not already provided.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: da9055: Drop "select PMIC_DA9055"
Paul Bolle [Sat, 9 Mar 2013 16:32:34 +0000 (17:32 +0100)]
mfd: da9055: Drop "select PMIC_DA9055"

The Kconfig entry for DA9055 PMIC Support selects PMIC_DA9055. That was
probably inspired by the similar select statement in the entry for
DA9052/53 PMIC with I2C. But the DA9055 PMIC only comes in an I2C
variant and its driver doesn't need a separate Kconfig symbol for shared
code. In any case, this select can be dropped as PMIC_DA9055 doesn't
exist.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Map in additional FLL control registers
Mark Brown [Wed, 6 Mar 2013 06:28:14 +0000 (14:28 +0800)]
mfd: wm5102: Map in additional FLL control registers

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Define additional FLL control registers
Mark Brown [Wed, 6 Mar 2013 06:28:13 +0000 (14:28 +0800)]
mfd: arizona: Define additional FLL control registers

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: palmas: Initialise client->of_node for dummy created client
Laxman Dewangan [Tue, 19 Mar 2013 08:58:20 +0000 (14:28 +0530)]
mfd: palmas: Initialise client->of_node for dummy created client

Palmas device have three different i2c addresses. The device creates
the two new dummy i2c clients for accessing the register by using
primary client adapter. This new dummy i2c client have their of_node
as NULL.

The dummy i2c client is used for registering interrupt and on this,
it creates irq domain handle. This created irq domain handle has
their of_node as NULL.

Now when any child of this device is registered through the DT as
follows:
         palmas: tps65913@58 {
          ::::::::::::::::::

          #interrupt-cells = <2>;
                interrupt-controller;

                palmas_rtc {
                       compatible = "ti,palmas-rtc";
                       interrupt-parent = <&palmas>;
                       interrupts = <8 0>;
                };
                ::::::::::;;;
         };

And child driver (palam-rtc in this case) get their irq number as
irq = platform_get_irq(pdev, 0);

The returned irq number is error in this case. The reason is that
the created irq_domain handle for the palmas interrupt does not have
valid node and so matching of node fails with palmas node.

Hence initialising the newly dummy created client->of_node with the
primary clients of_node so that irq_domain handle have proper of_node
for matching.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: Add resources for charger
Rhyland Klein [Tue, 12 Mar 2013 22:08:07 +0000 (18:08 -0400)]
mfd: tps65090: Add resources for charger

Add irq resources to pass to the charger mfd sub dev so
the charger can listen for interrupts.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: Fix enum in header file
Rhyland Klein [Tue, 12 Mar 2013 22:08:06 +0000 (18:08 -0400)]
mfd: tps65090: Fix enum in header file

The enum is missing the definition for the first bit, which makes all
the rest off by one. Add definition for the TPS65090_IRQ_INTERRUPT bit
which at 0.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: palmas: is_palmas_charger needed by multiple drivers
Ian Lartey [Fri, 22 Mar 2013 14:55:12 +0000 (14:55 +0000)]
mfd: palmas: is_palmas_charger needed by multiple drivers

is_palmas_charger checks for the presence of charging
functionality in the device

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
Acked-by: Laxman Dewangani <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: sta2x11: Build warning fix
Alessandro Rubini [Fri, 22 Feb 2013 09:39:59 +0000 (10:39 +0100)]
mfd: sta2x11: Build warning fix

This driver cannot be a module, so "remove" is never called.  The
mishap is mine, and back then there was no warning due to __devexit().

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Acked-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tc3589x: Use devm_*() functions
Jingoo Han [Wed, 20 Feb 2013 09:31:52 +0000 (18:31 +0900)]
mfd: tc3589x: Use devm_*() functions

Use devm_*() functions to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: da903x: Use devm_*() functions
Jingoo Han [Wed, 20 Feb 2013 09:31:26 +0000 (18:31 +0900)]
mfd: da903x: Use devm_*() functions

Use devm_*() functions to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ezx-pcap: Use devm_*() functions
Jingoo Han [Wed, 20 Feb 2013 09:30:55 +0000 (18:30 +0900)]
mfd: ezx-pcap: Use devm_*() functions

Use devm_*() functions to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl6040: Use devm_*() functions
Jingoo Han [Wed, 20 Feb 2013 09:30:21 +0000 (18:30 +0900)]
mfd: twl6040: Use devm_*() functions

Use devm_*() functions to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: aat2870: Use use devm_*() functions
Jingoo Han [Wed, 20 Feb 2013 09:29:53 +0000 (18:29 +0900)]
mfd: aat2870: Use use devm_*() functions

Use devm_*() functions to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-host: Use devm_gpio_request_one()
Jingoo Han [Wed, 20 Feb 2013 09:29:30 +0000 (18:29 +0900)]
mfd: omap-usb-host: Use devm_gpio_request_one()

Use devm_gpio_request_one() to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: intel_msic: Use devm_gpio_request_one()
Jingoo Han [Wed, 20 Feb 2013 09:28:49 +0000 (18:28 +0900)]
mfd: intel_msic: Use devm_gpio_request_one()

Use devm_gpio_request_one() to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: lm3533: Use devm_gpio_request_one()
Jingoo Han [Wed, 20 Feb 2013 09:28:15 +0000 (18:28 +0900)]
mfd: lm3533: Use devm_gpio_request_one()

Use devm_gpio_request_one() to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: 88pm860x: Drop devm_kfree of devm_kzalloc'd data
Jingoo Han [Wed, 20 Feb 2013 09:27:21 +0000 (18:27 +0900)]
mfd: 88pm860x: Drop devm_kfree of devm_kzalloc'd data

devm_kfree() allocates memory that is released when a driver detaches.
Thus, there is no reason to explicitly call devm_kfree() in probe or remove
functions.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: adp5520: Restore mode bits on resume
Lars-Peter Clausen [Tue, 19 Feb 2013 10:51:22 +0000 (11:51 +0100)]
mfd: adp5520: Restore mode bits on resume

The adp5520 unfortunately also clears the BL_EN bit when the nSTNDBY bit is
cleared. So we need to make sure to restore it during resume if it was set
before suspend.

Cc: stable@vger.kernel.org
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMerge tag 'ux500-multiplatform-mfd' of git://git.kernel.org/pub/scm/linux/kernel...
Samuel Ortiz [Mon, 8 Apr 2013 14:36:52 +0000 (16:36 +0200)]
Merge tag 'ux500-multiplatform-mfd' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson

MFD portions of the ux500 multiplatform branch.
A second tag for the ARM SoC tree will build upon
this one. This mainly removes the header file
dependencies from the PRCMU driver in the MFD
subsystem, and moves the PM functions to the
machine.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agopower: rx51_battery: Fix reporting correct values
Pali Rohár [Fri, 15 Feb 2013 22:56:50 +0000 (23:56 +0100)]
power: rx51_battery: Fix reporting correct values

Tell twl4030_madc_conversion that this driver needs raw values.
Driver twl4030_madc has some hardcoded values and conversation
functions which are incorrect for Nokia RX-51 board. This driver
rx51_battery expects raw values which convert itself.

This patch fixing values reported by power supply interface.
Before this patch driver reported always incorrect values on
3.8 kernel (sometimes design capacity was negative).

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion
Pali Rohár [Fri, 15 Feb 2013 22:56:49 +0000 (23:56 +0100)]
mfd: twl4030-madc: Add support for raw value in twl4030_madc_conversion

Driver twl4030-madc has hardcoded channel types (10 - battery current,
1 - battery temperature) and also conversation data in variable
twl4030_divider_ratios. These hardcoded channels are incorrect for
Nokia RX-51 board (where is channel 0 - battery temperature).

For Nokia RX-51 there is rx51_battery power_supply driver which reporting
battery information via twl4030_madc_conversion. But this driver needs
raw values (not converted via some hardcoded functions). So this patch
adding new parameter "raw" to struct twl4030_madc_request which tell
twl4030-madc driver to not convert values, but rather return raw.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Reviewed-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Don't wait for boot when boot sequencer is disabled
Charles Keepax [Wed, 3 Apr 2013 08:45:29 +0000 (09:45 +0100)]
mfd: wm5102: Don't wait for boot when boot sequencer is disabled

As we are using a custom boot sequence we don't need to wait for the
standard boot sequence in device init when the normal write sequence is
disabled.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Wait for internal clocks to startup after reset
Charles Keepax [Wed, 3 Apr 2013 11:53:37 +0000 (12:53 +0100)]
mfd: arizona: Wait for internal clocks to startup after reset

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Hold device in reset while ramping supplies
Mark Brown [Tue, 26 Mar 2013 12:15:26 +0000 (12:15 +0000)]
mfd: arizona: Hold device in reset while ramping supplies

Acquire the /RESET GPIO before we enable regulators and hold the device
in reset while the regulators power up in order to improve robustness
during the initial power up.

Also fix the error path so that the device is left in reset while we're
at it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Update defaults to match patch
Charles Keepax [Wed, 27 Mar 2013 11:13:25 +0000 (11:13 +0000)]
mfd: wm5102: Update defaults to match patch

Registers which have defaults and are updated by the patch file should
have their defaults updated to match the value set by the patch file,
otherwise incorrect values will be read from the cache.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Deactivate standard boot sequence
Charles Keepax [Wed, 27 Mar 2013 09:49:40 +0000 (09:49 +0000)]
mfd: wm5102: Deactivate standard boot sequence

This patch deactivates the standard, currently noop, boot sequence
because we now have facilities in place for running a custom boot
sequence.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Add a hardware patch mechanism
Charles Keepax [Tue, 26 Mar 2013 18:46:15 +0000 (18:46 +0000)]
mfd: arizona: Add a hardware patch mechanism

This patch adds facilities for apply a register patch contained within
the chip using the write sequencer.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Factor out register polling
Charles Keepax [Tue, 26 Mar 2013 17:38:45 +0000 (17:38 +0000)]
mfd: arizona: Factor out register polling

Factor out the polling of the interrupt status register whilst we wait
for boot done to allow the polling to be reused in other situations.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Manually apply register patch
Charles Keepax [Tue, 26 Mar 2013 18:01:49 +0000 (18:01 +0000)]
mfd: wm5102: Manually apply register patch

Future updates will require us to manually apply the register patch for
wm5102.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Only use the lowest three bits of device revision
Mark Brown [Tue, 26 Mar 2013 11:14:52 +0000 (11:14 +0000)]
mfd: wm5102: Only use the lowest three bits of device revision

Only the lowest three bits contain device revision for WM5102, the high
bits have been repurposed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Unconditionally enable 32kHz clock
Mark Brown [Tue, 19 Mar 2013 18:04:46 +0000 (19:04 +0100)]
mfd: arizona: Unconditionally enable 32kHz clock

If we have a directly provided 32kHz clock unconditionally enable it,
substantial chip functionality relies on it so dynamic management is
not worthwhile.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Fully support the use of MCLK1 as the 32kHz clock source
Mark Brown [Tue, 19 Mar 2013 13:47:47 +0000 (14:47 +0100)]
mfd: arizona: Fully support the use of MCLK1 as the 32kHz clock source

MCLK1 is not in the AoD power domain so if it is used as the 32kHz clock
source we need to hold a runtime PM reference to keep the device from going
into low power mode.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Update patch for latest evaluation
Mark Brown [Tue, 8 Jan 2013 10:37:06 +0000 (10:37 +0000)]
mfd: wm5102: Update patch for latest evaluation

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Support configuring MICBIASes into bypass mode
Mark Brown [Tue, 29 Jan 2013 10:44:41 +0000 (18:44 +0800)]
mfd: arizona: Support configuring MICBIASes into bypass mode

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Try to use interrupt flags from interrupt controller
Mark Brown [Sun, 24 Mar 2013 23:16:56 +0000 (23:16 +0000)]
mfd: arizona: Try to use interrupt flags from interrupt controller

If no irq_flags are passed in platform data then query the interrupt
controller for the trigger type and try to use that. This provides
default operation with a wider range of hardware and will be needed
for device tree support where the interrupt flags are configured on
the interrupt controller.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Allow GPIO to be specified for IRQ line
Mark Brown [Sun, 24 Mar 2013 23:05:58 +0000 (23:05 +0000)]
mfd: arizona: Allow GPIO to be specified for IRQ line

If a GPIO is specified for the chip IRQ line then request it. This
improves support for systems that do not put pins into input mode when
used as interrupts.

Also use this GPIO when the primary IRQ is in edge triggered mode to
detect if we have handled pending interrupts in order to improve
robustness.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Basic support for edge triggered IRQs
Mark Brown [Fri, 22 Mar 2013 11:59:33 +0000 (12:59 +0100)]
mfd: arizona: Basic support for edge triggered IRQs

Allow the user to configure edge triggered IRQs, though we do not yet
fully handle new interrupts occurring while an interrupt is being handled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Clarify error message for failed primary IRQ request
Mark Brown [Tue, 19 Mar 2013 09:51:14 +0000 (09:51 +0000)]
mfd: arizona: Clarify error message for failed primary IRQ request

regmap has a very similar looking error, help identify where the error
comes from by changing the error message.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Clean up on failed runtime resume
Mark Brown [Mon, 14 Jan 2013 06:50:38 +0000 (15:50 +0900)]
mfd: arizona: Clean up on failed runtime resume

Make sure that we don't leave the device enabled needlessly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Disable all wake sources by default
Mark Brown [Thu, 17 Jan 2013 07:54:18 +0000 (16:54 +0900)]
mfd: arizona: Disable all wake sources by default

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoARM: ux500: split out prcmu initialization
Arnd Bergmann [Thu, 21 Mar 2013 21:51:07 +0000 (22:51 +0100)]
ARM: ux500: split out prcmu initialization

This untangles the final bits of the prcmu code from the platform
code:

* The IRQ_PRCMU_* definitions move from irqs-db8500.h into prcmu.c
  because they are only of local significance.
* u8500_thsens_device goes into the prcmu, because it uses a PRCMU
  IRQ that the platform does not see.
* IRQ_DB8500_AB8500 and IRQ_PRCMU_BASE go into the platform data
  because the PRCMU does not see it.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[Fixed a oneliner bug]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomfd: db8500-prcmu: drop unused includes
Linus Walleij [Mon, 8 Apr 2013 11:41:45 +0000 (13:41 +0200)]
mfd: db8500-prcmu: drop unused includes

These two <mach/*> includes are no longer used in the
PRCMU driver, so drop them.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: ux500: move PM-related PRCMU functions to machine
Linus Walleij [Tue, 19 Mar 2013 14:36:12 +0000 (15:36 +0100)]
ARM: ux500: move PM-related PRCMU functions to machine

We are trying to decompose and decentralize the code in
the DB8500 PRCMU out into subdrivers. The code moved in
this patch concerns a group of functions used for
decoupling and recoupling the IRQs from the GIC. During
sleep and idle the Ux500 system will transfer all IRQ
handling to the PRCMU using these functions.

Basically we are left with the two alternatives of code
placement as:

- arch/arm/mach-ux500/pm.c - this because the code is
  closely related to the GIC, and takes ownership of
  some of the registers from the PRCMU related to this
  PM functionality.

- drivers/mfd/db8500-prcmu-pm.c - because the code is
  affecting stuff in the PRCMU register range. But then
  this code needs to remap and handle GIC registers.

This patch implementation is taking the first approach.

Currently the cpuidle driver is the only piece of code
using this set of functions, but it will later also be
used by the suspend/resume code which is currently under
review.

The header file is moved to:
<linux/platform_data/arm-ux500-pm.h>
The function prototypes need to be placed in a globally
visible header since the CPUidle code is planned to move
out to drivers/cpuidle.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomfd: db8500-prcmu: get base address from resource
Linus Walleij [Tue, 19 Mar 2013 13:21:47 +0000 (14:21 +0100)]
mfd: db8500-prcmu: get base address from resource

We cannot use a global variable stored in <mach/hardware.h> to
find the base address of the PRCMU. The real resource is already
there from the board, so use this to look up the base address
instead.

Currently the patch is kept minimal so as not to interfere with
other work being done on refactoring this driver, but at a later
point the defines using (prcmu_base + 0xnnn) need to be replaced
by pure offset defined for (0xnnn) and the base inlined with the
readl()/writel() and similar codepaths.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomfd: prcmu: pass a base and size with the early initcall
Linus Walleij [Thu, 21 Mar 2013 11:27:25 +0000 (12:27 +0100)]
mfd: prcmu: pass a base and size with the early initcall

This patch will make an early remapping of the PRCMU, to be
used when setting up the clocks, that will call down into parts
of the PRCMU driver before it is probed.

Going forward this will be removed like this:

- The mailbox subsystem need to be merged.
  http://marc.info/?l=linux-kernel&m=136314559201983&w=2

- At this point the PRCMU clock code can be moved over to the
  ux500 clock driver in drivers/clk/ux500/* and maintained
  there in a decentralized manner.

- This early initcall and PRCMU base parameters become part of
  the ux500_clk_init() call instead.

Cc: Suman Anna <s-anna@ti.com>
Cc: Loic Pallardy <loic.pallardy@st.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomfd: wm8994: Silence bogus warning in wm8994_device_init()
Jingoo Han [Wed, 20 Feb 2013 02:53:36 +0000 (11:53 +0900)]
mfd: wm8994: Silence bogus warning in wm8994_device_init()

'patch_regs' cannot be used uninitialized in wm8994_device_init(),
because 'patch_regs' was already guarded by 'regmap_patch'.
Thus, that's a bogus warning.

Without this patch, the build warning happens as below:

drivers/mfd/wm8994-core.c: In function 'wm8994_i2c_probe':
drivers/mfd/wm8994-core.c:595:7: warning: 'patch_regs' may be used uninitialized in this function [-Wuninitialized]
drivers/mfd/wm8994-core.c:408:14: note: 'patch_regs' was declared here

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: max77686: Use NULL instead of 0
Sachin Kamat [Tue, 26 Mar 2013 04:43:36 +0000 (10:13 +0530)]
mfd: max77686: Use NULL instead of 0

'data' is a pointer and hence use NULL instead of 0.
Silences the following warning:
drivers/mfd/max77686.c:49:50: warning: Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: adp5520: Use module_i2c_driver()
Sachin Kamat [Fri, 15 Mar 2013 11:40:28 +0000 (17:10 +0530)]
mfd: adp5520: Use module_i2c_driver()

module_i2c_driver() removes some boilerplate and makes the code
simple.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMerge branch 'for-mfd-and-power' of git://git.linaro.org/people/ljones/linux-3.0...
Samuel Ortiz [Mon, 8 Apr 2013 09:19:40 +0000 (11:19 +0200)]
Merge branch 'for-mfd-and-power' of git://git.linaro.org/people/ljones/linux-3.0-ux500

Conflicts:
drivers/mfd/ab8500-gpadc.c

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMFD: rtsx_pcr: Fix probe fail path
Jiri Slaby [Thu, 4 Apr 2013 19:34:11 +0000 (21:34 +0200)]
MFD: rtsx_pcr: Fix probe fail path

When rtsx_pci_acquire_irq fails in rtsx_pci_probe, we forget to
disable an MSI (if we enabled it). This results in this warning on the
next attempt to load the module:
WARNING: at drivers/pci/msi.c:834 pci_enable_msi_block+0x2a4/0x2b0()
Hardware name: HP EliteBook 840 G1
Modules linked in: rtsx_pci(+) ...
Pid: 4056, comm: modprobe Tainted: G          I  3.8.0-9405-gd895cb1-1-vanilla #1
Call Trace:
 [<ffffffff81045c6a>] warn_slowpath_common+0x7a/0xc0
 [<ffffffff81045cc5>] warn_slowpath_null+0x15/0x20
 [<ffffffff81302544>] pci_enable_msi_block+0x2a4/0x2b0
 [<ffffffffa05e335a>] rtsx_pci_probe+0x55a/0x720 [rtsx_pci]
...

So properly disable MSI in that case.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: abx500: Move the AB8500 Kconfig fragment
Linus Walleij [Thu, 14 Mar 2013 14:54:24 +0000 (15:54 +0100)]
mfd: abx500: Move the AB8500 Kconfig fragment

Move the AB8500 Kconfig fragment below the AB3100 so the
menuconfig menu gets hierarchically nested and looks nice.
Having the EZX PCAP in the middle disturbs the nice
hierarchical layout from kconfig.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: davinci_voicecodec: use module_platform_driver_probe()
Jingoo Han [Tue, 5 Mar 2013 04:48:28 +0000 (13:48 +0900)]
mfd: davinci_voicecodec: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: htc-pasic3: use module_platform_driver_probe()
Jingoo Han [Tue, 5 Mar 2013 04:47:59 +0000 (13:47 +0900)]
mfd: htc-pasic3: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab3100-otp: use module_platform_driver_probe()
Jingoo Han [Tue, 5 Mar 2013 04:47:06 +0000 (13:47 +0900)]
mfd: ab3100-otp: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: stmpe: DT: Add stmpe-i2c dt alias to get id device
Gabriel Fernandez [Fri, 1 Mar 2013 12:07:26 +0000 (13:07 +0100)]
mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device

This patch augments the STMP driver to read the device id
from the stmpe-i2c dt alias if present.

Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: stmpe: DT: Enable no-irq mode configuration
Gabriel Fernandez [Fri, 1 Mar 2013 12:07:16 +0000 (13:07 +0100)]
mfd: stmpe: DT: Enable no-irq mode configuration

If there is no interrupt property into stmpe node
then activate the no-irq mode by setting the irq
value to -1.

Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: syscon: Add non-DT support
Alexander Shiyan [Wed, 13 Mar 2013 17:34:20 +0000 (21:34 +0400)]
mfd: syscon: Add non-DT support

This patch allow using syscon driver from the platform data, i.e.
possibility using driver on systems without oftree support.
For search syscon device from the client drivers,
"syscon_regmap_lookup_by_pdevname" function was added.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: syscon: Removed unneeded field "dev" from private driver structure
Alexander Shiyan [Wed, 13 Mar 2013 17:34:19 +0000 (21:34 +0400)]
mfd: syscon: Removed unneeded field "dev" from private driver structure

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: palmas: Change the DT node property names to follow the convention
J Keerthy [Mon, 18 Feb 2013 05:12:44 +0000 (10:42 +0530)]
mfd: palmas: Change the DT node property names to follow the convention

DT node properties should not have "_". Replacing them by "-".

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: as3711: Add OF support
Guennadi Liakhovetski [Fri, 22 Mar 2013 16:15:47 +0000 (17:15 +0100)]
mfd: as3711: Add OF support

Add Flat Device Tree support to the AS3711 MFD driver. This patch just
allows to bind the driver to I2C devices, instantiated from the DT.
DT support for AS3711 cell drivers will be added in separate drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: cros_ec: Add MFD_CORE dependency
David Rientjes [Thu, 21 Mar 2013 19:08:33 +0000 (12:08 -0700)]
mfd: cros_ec: Add MFD_CORE dependency

CONFIG_MFD_CROS_EC requires CONFIG_MFD_CORE for a couple of functions that
are declared but not defined:

ERROR: "mfd_remove_devices" [drivers/mfd/cros_ec.ko] undefined!
ERROR: "mfd_add_devices" [drivers/mfd/cros_ec.ko] undefined!

Fix it by selecting CONFIG_MFD_CORE anytime CONFIG_MFD_CROS_EC is enabled.

Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: cros_ec_spi: Warnings fix
Samuel Ortiz [Wed, 20 Mar 2013 08:49:00 +0000 (09:49 +0100)]
mfd: cros_ec_spi: Warnings fix

To silent those:

 CC [M]  drivers/mfd/cros_ec_spi.o
drivers/mfd/cros_ec_spi.c: In function ‘cros_ec_spi_receive_response’:
drivers/mfd/cros_ec_spi.c:123:5: warning: format ‘%d’ expects argument of type
‘int’, but argument 4 has type ‘long int’ [-Wformat]
drivers/mfd/cros_ec_spi.c:157:3: warning: format ‘%d’ expects argument of type
‘int’, but argument 6 has type ‘long int’ [-Wformat]
drivers/mfd/cros_ec_spi.c:181:2: warning: format ‘%d’ expects argument of type
‘int’, but argument 4 has type ‘long int’ [-Wformat]

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: cros_ec: Export needed symbols for the i2c and spi modules
Samuel Ortiz [Wed, 20 Mar 2013 08:46:15 +0000 (09:46 +0100)]
mfd: cros_ec: Export needed symbols for the i2c and spi modules

In order to fix those, when all cros code is modular:

ERROR: "cros_ec_prepare_tx" [drivers/mfd/cros_ec_spi.ko] undefined!
ERROR: "cros_ec_register" [drivers/mfd/cros_ec_spi.ko] undefined!
ERROR: "cros_ec_remove" [drivers/mfd/cros_ec_spi.ko] undefined!
ERROR: "cros_ec_suspend" [drivers/mfd/cros_ec_spi.ko] undefined!
ERROR: "cros_ec_resume" [drivers/mfd/cros_ec_spi.ko] undefined!
ERROR: "cros_ec_register" [drivers/mfd/cros_ec_i2c.ko] undefined!
ERROR: "cros_ec_remove" [drivers/mfd/cros_ec_i2c.ko] undefined!
ERROR: "cros_ec_suspend" [drivers/mfd/cros_ec_i2c.ko] undefined!
ERROR: "cros_ec_resume" [drivers/mfd/cros_ec_i2c.ko] undefined!

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoinput: Add ChromeOS EC keyboard driver
Simon Glass [Mon, 25 Feb 2013 22:08:41 +0000 (14:08 -0800)]
input: Add ChromeOS EC keyboard driver

Use the key-matrix layer to interpret key scan information from the EC
and inject input based on the FDT-supplied key map. This driver registers
itself with the ChromeOS EC driver to perform communications.

The matrix-keypad FDT binding is used with a small addition to control
ghosting.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoinput: matrix-keymap: Add function to read the new DT binding
Simon Glass [Mon, 25 Feb 2013 22:08:40 +0000 (14:08 -0800)]
input: matrix-keymap: Add function to read the new DT binding

We now have a binding which adds two parameters to the matrix keypad DT
node. This is separate from the GPIO-driven matrix keypad binding, and
unfortunately incompatible, since that uses row-gpios/col-gpios for the
row and column counts.

So the easiest option here is to provide a function for non-GPIO drivers
to use to decode the binding.

Note: We could in fact create an entirely separate structure to hold
these two fields, but it does not seem worth it, yet. If we have more
parameters then we can add this, and then refactor each driver to hold
such a structure.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com> (v2)
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Add ChromeOS EC SPI driver
Simon Glass [Mon, 25 Feb 2013 22:08:39 +0000 (14:08 -0800)]
mfd: Add ChromeOS EC SPI driver

This uses a SPI bus to talk to the ChromeOS EC. The protocol
is defined by the EC and is fairly simple, with a length byte,
checksum, command byte and version byte (to permit easy creation
of new commands).

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Add ChromeOS EC I2C driver
Simon Glass [Mon, 25 Feb 2013 22:08:38 +0000 (14:08 -0800)]
mfd: Add ChromeOS EC I2C driver

This uses an I2C bus to talk to the ChromeOS EC. The protocol
is defined by the EC and is fairly simple, with a length byte,
checksum, command byte and version byte (to permit easy creation
of new commands).

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Add ChromeOS EC implementation
Simon Glass [Mon, 25 Feb 2013 22:08:37 +0000 (14:08 -0800)]
mfd: Add ChromeOS EC implementation

This is the base EC implementation, which provides a high level
interface to the EC for use by the rest of the kernel. The actual
communcations is dealt with by a separate protocol driver which
registers itself with this interface.

Interrupts are passed on through a notifier.

A simple message structure is used to pass messages to the
protocol driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Add ChromeOS EC messages header
Simon Glass [Mon, 25 Feb 2013 22:08:36 +0000 (14:08 -0800)]
mfd: Add ChromeOS EC messages header

This file is included verbatim from the ChromeOS EC respository.
Ideally we would prefer to avoid changing it, to make it easier
to track this rapidly-changing file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoLinux 3.9-rc5
Linus Torvalds [Sun, 31 Mar 2013 22:12:43 +0000 (15:12 -0700)]
Linux 3.9-rc5

11 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Sun, 31 Mar 2013 18:41:47 +0000 (11:41 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
 "Two fixes for slave-dmaengine.

  The first one is for making slave_id value correct for dw_dmac and
  the other one fixes the endieness in DT parsing"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dw_dmac: adjust slave_id accordingly to request line base
  dmaengine: dw_dma: fix endianess for DT xlate function

11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sun, 31 Mar 2013 18:40:33 +0000 (11:40 -0700)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "For a some fixes for Kernel 3.9:
   - subsystem build fix when VIDEO_DEV=y, VIDEO_V4L2=m and I2C=m
   - compilation fix for arm multiarch preventing IR_RX51 to be selected
   - regression fix at bttv crop logic
   - s5p-mfc/m5mols/exynos: a few fixes for cameras on exynos hardware"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] [REGRESSION] bt8xx: Fix too large height in cropcap
  [media] fix compilation with both V4L2 and I2C as 'm'
  [media] m5mols: Fix bug in stream on handler
  [media] s5p-fimc: Do not attempt to disable not enabled media pipeline
  [media] s5p-mfc: Fix encoder control 15 issue
  [media] s5p-mfc: Fix frame skip bug
  [media] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish
  [media] exynos-gsc: send valid m2m ctx to gsc_m2m_job_finish
  [media] fimc-lite: Fix the variable type to avoid possible crash
  [media] fimc-lite: Initialize 'step' field in fimc_lite_ctrl structure
  [media] ir: IR_RX51 only works on OMAP2

11 years agoMerge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 31 Mar 2013 18:38:59 +0000 (11:38 -0700)]
Merge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Alright, this time from 10K up in the air.

  Collection of fixes that have been queued up since the merge window
  opened, hence postponed until later in the cycle.  The pull request
  contains:

   - A bunch of fixes for the xen blk front/back driver.

   - A round of fixes for the new IBM RamSan driver, fixing various
     nasty issues.

   - Fixes for multiple drives from Wei Yongjun, bad handling of return
     values and wrong pointer math.

   - A fix for loop properly killing partitions when being detached."

* tag 'for-linus-20130331' of git://git.kernel.dk/linux-block: (25 commits)
  mg_disk: fix error return code in mg_probe()
  rsxx: remove unused variable
  rsxx: enable error return of rsxx_eeh_save_issued_dmas()
  block: removes dynamic allocation on stack
  Block: blk-flush: Fixed indent code style
  cciss: fix invalid use of sizeof in cciss_find_cfgtables()
  loop: cleanup partitions when detaching loop device
  loop: fix error return code in loop_add()
  mtip32xx: fix error return code in mtip_pci_probe()
  xen-blkfront: remove frame list from blk_shadow
  xen-blkfront: pre-allocate pages for requests
  xen-blkback: don't store dev_bus_addr
  xen-blkfront: switch from llist to list
  xen-blkback: fix foreach_grant_safe to handle empty lists
  xen-blkfront: replace kmalloc and then memcpy with kmemdup
  xen-blkback: fix dispatch_rw_block_io() error path
  rsxx: fix missing unlock on error return in rsxx_eeh_remap_dmas()
  Adding in EEH support to the IBM FlashSystem 70/80 device driver
  block: IBM RamSan 70/80 error message bug fix.
  block: IBM RamSan 70/80 branding changes.
  ...