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>
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>
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>
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.
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: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>
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 {
::::::::::::::::::
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: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>
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>
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.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>
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, 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 [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>
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 [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.
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>
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>
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>
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>
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>
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 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.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
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.
...
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
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>
Arnd Bergmann [Sun, 3 Mar 2013 20:51:28 +0000 (20:51 +0000)]
dmaengine: dw_dma: fix endianess for DT xlate function
As reported by Wu Fengguang's build robot tracking sparse warnings, the
dma_spec arguments in the dw_dma_xlate are already byte swapped on
little-endian platforms and must not get swapped again. This code is
currently not used anywhere, but will be used in Linux 3.10 when the
ARM SPEAr platform starts using the generic DMA DT binding.
The Adam Belay's e-mail address in MAINTAINERS under PNP SUPPORT
is not valid any more and I started to maintain that code in the
meantime as a matter of fact, so list myself as a maintainer of it
along with Bjorn and remove the Adam's entry from it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alex Elder [Wed, 27 Mar 2013 14:16:30 +0000 (09:16 -0500)]
rbd: don't zero-fill non-image object requests
A result of ENOENT from a read request for an object that's part of
an rbd image indicates that there is a hole in that portion of the
image. Similarly, a short read for such an object indicates that
the remainder of the read should be interpreted a full read with
zeros filling out the end of the request.
This behavior is not correct for objects that are not backing rbd
image data. Currently rbd_img_obj_request_callback() assumes it
should be done for all objects.
Change rbd_img_obj_request_callback() so it only does this zeroing
for image objects. Encapsulate that special handling in its own
function. Add an assertion that the image object request is a bio
request, since we assume that (and we currently don't support any
other types).
This resolves a problem identified here:
http://tracker.ceph.com/issues/4559
Linus Torvalds [Fri, 29 Mar 2013 18:13:25 +0000 (11:13 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
"We've had a busy two weeks of bug fixing. The biggest patches in here
are some long standing early-enospc problems (Josef) and a very old
race where compression and mmap combine forces to lose writes (me).
I'm fairly sure the mmap bug goes all the way back to the introduction
of the compression code, which is proof that fsx doesn't trigger every
possible mmap corner after all.
I'm sure you'll notice one of these is from this morning, it's a small
and isolated use-after-free fix in our scrub error reporting. I
double checked it here."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: don't drop path when printing out tree errors in scrub
Btrfs: fix wrong return value of btrfs_lookup_csum()
Btrfs: fix wrong reservation of csums
Btrfs: fix double free in the btrfs_qgroup_account_ref()
Btrfs: limit the global reserve to 512mb
Btrfs: hold the ordered operations mutex when waiting on ordered extents
Btrfs: fix space accounting for unlink and rename
Btrfs: fix space leak when we fail to reserve metadata space
Btrfs: fix EIO from btrfs send in is_extent_unchanged for punched holes
Btrfs: fix race between mmap writes and compression
Btrfs: fix memory leak in btrfs_create_tree()
Btrfs: fix locking on ROOT_REPLACE operations in tree mod log
Btrfs: fix missing qgroup reservation before fallocating
Btrfs: handle a bogus chunk tree nicely
Btrfs: update to use fs_state bit
Len Brown [Fri, 29 Mar 2013 18:02:30 +0000 (11:02 -0700)]
ia64 idle: delete stale (*idle)() function pointer
Commit 3e7fc708eb41 ("ia64 idle: delete pm_idle") in 3.9-rc1 didn't
finish the job, leaving an un-initialized reference to (*idle)().
[ Haven't seen a crash from this - but seems like we are just being
lucky that "idle" is zero so it does get initialized before we jump to
randomland - Len ]
Reported-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 29 Mar 2013 18:00:43 +0000 (11:00 -0700)]
Merge branch 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull arc architecture fixes from Vineet Gupta:
"This includes fix for a serious bug in DMA mapping API, make
allyesconfig wreckage, removal of bogus email-list placeholder in
MAINTAINERS, a typo in ptrace helper code and last remaining changes
for syscall ABI v3 which we are finally starting to transition-to
internally.
The request is late than I intended to - but I was held up with
debugging a timer link list corruption, for which a proposed fix to
generic timer code was sent out to lkml/tglx earlier today."
* 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARC: Fix the typo in event identifier flags used by ptrace
arc: fix dma_address assignment during dma_map_sg()
ARC: Remove SET_PERSONALITY (tracks cross-arch change)
ARC: ABIv3: fork/vfork wrappers not needed in "no-legacy-syscall" ABI
ARC: ABIv3: Print the correct ABI ver
ARC: make allyesconfig build breakages
ARC: MAINTAINERS update for ARC
Josef Bacik [Fri, 29 Mar 2013 14:09:34 +0000 (08:09 -0600)]
Btrfs: don't drop path when printing out tree errors in scrub
A user reported a panic where we were panicing somewhere in
tree_backref_for_extent from scrub_print_warning. He only captured the trace
but looking at scrub_print_warning we drop the path right before we mess with
the extent buffer to print out a bunch of stuff, which isn't right. So fix this
by dropping the path after we use the eb if we need to. Thanks,
Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>