]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
12 years agoinput: Add onkey support for 88PM80X PMIC
Qiao Zhou [Tue, 17 Jul 2012 07:17:39 +0000 (15:17 +0800)]
input: Add onkey support for 88PM80X PMIC

Add onkey support for MARVELL 88PM80X PMIC.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add support for twl6041
Peter Ujfalusi [Mon, 16 Jul 2012 09:49:44 +0000 (11:49 +0200)]
mfd: Add support for twl6041

The delta between twl6040 and twl6041 is small, the main difference is in
the number of GPOs (3 on twl6040, 1 on twl6041).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Fix twl6040 revision information
Peter Ujfalusi [Mon, 16 Jul 2012 09:49:43 +0000 (11:49 +0200)]
mfd: Fix twl6040 revision information

twl6040 ES1.1 and ES1.2 have the same revid (0x01).
ES1.3 of twl6040 REVID is 0x02.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Matches should be NULL when populate anatop child devices
Richard Zhao [Mon, 16 Jul 2012 08:55:57 +0000 (16:55 +0800)]
mfd: Matches should be NULL when populate anatop child devices

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Reviewed-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoinput: ab8500-ponkey: Create AB8500 domain IRQ mapping
Lee Jones [Mon, 16 Jul 2012 07:35:37 +0000 (08:35 +0100)]
input: ab8500-ponkey: Create AB8500 domain IRQ mapping

Before we can use any domain allocated IRQ, we need to first create a
map between the Hardware IRQ (hwirq) and the Linux Virtual IRQ (virq).
We do this with a helper function provided by the AB8500 IRQ domain
controller called ab8500_irq_get_virq(). We need to do this for both
IRQs which the Power-On-Key driver uses; one for button press, the other
for button depress.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add missing out of memory check for pcf50633
Alan Cox [Fri, 13 Jul 2012 15:43:32 +0000 (16:43 +0100)]
mfd: Add missing out of memory check for pcf50633

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44561
Reported-by: <rucsoftsec@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoDocumentation: Describe the AB8500 Device Tree bindings
Lee Jones [Fri, 13 Jul 2012 10:42:26 +0000 (12:42 +0200)]
Documentation: Describe the AB8500 Device Tree bindings

Although for the most part, the AB8500 uses common bindings, some
of the ways in which they are used differ slightly to the common
uses of those bindings. To clear up some of these varying concepts
we provide some documentation describing each of the properties and
how they are used.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add tps65910 32-kHz-crystal-input init
Johan Hovold [Wed, 11 Jul 2012 13:44:33 +0000 (15:44 +0200)]
mfd: Add tps65910 32-kHz-crystal-input init

Replace tps65910_misc_init with a dedicated init function for the
32-kHz-crystal input, and make the code more readable.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Drop modifying mc13xxx driver's id_table in probe
Uwe Kleine-König [Mon, 16 Jul 2012 13:40:17 +0000 (15:40 +0200)]
mfd: Drop modifying mc13xxx driver's id_table in probe

This was introduced in commit

        876989d (mfd: Add device tree probe support for mc13xxx)

for spi and later while introducing support for i2c copied to the i2c
driver.

Modifying driver details is very strange, for example probing an
mc13892 device (instantiated via dt) removes the driver's ability to
handle (traditionally probed) mc13783 devices in this case.
I'm not aware of any problems that make this hack necessary and if
there were some, they'd have to be fixed in the spi/i2c core, not in
a driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove unneeded io_mutex from struct twl6040
Axel Lin [Wed, 11 Jul 2012 02:06:34 +0000 (10:06 +0800)]
mfd: Remove unneeded io_mutex from struct twl6040

Current code has been converted to use regmap APIs, the io_mutex is not needed.
Thus remove the io_mutex.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove __devexit annotation for pm80x_deinit
Axel Lin [Wed, 11 Jul 2012 02:01:10 +0000 (10:01 +0800)]
mfd: Remove __devexit annotation for pm80x_deinit

This fixes below section mismatch warning:

  LD      drivers/mfd/built-in.o
WARNING: drivers/mfd/built-in.o(.devinit.text+0x46c): Section mismatch in reference from the function pm800_probe() to the function .devexit.text:pm80x_deinit()
The function __devinit pm800_probe() references
a function __devexit pm80x_deinit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
pm80x_deinit() so it may be used outside an exit section.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Fix checking return value of 88pm8xx regmap_read()
Axel Lin [Wed, 11 Jul 2012 01:27:54 +0000 (09:27 +0800)]
mfd: Fix checking return value of 88pm8xx regmap_read()

Check the return value of regmap_read() rather than the read value.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Initial support for the WM5110
Mark Brown [Tue, 10 Jul 2012 11:37:58 +0000 (12:37 +0100)]
mfd: Initial support for the WM5110

The WM5110 is a highly-integrated low-power audio system for smartphones,
tablets and other portable audio devices. It combines an advanced DSP
feature set with a flexible, high-performance audio hub CODEC.

The support is based on the Arizona core driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add data tables for the WM5110
Mark Brown [Tue, 10 Jul 2012 11:37:57 +0000 (12:37 +0100)]
mfd: Add data tables for the WM5110

The WM5110 is a highly integrated low power audio subsystem for
smartphones, tablets and other portable audio devices. It combines
an advanced DSP feature set with a flexible, high performance audio
hub CODEC.

This patch adds data tables for the WM5110.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoMAINTAINERS: Add maintainer for samsung mfd driver
Sangbeom Kim [Wed, 11 Jul 2012 12:08:22 +0000 (21:08 +0900)]
MAINTAINERS: Add maintainer for samsung mfd driver

