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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Samuel Ortiz [Mon, 8 Apr 2013 14:36:52 +0000 (16:36 +0200)]
Merge tag 'ux500-multiplatform-mfd' of git://git./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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Linus Torvalds [Sun, 31 Mar 2013 22:12:43 +0000 (15:12 -0700)]
Linux 3.9-rc5
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
Linus Torvalds [Sun, 31 Mar 2013 18:40:33 +0000 (11:40 -0700)]
Merge branch 'v4l_for_linus' of git://git./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
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.
...
Paul Walmsley [Sun, 31 Mar 2013 00:04:40 +0000 (00:04 +0000)]
Revert "lockdep: check that no locks held at freeze time"
This reverts commit
6aa9707099c4b25700940eb3d016f16c4434360d.
Commit
6aa9707099c4 ("lockdep: check that no locks held at freeze time")
causes problems with NFS root filesystems. The failures were noticed on
OMAP2 and 3 boards during kernel init:
[ BUG: swapper/0/1 still has locks held! ]
3.9.0-rc3-00344-ga937536 #1 Not tainted
-------------------------------------
1 lock held by swapper/0/1:
#0: (&type->s_umount_key#13/1){+.+.+.}, at: [<
c011e84c>] sget+0x248/0x574
stack backtrace:
rpc_wait_bit_killable
__wait_on_bit
out_of_line_wait_on_bit
__rpc_execute
rpc_run_task
rpc_call_sync
nfs_proc_get_root
nfs_get_root
nfs_fs_mount_common
nfs_try_mount
nfs_fs_mount
mount_fs
vfs_kern_mount
do_mount
sys_mount
do_mount_root
mount_root
prepare_namespace
kernel_init_freeable
kernel_init
Although the rootfs mounts, the system is unstable. Here's a transcript
from a PM test:
http://www.pwsan.com/omap/testlogs/test_v3.9-rc3/
20130317194234/pm/37xxevm/37xxevm_log.txt
Here's what the test log should look like:
http://www.pwsan.com/omap/testlogs/test_v3.8/
20130218214403/pm/37xxevm/37xxevm_log.txt
Mailing list discussion is here:
http://lkml.org/lkml/2013/3/4/221
Deal with this for v3.9 by reverting the problem commit, until folks can
figure out the right long-term course of action.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Mandeep Singh Baines <msb@chromium.org>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: <maciej.rutecki@gmail.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ben Chan <benchan@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 30 Mar 2013 20:13:05 +0000 (13:13 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
"This includes the bug-fix for a >= v3.8-rc1 regression specific to
iscsi-target persistent reservation conflict handling (CC'ed to
stable), and a tcm_vhost patch to drop VIRTIO_RING_F_EVENT_IDX usage
so that in-flight qemu vhost-scsi-pci device code can detect the
proper vhost feature bits.
Also, there are two more tcm_vhost patches still being discussed by
MST and Asias for v3.9 that will be required for the in-flight qemu
vhost-scsi-pci device patch to function properly, and that should
(hopefully) be the last target fixes for this round."
* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case
tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit
Andy Shevchenko [Wed, 20 Feb 2013 11:52:17 +0000 (13:52 +0200)]
dw_dmac: adjust slave_id accordingly to request line base
On some hardware configurations we have got the request line with the offset.
The patch introduces convert_slave_id() helper for that cases. The request line
base is came from the driver data provided by the platform_device_id table.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>