summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-25mfd: Add support for twl6041Peter Ujfalusi3-1/+3
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>
2012-07-25mfd: Fix twl6040 revision informationPeter Ujfalusi2-3/+3
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>
2012-07-17mfd: Matches should be NULL when populate anatop child devicesRichard Zhao1-1/+1
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>
2012-07-16input: ab8500-ponkey: Create AB8500 domain IRQ mappingLee Jones1-2/+2
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>
2012-07-16mfd: Add missing out of memory check for pcf50633Alan Cox1-2/+7
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>
2012-07-16Documentation: Describe the AB8500 Device Tree bindingsLee Jones1-0/+123
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>
2012-07-16mfd: Add tps65910 32-kHz-crystal-input initJohan Hovold1-10/+9
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>
2012-07-16mfd: Drop modifying mc13xxx driver's id_table in probeUwe Kleine-König2-12/+0
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>
2012-07-16mfd: Remove unneeded io_mutex from struct twl6040Axel Lin2-21/+3
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>
2012-07-16mfd: Remove __devexit annotation for pm80x_deinitAxel Lin2-2/+2
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>
2012-07-16mfd: Fix checking return value of 88pm8xx regmap_read()Axel Lin2-9/+12
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>
2012-07-16mfd: Initial support for the WM5110Mark Brown9-36/+105
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>
2012-07-16mfd: Add data tables for the WM5110Mark Brown1-0/+2281
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>
2012-07-16MAINTAINERS: Add maintainer for samsung mfd driverSangbeom Kim1-0/+10
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>
2012-07-16mfd: Add s2mps11 irq driverSangbeom Kim4-329/+193
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>
2012-07-16mfd: Add samsung s2mps11 mfd supportSangbeom Kim3-0/+216
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>
2012-07-16mfd: Modify samsung mfd headerSangbeom Kim10-544/+584
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>
2012-07-16mfd: Modify samsung mfd driver for common apiSangbeom Kim5-233/+233
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>
2012-07-16mfd: Rename s5m file and directories to samsungSangbeom Kim9-13/+13
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>
2012-07-10mfd: Add even more arizona register definitionsMark Brown1-1/+210
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>
2012-07-10mfd: Add support for multiple arizona PDM speaker outputsMark Brown2-4/+3
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>
2012-07-10mfd: Export pm80x_regmap_configAxel Lin1-0/+1
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>
2012-07-10mfd: Guard max77686_pmic_dt_match with CONFIG_OFAxel Lin1-5/+5
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>
2012-07-09rtc: Add rtc support to 88PM80X PMICQiao Zhou3-0/+382
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>
2012-07-09mfd: Error out if initial arizona boot failsMark Brown1-1/+5
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: 88pm80[05] i2c device_id arrays should be NULL terminatedSamuel Ortiz2-0/+2
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: Remove the clocks from the list of max77686 regulatorsYadwinder Singh Brar1-3/+0
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>
2012-07-09mfd: Add device tree support for max77686Yadwinder Singh Brar2-6/+98
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>
2012-07-09mfd: Allow to specify max77686 interrupt through DT or platform file alsoYadwinder Singh Brar2-13/+21
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>
2012-07-09mfd: Apply irq_mask_cur before handling max77686 interruptsYadwinder Singh Brar1-0/+3
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>
2012-07-09mfd: Use pmic regmap to read max77686 pmic interrupt registerYadwinder Singh Brar1-1/+1
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>
2012-07-09mfd: Move twl-core device_init_wakeup to after platform_device_addNeilBrown1-1/+2
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>
2012-07-09mfd: Add companion chip in 88pm80xQiao Zhou2-0/+29
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>
2012-07-09mfd: Support 88pm80x in 80x driverQiao Zhou6-0/+1402
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>
2012-07-09mfd: Fix Arizona Kconfig entrySamuel Ortiz1-1/+1
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>
2012-07-09mfd: Mark headphone detect readback wm5102 register volatileMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: Don't free unallocated arizona supplies on errorMark Brown1-1/+1
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>
2012-07-09mfd: Add missing WM5102 ifdefsMark Brown3-1/+6
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>
2012-07-09mfd: Treat arizona register read errors as non-fatal during resumeMark Brown1-1/+1
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>
2012-07-09mfd: Release arizona DCVDD if we fail to resume the deviceMark Brown1-1/+3
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>
2012-07-09mfd: Add more arizona register definitionsMark Brown1-0/+163
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>
2012-07-09mfd: Also restore wm8994 GPIO IRQ masks after resetMark Brown1-0/+7
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>
2012-07-09mfd: Use regcache_sync_region() to sync wm8994 GPIO registers on suspendMark Brown1-9/+4
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>
2012-07-09mfd: Move arizona digital core supply management to the regulator APIMark Brown2-30/+36
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>
2012-07-09mfd: Force on REGMAP for the arizona coreMark Brown1-0/+1
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>
2012-07-09Merge tag 'mfd/wm5102' of ↵Samuel Ortiz13-0/+9938
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.
2012-07-09ARM: ux500: Register the AB8500 from DB8500 MFDLee Jones4-28/+19
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>
2012-07-09mfd: Remove unused max77686 iolock mutexAxel Lin2-4/+0
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>
2012-07-09mfd: Add pre-regulator device for 88pm860xJett.Zhou2-0/+24
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>
2012-07-09mfd: Add device-tree entry to enable tps65910 external 32-kHz oscillatorJohan Hovold2-1/+6
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>