There are many samsung multifunction devices which are
s2mps11, s5m8767, s5m8763 etc.
This devices can support regulator, rtc, charger.
I will be supporting the Samsung mfd drivers, that are currently
in development and will be upstreamed shortly.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add s2mps11 irq driver
Sangbeom Kim [Wed, 11 Jul 2012 12:08:11 +0000 (21:08 +0900)]
mfd: Add s2mps11 irq driver

This patch support irq handling driver for s2mps11.
As this patch use regmap_irq, s5m8767 and s5m8763 are modified with
regmap_irq.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add samsung s2mps11 mfd support
Sangbeom Kim [Wed, 11 Jul 2012 12:07:55 +0000 (21:07 +0900)]
mfd: Add samsung s2mps11 mfd support

This patch add Samsung S2MPS11 mfd driver.
The S2MPS11 can support regulators and RTC.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Modify samsung mfd header
Sangbeom Kim [Wed, 11 Jul 2012 12:07:16 +0000 (21:07 +0900)]
mfd: Modify samsung mfd header

As Prefix of Samsung pmic changed from s5m to s2m,
To make common mfd driver for s2m and s5m series,
This patch rename header of Samsung mfd and modify mfd driver.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Modify samsung mfd driver for common api
Sangbeom Kim [Wed, 11 Jul 2012 12:06:55 +0000 (21:06 +0900)]
mfd: Modify samsung mfd driver for common api

Previous naming rule of samsung pmic start with s5m prefix.
But It is changed by s2m.
To cover various samsung s2m and s5m series,
This patch modify function and variable name for common usage.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Rename s5m file and directories to samsung
Sangbeom Kim [Wed, 11 Jul 2012 12:06:40 +0000 (21:06 +0900)]
mfd: Rename s5m file and directories to samsung

Previously, Samsung PMIC naming rule start with prefix of s5m.
But Naming rule is changed.
From now on, Prefix will be changed to s2m.
So, To support pmic series of s5m and s2m, change mfd file and directory name.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add even more arizona register definitions
Mark Brown [Mon, 9 Jul 2012 18:33:15 +0000 (19:33 +0100)]
mfd: Add even more arizona register definitions

A few more registers used on newer devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add support for multiple arizona PDM speaker outputs
Mark Brown [Mon, 9 Jul 2012 18:33:14 +0000 (19:33 +0100)]
mfd: Add support for multiple arizona PDM speaker outputs

The registers have stride 2 so we can write the loop properly now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Export pm80x_regmap_config
Axel Lin [Mon, 9 Jul 2012 14:44:21 +0000 (22:44 +0800)]
mfd: Export pm80x_regmap_config

This fixes below build error when CONFIG_MFD_88PM800=m.

