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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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]
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>
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>
'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
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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
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:
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