summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mfd: Remove __devexit annotation for pm80x_deinitAxel Lin2012-07-162-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>
* mfd: Fix checking return value of 88pm8xx regmap_read()Axel Lin2012-07-162-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>
* mfd: Initial support for the WM5110Mark Brown2012-07-169-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>
* mfd: Add data tables for the WM5110Mark Brown2012-07-161-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>
* MAINTAINERS: Add maintainer for samsung mfd driverSangbeom Kim2012-07-161-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>
* mfd: Add s2mps11 irq driverSangbeom Kim2012-07-164-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>
* mfd: Add samsung s2mps11 mfd supportSangbeom Kim2012-07-163-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>
* mfd: Modify samsung mfd headerSangbeom Kim2012-07-1610-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>
* mfd: Modify samsung mfd driver for common apiSangbeom Kim2012-07-165-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>
* mfd: Rename s5m file and directories to samsungSangbeom Kim2012-07-169-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>
* mfd: Add even more arizona register definitionsMark Brown2012-07-101-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>
* mfd: Add support for multiple arizona PDM speaker outputsMark Brown2012-07-102-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>
* mfd: Export pm80x_regmap_configAxel Lin2012-07-101-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>
* mfd: Guard max77686_pmic_dt_match with CONFIG_OFAxel Lin2012-07-101-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>
* rtc: Add rtc support to 88PM80X PMICQiao Zhou2012-07-093-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>
* mfd: Error out if initial arizona boot failsMark Brown2012-07-091-1/+5
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: 88pm80[05] i2c device_id arrays should be NULL terminatedSamuel Ortiz2012-07-092-0/+2
| | | | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Remove the clocks from the list of max77686 regulatorsYadwinder Singh Brar2012-07-091-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>
* mfd: Add device tree support for max77686Yadwinder Singh Brar2012-07-092-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>
* mfd: Allow to specify max77686 interrupt through DT or platform file alsoYadwinder Singh Brar2012-07-092-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>
* mfd: Apply irq_mask_cur before handling max77686 interruptsYadwinder Singh Brar2012-07-091-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>
* mfd: Use pmic regmap to read max77686 pmic interrupt registerYadwinder Singh Brar2012-07-091-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>
* mfd: Move twl-core device_init_wakeup to after platform_device_addNeilBrown2012-07-091-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>
* mfd: Add companion chip in 88pm80xQiao Zhou2012-07-092-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>
* mfd: Support 88pm80x in 80x driverQiao Zhou2012-07-096-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>
* mfd: Fix Arizona Kconfig entrySamuel Ortiz2012-07-091-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>
* mfd: Mark headphone detect readback wm5102 register volatileMark Brown2012-07-091-1/+1
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Don't free unallocated arizona supplies on errorMark Brown2012-07-091-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>
* mfd: Add missing WM5102 ifdefsMark Brown2012-07-093-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>
* mfd: Treat arizona register read errors as non-fatal during resumeMark Brown2012-07-091-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>
* mfd: Release arizona DCVDD if we fail to resume the deviceMark Brown2012-07-091-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>
* mfd: Add more arizona register definitionsMark Brown2012-07-091-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>
* mfd: Also restore wm8994 GPIO IRQ masks after resetMark Brown2012-07-091-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>
* mfd: Use regcache_sync_region() to sync wm8994 GPIO registers on suspendMark Brown2012-07-091-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>
* mfd: Move arizona digital core supply management to the regulator APIMark Brown2012-07-092-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>
* mfd: Force on REGMAP for the arizona coreMark Brown2012-07-091-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>
* Merge tag 'mfd/wm5102' of ↵Samuel Ortiz2012-07-0913-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.
| * mfd: wm5102: Build system hookupMark Brown2012-06-232-0/+36
| | | | | | | | | | | | | | | | Several forthcoming Wolfson devices are based on a common platform known as Arizona allowing a great deal of reuse of driver code. This patch adds the build system hookup for the core driver and the WM5102. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * mfd: wm5102: Initial support for WM5102Mark Brown2012-06-231-0/+2399
| | | | | | | | | | | | | | | | The first Arizona class device is the WM5102. This patch adds the data tables for this, mainly consisting of regmap data. This patch depends on the recently added support for wake IRQs in the regmap subsystem. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * mfd: arizona: SPI bus interfaceMark Brown2012-06-231-0/+91
| | | | | | | | | | | | | | | | Several forthcoming Wolfson devices are based on a common platform known as Arizona allowing a great deal of reuse of driver code. This patch adds SPI bus interface code for the devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * mfd: arizona: I2C bus interfaceMark Brown2012-06-231-0/+89
| | | | | | | | | | | | | | | | Several forthcoming Wolfson devices are based on a common platform known as Arizona allowing a great deal of reuse of driver code. This patch adds I2C bus interface code for the devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * mfd: arizona: Interrupt supportMark Brown2012-06-231-0/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | Several forthcoming Wolfson devices are based on a common platform known as Arizona allowing a great deal of reuse of driver code. This patch adds support for the interrupt controller on Arizona class devices. Since there are two interrupt domains in the device which share a single /IRQ pin by default we use two regmap IRQ domains with a trivial demux interrupt domain used to distribute the interrupts to the two devices. The devices do support multiple interrupt signals, future work will enable support for using this feature to avoid the demux. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * mfd: arizona: Core driverMark Brown2012-06-234-0/+781
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several forthcoming Wolfson devices are based on a common platform known as Arizona allowing a great deal of reuse of driver code. This patch adds core support for these devices. In order to handle systems which do not use the generic clock API a simple wrapper for the 32kHz clock domain in the devices is provided. Once the generic clock API is widely available this code will be moved over to use that. For simplicity some WM5102 specific code is included in the core driver, the effort involved in splitting the device out isn't worth it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * mfd: arizona: Register definitionsMark Brown2012-06-231-0/+6222
| | | | | | | | | | | | | | | | Several forthcoming Wolfson devices are based on a common platform known as Arizona allowing a great deal of reuse of driver code. This patch adds register definitions for these devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * Merge branch 'topic/irq' of ↵Mark Brown2012-06-232-0/+53
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into wm5102
| | * regmap: Implement support for wake IRQsMark Brown2012-06-052-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | Allow chips to provide a bank of registers for controlling the wake state in a similar fashion to the masks and propagate the wake count to the parent interrupt controller. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| | * regmap: Don't try to map non-existant IRQsMark Brown2012-06-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | If the driver supplied an empty entry in the array of IRQs then return an error rather than trying to do the mapping. This is intended for use with handling chip variants and similar situations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ARM: ux500: Register the AB8500 from DB8500 MFDLee Jones2012-07-094-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>
* | | mfd: Remove unused max77686 iolock mutexAxel Lin2012-07-092-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>
* | | mfd: Add pre-regulator device for 88pm860xJett.Zhou2012-07-092-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>
OpenPOWER on IntegriCloud