ERROR: "pm80x_regmap_config" [drivers/mfd/88pm800.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Guard max77686_pmic_dt_match with CONFIG_OF
Axel Lin [Mon, 9 Jul 2012 14:29:00 +0000 (22:29 +0800)]
mfd: Guard max77686_pmic_dt_match with CONFIG_OF

This fixes below build warning if CONFIG_OF is not set.

  CC      drivers/mfd/max77686.o
drivers/mfd/max77686.c:37:42: warning: 'max77686_pmic_dt_match' defined but not used [-Wunused-variable]

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agortc: Add rtc support to 88PM80X PMIC
Qiao Zhou [Mon, 9 Jul 2012 06:37:34 +0000 (14:37 +0800)]
rtc: Add rtc support to 88PM80X PMIC

add rtc driver for MARVELL 88PM80X PMIC and enable rtc function.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Error out if initial arizona boot fails
Mark Brown [Mon, 9 Jul 2012 10:56:43 +0000 (11:56 +0100)]
mfd: Error out if initial arizona boot fails

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: 88pm80[05] i2c device_id arrays should be NULL terminated
Samuel Ortiz [Mon, 9 Jul 2012 13:11:46 +0000 (15:11 +0200)]
mfd: 88pm80[05] i2c device_id arrays should be NULL terminated

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove the clocks from the list of max77686 regulators
Yadwinder Singh Brar [Thu, 5 Jul 2012 03:58:24 +0000 (09:28 +0530)]
mfd: Remove the clocks from the list of max77686 regulators

Remove the clocks from the list of regulators to correct the value of
MAX77686_REG_MAX which is used in the regulator driver to represent the no.
of regulators present in max77686.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add device tree support for max77686
Yadwinder Singh Brar [Fri, 6 Jul 2012 11:32:55 +0000 (17:02 +0530)]
mfd: Add device tree support for max77686

This patch adds device tree support for mfd driver and adds
Documentation/devicetree/bindings/mfd/max77686.txt.
This patch also intialize max77686 pointer to NULL in max77686_i2c_probe
to silent a compile time warning.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Allow to specify max77686 interrupt through DT or platform file also
Yadwinder Singh Brar [Mon, 9 Jul 2012 11:21:45 +0000 (13:21 +0200)]
mfd: Allow to specify max77686 interrupt through DT or platform file also

Presently driver expects irq_gpio pin in platform data and maps it to irq
itself. But we can also directly specify the interrupt in DT or platform file.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Apply irq_mask_cur before handling max77686 interrupts
Yadwinder Singh Brar [Thu, 5 Jul 2012 03:58:21 +0000 (09:28 +0530)]
mfd: Apply irq_mask_cur before handling max77686 interrupts

According to TRM, though we mask the interrupts in interrupt-mask register,
interrupt source-register still provide the status of the masked interrupts.
So we should apply irq_mask_cur to read interrupt source-register value before
handling.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Use pmic regmap to read max77686 pmic interrupt register
Yadwinder Singh Brar [Thu, 5 Jul 2012 03:58:20 +0000 (09:28 +0530)]
mfd: Use pmic regmap to read max77686 pmic interrupt register

PMIC's regmap should be used to read pmic interrupt registers.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Move twl-core device_init_wakeup to after platform_device_add
NeilBrown [Fri, 6 Jul 2012 22:51:03 +0000 (08:51 +1000)]
mfd: Move twl-core device_init_wakeup to after platform_device_add

device_init_wakeup uses the dev_name() of the device to set the
name of the wakeup_source which appears in
/sys/kernel/debug/wakeup_sources.

For a platform device, that name is not set until platform_device_add
calls dev_set_name.

So the call to device_init_wakeup() must be after the call to
platform_device_add().
Making this change causes correct names to appear in the
wakeup_sources file.

Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add companion chip in 88pm80x
Qiao Zhou [Mon, 9 Jul 2012 06:37:33 +0000 (14:37 +0800)]
mfd: Add companion chip in 88pm80x

in hw design, 800 is mainly for pmic control, while 805 for audio.
but there are 3 registers which controls class D speaker property,
and they are defined in 800 i2c client domain. so 805 codec driver
needs to use 800 i2c client to access class D speaker reg for
audio path management. so add this workaround for the purpose to
let 805 access 800 i2c in some scenario.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Support 88pm80x in 80x driver
Qiao Zhou [Mon, 9 Jul 2012 06:37:32 +0000 (14:37 +0800)]
mfd: Support 88pm80x in 80x driver

88PM800 and 88PM805 are two discrete chips used for power management.
Hardware designer can use them together or only one of them according
to requirement.

88pm80x.c provides common i2c driver handling for both 800 and
805, such as i2c_driver init, regmap init, read/write api etc.

88pm800.c handles specifically for 800, such as chip init, irq
init/handle, mfd device register, including rtc, onkey, regulator(
to be add later) etc. besides that, 800 has three i2c device, one
regular i2c client, two other i2c dummy for gpadc and power purpose.

88pm805.c handles specifically for 805, such as chip init, irq
init/handle, mfd device register, including codec, headset/mic detect
etc.

the i2c operation of both 800 and 805 are via regmap, and 88pm80x-i2c
exported a group of r/w bulk r/w and bits set API for facility.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Fix Arizona Kconfig entry
Samuel Ortiz [Mon, 9 Jul 2012 10:36:11 +0000 (12:36 +0200)]
mfd: Fix Arizona Kconfig entry

The core and irq Arizona parts should be boolean as they depend on non
exported symbols.

This fixes the following build errors:

ERROR: "wm5102_aod" [drivers/mfd/arizona-irq.ko] undefined!
ERROR: "wm5102_irq" [drivers/mfd/arizona-irq.ko] undefined!
ERROR: "irq_set_chip_and_handler_name" [drivers/mfd/arizona-irq.ko]  undefined!
ERROR: "wm5102_patch" [drivers/mfd/arizona-core.ko] undefined!
ERROR: "arizona_irq_init" [drivers/mfd/arizona-core.ko] undefined!
ERROR: "arizona_irq_exit" [drivers/mfd/arizona-core.ko] undefined!

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Mark headphone detect readback wm5102 register volatile
Mark Brown [Thu, 5 Jul 2012 19:35:33 +0000 (20:35 +0100)]
mfd: Mark headphone detect readback wm5102 register volatile

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Don't free unallocated arizona supplies on error
Mark Brown [Sun, 8 Jul 2012 22:45:53 +0000 (00:45 +0200)]
mfd: Don't free unallocated arizona supplies on error

ARRAY_SIZE() may be larger than the number of supplies actually used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add missing WM5102 ifdefs
Mark Brown [Thu, 5 Jul 2012 19:35:31 +0000 (20:35 +0100)]
mfd: Add missing WM5102 ifdefs

References to the WM5102 tables need to be guarded.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Treat arizona register read errors as non-fatal during resume
Mark Brown [Thu, 5 Jul 2012 19:35:30 +0000 (20:35 +0100)]
mfd: Treat arizona register read errors as non-fatal during resume

We're testing for a specific value and while SPI does not detect I/O
errors I2C can.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Release arizona DCVDD if we fail to resume the device
Mark Brown [Thu, 5 Jul 2012 19:35:29 +0000 (20:35 +0100)]
mfd: Release arizona DCVDD if we fail to resume the device

Ensures we don't leak the enable we just did.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add more arizona register definitions
Mark Brown [Thu, 5 Jul 2012 19:35:28 +0000 (20:35 +0100)]
mfd: Add more arizona register definitions

These registers will be used in future devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Also restore wm8994 GPIO IRQ masks after reset
Mark Brown [Fri, 29 Jun 2012 13:55:40 +0000 (14:55 +0100)]
mfd: Also restore wm8994 GPIO IRQ masks after reset

This ensures that if we are using a GPIO as a wake source it continues to
function while we're suspended.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Use regcache_sync_region() to sync wm8994 GPIO registers on suspend
Mark Brown [Fri, 29 Jun 2012 13:55:39 +0000 (14:55 +0100)]
mfd: Use regcache_sync_region() to sync wm8994 GPIO registers on suspend

Now we have regcache sync region we can use it to do a more efficient
sync of the pin configuration after we reset the device during suspend.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Move arizona digital core supply management to the regulator API
Mark Brown [Sun, 8 Jul 2012 22:31:36 +0000 (00:31 +0200)]
mfd: Move arizona digital core supply management to the regulator API

Rather than open coding the enable GPIO control in the MFD core use the
API to push the management on to the regulator driver. The immediate
advantage is slight for most systems but this will in future allow device
configurations where an external regulator is used for DCVDD.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Force on REGMAP for the arizona core
Mark Brown [Tue, 3 Jul 2012 11:45:39 +0000 (12:45 +0100)]
mfd: Force on REGMAP for the arizona core

While the core isn't useful by itself it does depend on regmap so try to
force that on.

Reported-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoMerge tag 'mfd/wm5102' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc...
Samuel Ortiz [Sun, 8 Jul 2012 22:17:44 +0000 (00:17 +0200)]
Merge tag 'mfd/wm5102' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into for-next

mfd: Initial support for Wolfson Arizona platform and WM5102 devices

The Wolfson Arizona platform is used to provide common register
interface to a series of low power audio hub CODECs, starting with the
WM5102. Since the features of these devices work over a range of
subsystems an MFD core driver is provided to instantiate the subdevices
and arbitrate access between them.

As the new regmap wake IRQ functionality is used as part of the driver
it is incorporated as a dependency.

12 years agoARM: ux500: Register the AB8500 from DB8500 MFD
Lee Jones [Fri, 6 Jul 2012 10:46:23 +0000 (12:46 +0200)]
ARM: ux500: Register the AB8500 from DB8500 MFD

As the AB8500 is a subordinate MFD device to the DB8500-PRCMU,
for consistency and a better 1:1 depiction of how the hardware
is laid out, it is a good idea to register it in the same way
as we do for the other MFD child devices. In order for us to do
this successfully we have to pass AB8500's platform data when
registering the DB8500-PRCMU from platform code.

Also solves this issue:
WARNING: at fs/sysfs/dir.c:526 sysfs_add_one+0x88/0xb0()
sysfs: cannot create duplicate filename '/bus/platform/devices/ab8500-core.0'

Reported-by: Linus Walleij <linus.walleij@linaro.org>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove unused max77686 iolock mutex
Axel Lin [Fri, 6 Jul 2012 07:32:20 +0000 (15:32 +0800)]
mfd: Remove unused max77686 iolock mutex

Now this driver is using regmap API, the iolock mutex is not used and
can be removed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add pre-regulator device for 88pm860x
Jett.Zhou [Fri, 6 Jul 2012 02:59:58 +0000 (10:59 +0800)]
mfd: Add pre-regulator device for 88pm860x

Pre-regulator of 88pm8606 is mainly for support charging based on vbus,
it needs to be enabled for charging battery, and will be disabled in
some exception condition like over-temp.
Add the pre-regulator device init data and resource for mfd subdev.

Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add device-tree entry to enable tps65910 external 32-kHz oscillator
Johan Hovold [Thu, 28 Jun 2012 10:20:22 +0000 (12:20 +0200)]
mfd: Add device-tree entry to enable tps65910 external 32-kHz oscillator

Add device-tree entry to enable external 32-kHz crystal oscillator
input.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add support for enabling tps65910 external 32-kHz oscillator
Johan Hovold [Thu, 28 Jun 2012 10:20:21 +0000 (12:20 +0200)]
mfd: Add support for enabling tps65910 external 32-kHz oscillator

Add flag to platform data to enable external 32-kHz crystal oscillator
(or square wave) input.

The tps6591x can use either an internal 32-kHz RC oscillator or an
external crystal (or square wave) to generate the 32-kHz clock.

The default setting depends on the selected boot mode. In boot mode 00
the internal RC oscillator is used at power-on, but the external crystal
oscillator (or square wave) can be enabled by clearing the ck32k_ctrl
flag in the device control register.

Note that there is no way to switch from the external crystal oscillator
to the internal RC oscillator.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add missing hunk to change palmas irq to clear on read
Graeme Gregory [Fri, 22 Jun 2012 12:36:19 +0000 (13:36 +0100)]
mfd: Add missing hunk to change palmas irq to clear on read

During conversion to regmap_irq this hunk was missing being moved
to MFD driver to put the chip into clear on read mode. Also as slave
is now set use it to determine which slave for the register call.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Fix palmas regulator pdata missing
Graeme Gregory [Fri, 22 Jun 2012 12:36:18 +0000 (13:36 +0100)]
mfd: Fix palmas regulator pdata missing

Due to a merge error the section of code passing the pdata for the
regulator driver to the mfd_add_devices via the children structure
was missing. This corrects this problem.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoextcon: Add support irq domain for MAX8997 muic
Chanwoo Choi [Mon, 2 Jul 2012 00:03:00 +0000 (09:03 +0900)]
extcon: Add support irq domain for MAX8997 muic

This patch add support irq domain for Maxim MAX8997 muic
instead of irq_base in platform data and max8997 driver
private data are instead. It is tested on TRATS board.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add irq domain support for max8997 interrupts
Thomas Abraham [Mon, 2 Jul 2012 00:02:55 +0000 (09:02 +0900)]
mfd: Add irq domain support for max8997 interrupts

Add irq domain support for max8997 interrupts. The reverse mapping method
used is linear mapping since the sub-drivers of max8997 such as regulator
and charger drivers can use the max8997 irq_domain to get the linux irq
number for max8997 interrupts. All uses of irq_base in platform data and
max8997 driver private data are removed.

Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Register ab8500 devices using the newly DT:ed MFD API
Lee Jones [Mon, 2 Jul 2012 15:10:56 +0000 (17:10 +0200)]
mfd: Register ab8500 devices using the newly DT:ed MFD API

Now the MFD API is Device Tree aware we can use it for platform
registration again, even when booting with DT enabled. To aid in
Device Node pointer allocation we provide each cell with the
associative compatible string.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Attaching a node to new 'struct mfd_cell' of_compatible variable
Lee Jones [Mon, 2 Jul 2012 09:50:19 +0000 (10:50 +0100)]
mfd: Attaching a node to new 'struct mfd_cell' of_compatible variable

Applying a succinct description to the of_compatible variable recently
added to the mfd_cell struct. Also link to the documentation page where
more information can be found about compatible properties.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Guard tc3589x PM methods with CONFIG_PM_SLEEP
Axel Lin [Mon, 2 Jul 2012 09:19:52 +0000 (17:19 +0800)]
mfd: Guard tc3589x PM methods with CONFIG_PM_SLEEP

Guard PM methods with CONFIG_PM_SLEEP and get rid of some unneeded #ifdefs.
This fixes below build warnings:

  CC      drivers/mfd/tc3589x.o
drivers/mfd/tc3589x.c:361:12: warning: 'tc3589x_suspend' defined but not used [-Wunused-function]
drivers/mfd/tc3589x.c:375:12: warning: 'tc3589x_resume' defined but not used [-Wunused-function]

SIMPLE_DEV_PM_OPS already defines constant dev_pm_ops, thus also fix
'duplicate const' sparse warning.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Guard adp5520 PM methods with CONFIG_PM_SLEEP
Axel Lin [Mon, 2 Jul 2012 08:53:52 +0000 (16:53 +0800)]
mfd: Guard adp5520 PM methods with CONFIG_PM_SLEEP

This fixes below build warnings:
  CC      drivers/mfd/adp5520.o
drivers/mfd/adp5520.c:324:12: warning: 'adp5520_suspend' defined but not used [-Wunused-function]
drivers/mfd/adp5520.c:333:12: warning: 'adp5520_resume' defined but not used [-Wunused-function]

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Fix mc13xxx-spi merge conflict
Axel Lin [Mon, 2 Jul 2012 08:03:00 +0000 (16:03 +0800)]
mfd: Fix mc13xxx-spi merge conflict

This patch fixes conflict between commit 8ae3559
"mfd: mc13xxx workaround SPI hardware bug on i.Mx"
and commit 10c7a5d "mfd: Use devm_* APIs for mc13xxx".

commit 8ae3559 changes regmap_init_spi to regmap_init.
So now we need to use devm_regmap_init rather than devm_regmap_init_spi.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues.
Russ Dill [Thu, 14 Jun 2012 16:24:21 +0000 (09:24 -0700)]
mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix issues.

'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' (1fcb57d0) fixes
an issue where the ULPI PHYs were not held in reset while initializing
the EHCI controller. However, it also changes behavior in
omap-usb-host.c omap_usbhs_init by releasing reset while the
configuration in that function was done.

This change caused a regression on BB-xM where USB would not function
if 'usb start' had been run from u-boot before booting. A change was
made to release reset a little bit earlier which fixed the issue on
BB-xM and did not cause any regressions on 3430 sdp, the board for
which the fix was originally made.

This new fix, 'USB: EHCI: OMAP: Finish ehci omap phy reset cycle
before adding hcd.', (3aa2ae74) caused a regression on OMAP5.

The original fix to hold the EHCI controller in reset during
initialization was correct, however it appears that changing
omap_usbhs_init to not hold the PHYs in reset during it's
configuration was incorrect. This patch first reverts both fixes, and
then changes ehci_hcd_omap_probe in ehci-omap.c to hold the PHYs in
reset as the original patch had done. It also is sure to incorporate
the _cansleep change that has been made in the meantime.

I've tested this on Beagleboard xM, I'd really like to get an ack from
the 3430 sdp and OMAP5 guys before getting this merged.

v3 - Brown paper bag its too early in the morning actually run
     git commit amend fix
v2 - Put cansleep gpiolib call outside of spinlock

Acked-by: Mantesh Sarashetti <mantesh@ti.com>
Tested-by: Mantesh Sarashetti <mantesh@ti.com>
Acked-by: Keshava Munegowda <keshava_mgowda@ti.com>
Tested-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Use devm allocation for ab3100-core
Linus Walleij [Tue, 12 Jun 2012 18:26:58 +0000 (20:26 +0200)]
mfd: Use devm allocation for ab3100-core

Allocate memory and irq for device state using devm_*
helpers to simplify memory accounting.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Restore wm8994 pin configuration after reset during suspend
Chris Rattray [Mon, 11 Jun 2012 16:43:35 +0000 (00:43 +0800)]
mfd: Restore wm8994 pin configuration after reset during suspend

Ensure that we leave the device with the pins in the expected
configuration if we leave it in reset over suspend, avoiding any
interoperation problems with other devices in the system.

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Update twl6040 Kconfig to avoid build breakage
Peter Ujfalusi [Fri, 8 Jun 2012 08:54:21 +0000 (11:54 +0300)]
mfd: Update twl6040 Kconfig to avoid build breakage

twl6040 needs CONFIG_IRQ_DOMAIN to compile, without this we have:
drivers/mfd/twl6040-irq.c: In function 'twl6040_irq_init':
drivers/mfd/twl6040-irq.c:164:2: error: implicit declaration of function 'irq_domain_add_legacy'
drivers/mfd/twl6040-irq.c:165:11: error: 'irq_domain_simple_ops' undeclared (first use in this function)
drivers/mfd/twl6040-irq.c:165:11: note: each undeclared identifier is reported only once for each function it appears in

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Fix max77693 irq leak and wrong kfree call
Axel Lin [Fri, 8 Jun 2012 00:35:37 +0000 (08:35 +0800)]
mfd: Fix max77693 irq leak and wrong kfree call

We need to call max77693_irq_exit() in max77693_i2c_probe error patch and
max77693_i2c_remove.

Current code already uses devm_kzalloc() to allocate memory for max77693.
Thus we should not call kfree(max77693), otherwise we got double free.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Delete ab5500-core.h
Paul Bolle [Wed, 6 Jun 2012 21:25:11 +0000 (23:25 +0200)]
mfd: Delete ab5500-core.h

Commit 72fb92200d6c31b9982c06784e4bcff2f5b7d8b6 ("mfd/ab5500: delete
AB5500 support") deleted all files that used ab5500-core.h. That file
apparently was simply overlooked. Delete it too.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Staticise max77693 pm_ops
Mark Brown [Tue, 5 Jun 2012 15:15:59 +0000 (16:15 +0100)]
mfd: Staticise max77693 pm_ops

They're not referenced outside this file.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Transfer rtc max8925 irq from MFD defined resources
Haojian Zhuang [Tue, 5 Jun 2012 10:08:50 +0000 (18:08 +0800)]
mfd: Transfer rtc max8925 irq from MFD defined resources

MAX8925 rtc irq is transfered from mfd resources now.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add missing max8997 static storage class specifier
Sachin Kamat [Mon, 4 Jun 2012 11:09:07 +0000 (16:39 +0530)]
mfd: Add missing max8997 static storage class specifier

Fixes the following sparse warnings:
drivers/mfd/max8997.c:209:4: warning: symbol 'max8997_dumpaddr_pmic' was not declared. Should it be static?
drivers/mfd/max8997.c:334:4: warning: symbol 'max8997_dumpaddr_muic' was not declared. Should it be static?
drivers/mfd/max8997.c:344:4: warning: symbol 'max8997_dumpaddr_haptic' was not declared. Should it be static?
drivers/mfd/max8997.c:426:25: warning: symbol 'max8997_pm' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Print ab8500 switch off cause
Jonas Aaberg [Fri, 29 Jun 2012 15:46:12 +0000 (17:46 +0200)]
mfd: Print ab8500 switch off cause

Instead of just printing the register value, also output some
description of the value.

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Update db8500-prmcu hostport_access enable
Arun Murthy [Mon, 21 May 2012 08:58:21 +0000 (14:28 +0530)]
mfd: Update db8500-prmcu hostport_access enable

Force the Modem wakeup by asserting the CaWakeReq signal before the
hostaccess_req/ack ping-pong sequence. The Awake_req signal is de-asserted
asserted at the same time than the hostaccess_req. Return error on failure
case so that the client using this can take appropiate steps.

Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove custom wm8350 cache implementation
Mark Brown [Sun, 3 Jun 2012 12:37:24 +0000 (13:37 +0100)]
mfd: Remove custom wm8350 cache implementation

Since none of the users now reference the cache directly we can happily
remove the custom cache code and rely on the regmap cache.

For simplicity we don't bother with the register defaults tables but
instead read the defaults from the device - regmap is capable of doing
this, unlike our old cache infrastructure. This saves a lot of code and
allows us to cache the device revision information too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Rely on regmap cache in wm8350 interrupt controller
Mark Brown [Sun, 3 Jun 2012 12:37:23 +0000 (13:37 +0100)]
mfd: Rely on regmap cache in wm8350 interrupt controller

We can just use regmap_update_bits() to achieve the same effect - it will
do the read/modify/update cycle for us.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add regmap cache support for wm8350
Mark Brown [Sun, 3 Jun 2012 12:37:22 +0000 (13:37 +0100)]
mfd: Add regmap cache support for wm8350

Use the most simple possible transformation on the existing code so keep
the table sitting around, further patches in this series will delete the
existing cache code - the main purpose of this patch is to ensure that
we always have a cache for bisection.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Support for user defined wm8994 irq flags
Mark Brown [Fri, 1 Jun 2012 15:33:19 +0000 (16:33 +0100)]
mfd: Support for user defined wm8994 irq flags

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Register the ab8500 from db8500-prcmu using the MFD API
Lee Jones [Fri, 29 Jun 2012 15:13:35 +0000 (17:13 +0200)]
mfd: Register the ab8500 from db8500-prcmu using the MFD API

Hierarchically, the AB8500 is a child of the DB8500 PRCMU. So now that
Device Tree is being used and MFD core code is Device Tree aware, we
can simply register DB8500 PRCMU from Device Tree in the normal way
then allow the DB8500 PRCMU driver to register the AB8500 as a simple
MFD device at probe time.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Register db8500-prcmu devices using the newly DT:ed MFD API
Lee Jones [Wed, 20 Jun 2012 12:56:41 +0000 (13:56 +0100)]
mfd: Register db8500-prcmu devices using the newly DT:ed MFD API

Now the MFD API is Device Tree aware we can use it for platform
registration again, even when booting with DT enabled. To aid in
Device Node pointer allocation we provide each cell with the
associative compatible string.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Initialise the AB8500 driver at core_initcall time
Lee Jones [Mon, 11 Jun 2012 15:25:00 +0000 (16:25 +0100)]
mfd: Initialise the AB8500 driver at core_initcall time

The AB8500 is soon to have its own IRQ domain. For this to be useful
the driver needs to be initialised earlier in the boot sequence. Here
we move initialisation forward from arch_initcall to core_initcall time.

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>
12 years agomfd: Initialise the DB8500 PRCMU driver at core_initcall time
Lee Jones [Mon, 11 Jun 2012 15:24:59 +0000 (16:24 +0100)]
mfd: Initialise the DB8500 PRCMU driver at core_initcall time

Now the AB8500 has its own IRQ domain it needs to be initialised earlier
in the boot sequence. As the AB8500 relies on the DB8500 PRCMU we need to
reflect this change for the PRCMU driver too.

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>
12 years agomfd: Make MFD core code Device Tree and IRQ domain aware
Lee Jones [Fri, 29 Jun 2012 17:01:03 +0000 (19:01 +0200)]
mfd: Make MFD core code Device Tree and IRQ domain aware

During Device Tree enablement of the ab8500 and db8500-prcmu drivers,
a decision was made to omit registration through the MFD API and use
Device Tree directly. However, because MFD devices have a different
address space and the ab8500 and db8500 both use I2C to communicate,
this causes issues with address translation during execution of
of_platform_populate(). So the solution is to make the MFD core aware
of Device Tree and have it assign the correct node pointers instead.

To make this work the MFD core also needs to be awere of IRQ domains,
as Device Tree insists on IRQ domain compatibility. So, instead of
providing an irq-base via platform code, in the DT case we simply
look up the IRQ domain and map to the correct virtual IRQ.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Generically describe interactions with the DB8500 PRCMU
Lee Jones [Wed, 20 Jun 2012 12:56:38 +0000 (13:56 +0100)]
mfd: Generically describe interactions with the DB8500 PRCMU

There is only one method used to communicate with the DB8500 PRCMU, via I2C.
Now this can be assumed, there is no requirement to specify the protocol in
the function name. This patch removes protocol specifics and uses a more
generic naming convention.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add IRQ domain support for the AB8500
Lee Jones [Wed, 20 Jun 2012 12:56:37 +0000 (13:56 +0100)]
mfd: Add IRQ domain support for the AB8500

As the AB8500 is an IRQ controller in its own right, here we provide
the AB8500 driver with IRQ domain support. This is required if we wish
to reference any of its IRQs from a platform's Device Tree.

Cc: Naga Radheshy <naga.radheshy@stericsson.com>
Cc: Mattias Wallin <mattias.wallin@stericsson.com>
Cc: Daniel Willerud <daniel.willerud@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Enable DT probing of the DB8500 PRCMU
Lee Jones [Fri, 29 Jun 2012 13:41:38 +0000 (15:41 +0200)]
mfd: Enable DT probing of the DB8500 PRCMU

This patch adds the correct compatible string for use during Device Tree
population. Without it the DB8500 PRCMU will not be probed.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove redundant AB8500_I2C_CORE Kconfig entry
Lee Jones [Wed, 30 May 2012 04:47:36 +0000 (12:47 +0800)]
mfd: Remove redundant AB8500_I2C_CORE Kconfig entry

During ab8500-core clean-up the Kconfig entry for AB8500_I2C_CORE
was left remnant. This patch simply removes it.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Enable IRQF_ONESHOT when requesting a threaded IRQ for ab8500gpadc
Lee Jones [Wed, 30 May 2012 04:47:34 +0000 (12:47 +0800)]
mfd: Enable IRQF_ONESHOT when requesting a threaded IRQ for ab8500gpadc

The kernel now forces IRQs to be ONESHOT if no IRQ handler is passed.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Use devm_* APIs for mc13xxx
Axel Lin [Fri, 29 Jun 2012 13:14:36 +0000 (15:14 +0200)]
mfd: Use devm_* APIs for mc13xxx

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: mc13xxx workaround SPI hardware bug on i.Mx
Philippe Rétornaz [Tue, 29 May 2012 09:06:29 +0000 (11:06 +0200)]
mfd: mc13xxx workaround SPI hardware bug on i.Mx

The MC13xxx PMIC is mainly used on i.Mx SoC. On those SoC the SPI
hardware will deassert CS line as soon as the SPI FIFO is empty.
The MC13xxx hardware is very sensitive to CS line change as it
corrupts the transfer if CS is deasserted in the middle of a register
read or write.
It is not possible to use the CS line as a GPIO on some SoC, so we
need to workaround this by implementing a single SPI transfer to
access the PMIC.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Fix mc13xxx SPI regmap
Philippe Rétornaz [Tue, 29 May 2012 09:06:28 +0000 (11:06 +0200)]
mfd: Fix mc13xxx SPI regmap

This fix the SPI regmap configuration, the wrong write flag was used.
Also, bits_per_word should not be set as the regmap spi implementation
uses a 8bits transfert granularity.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove unused max77693 iolock mutex
Axel Lin [Thu, 24 May 2012 08:57:46 +0000 (16:57 +0800)]
mfd: Remove unused max77693 iolock mutex

Now this driver is using regmap APIs, the iolock mutex is not used and can be
removed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove unused variable from da9052_device_init
Krzysztof Wilczynski [Fri, 29 Jun 2012 11:14:15 +0000 (13:14 +0200)]
mfd: Remove unused variable from da9052_device_init

This is to address the following warning during compilation time:

  drivers/mfd/da9052-core.c: In function ‘da9052_device_init’:
  drivers/mfd/da9052-core.c:646: warning: unused variable ‘desc’

This variable is indeed no longer in use (change can be traced back
to commit: 8614419451d88bf99fff7f5e468fe45f8450891e).

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add terminating entry for i2c_device_id palmas table
Axel Lin [Mon, 21 May 2012 15:33:22 +0000 (23:33 +0800)]
mfd: Add terminating entry for i2c_device_id palmas table

The i2c_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add Maxim 77686 driver
Jonghwa Lee [Mon, 25 Jun 2012 08:34:36 +0000 (10:34 +0200)]
mfd: Add Maxim 77686 driver

This patch is device driver for MAX77686 chip.
MAX77686 is PMIC and includes regulator and rtc on it.
This driver is core of MAX77686 chip, so provides common support for
accessing on-chip devices. It uses irq_domain to manage irq and regmap
to read/write data to its register with i2c bus.

Signed-off-by: Chiwoong Byun <woong.byun@samsung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoLinux 3.5-rc6
Linus Torvalds [Sun, 8 Jul 2012 00:23:56 +0000 (17:23 -0700)]
Linux 3.5-rc6

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sun, 8 Jul 2012 00:21:59 +0000 (17:21 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security

Pull security docs update from James Morris.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  security: Minor improvements to no_new_privs documentation

12 years agovfs: make O_PATH file descriptors usable for 'fchdir()'
Linus Torvalds [Sat, 7 Jul 2012 17:17:00 +0000 (10:17 -0700)]
vfs: make O_PATH file descriptors usable for 'fchdir()'

We already use them for openat() and friends, but fchdir() also wants to
be able to use O_PATH file descriptors.  This should make it comparable
to the O_SEARCH of Solaris.  In particular, O_PATH allows you to access
(not-quite-open) a directory you don't have read persmission to, only
execute permission.

Noticed during development of multithread support for ksh93.

Reported-by: ольга крыжановская <olga.kryzhanovska@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org # O_PATH introduced in 3.0+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Linus Torvalds [Sat, 7 Jul 2012 18:20:59 +0000 (11:20 -0700)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm

Pull ARM fixes from Russell King:
 "Last merge window, we had some updates from Al cleaning up the signal
  restart handling.  These have caused some problems on ARM, and while
  Al has some fixes, we have some concerns with Al's patches but we've
  been unsuccesful with discussing this.

  We have got to the point where we need to do something, and we've
  decided that the best solution is to revert the appropriate commits
  until Al is able to reply to us.

  Also included here are four patches to fix warnings that I've noticed
  in my build system, and one fix for kprobes test code."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: fix warning caused by wrongly typed arm_dma_limit
  ARM: fix warnings about atomic64_read
  ARM: 7440/1: kprobes: only test 'sub pc, pc, #1b-2b+8-2' on ARMv6
  ARM: 7441/1: perf: return -EOPNOTSUPP if requested mode exclusion is unavailable
  ARM: 7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK"
  ARM: 7442/1: Revert "remove unused restart trampoline"
  ARM: fix set_domain() macro
  ARM: fix mach-versatile/pci.c warning

12 years agosecurity: Minor improvements to no_new_privs documentation
Andy Lutomirski [Thu, 5 Jul 2012 18:23:24 +0000 (11:23 -0700)]
security: Minor improvements to no_new_privs documentation

The documentation didn't actually mention how to enable no_new_privs.
This also adds a note about possible interactions between
no_new_privs and LSMs (i.e. why teaching systemd to set no_new_privs
is not necessarily a good idea), and it references the new docs
from include/linux/prctl.h.

Suggested-by: Rob Landley <rob@landley.net>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <james.l.morris@oracle.com>
12 years agoMerge tag 'ecryptfs-3.5-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 6 Jul 2012 22:32:18 +0000 (15:32 -0700)]
Merge tag 'ecryptfs-3.5-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs

Pull eCryptfs fixes from Tyler Hicks:
 "Fixes an incorrect access mode check when preparing to open a file in
  the lower filesystem.  This isn't an urgent fix, but it is simple and
  the check was obviously incorrect.

  Also fixes a couple important bugs in the eCryptfs miscdev interface.
  These changes are low risk due to the small number of users that use
  the miscdev interface.  I was able to keep the changes minimal and I
  have some cleaner, more complete changes queued up for the next merge
  window that will build on these patches."

* tag 'ecryptfs-3.5-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files
  eCryptfs: Fix lockdep warning in miscdev operations
  eCryptfs: Properly check for O_RDONLY flag before doing privileged open

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Fri, 6 Jul 2012 20:59:50 +0000 (13:59 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

Pull target fixes from Nicholas Bellinger:
 "Two minor target fixes.  There is really nothing exciting and/or
  controversial this time around.

  There's one fix from MDR for a RCU debug warning message within tcm_fc
  code (CC'ed to stable), and a small AC fix for qla_target.c based upon
  a recent Coverity static report.

  Also, there is one other outstanding virtio-scsi LUN scanning bugfix
  that has been uncovered with the in-flight tcm_vhost driver over the
  last days, and that needs to make it into 3.5 final too.  This patch
  has been posted to linux-scsi again here:

    http://marc.info/?l=linux-scsi&m=134160609212542&w=2

  and I've asked James to include it in his next PULL request."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  qla2xxx: print the right array elements in qlt_async_event
  tcm_fc: Resolve suspicious RCU usage warnings