summaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
AgeCommit message (Collapse)Author
2010-05-28mfd: New AB8500 driverRabin Vincent
Add a new driver to support the AB8500 Power Management chip, replacing the current AB4500. The new driver replaces the old one, instead of an incremental modification, because this is a substantial overhaul including: - Split of the driver into -core and -spi portions, to allow another interface layer to be added - Addition of interrupt support - Switch to MFD core API for handling subdevices - Simplification of the APIs to remove a redundant block parameter - Rename of the APIs and macros from ab4500_* to ab8500_* - Rename of the files from ab4500* to ab8500* - Change of the driver name from ab4500 to ab8500 Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: AB3100 register access change to abx500 APIMattias Wallin
The interface for the AB3100 is changed to make way for the ABX500 family of chips: AB3550, AB5500 and future ST-Ericsson Analog Baseband chips. The register access functions are moved out to a separate struct abx500_ops. In this way the interface is moved from the implementation and the sub functionality drivers can keep their interface intact when chip infrastructure and communication mechanisms changes. We also define the AB3550 device IDs and the AB3550 platform data struct and convert the catenated 32bit event to an array of 3 x 8bits. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Renamed ab3100.h to abx500.hLinus Walleij
The goal here is to make way for a more general interface for the analog baseband chips ab3100 ab3550 ab550 and future chips. This patch have been divided into two parts since both changing name and content of a file is not recommended in git. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Add Toshiba's TC35892 MFD coreRabin Vincent
The TC35892 I/O Expander provides 24 GPIOs, a keypad controller, timers, and a rotator wheel interface. This patch adds the MFD core. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Ensure WM831x charger interrupts are acknowledged when suspendingMark Brown
The charger interrupts on the WM831x are unconditionally a wake source for the system. If the power driver is not able to monitor them (for example, due to the IRQ line not having been wired up on the system) then any charger interrupt will prevent the system suspending for any meaningful amount of time since nothing will ack them. Avoid this issue by manually acknowledging these interrupts when we suspend the WM831x core device if they are masked. If software is actually using the interrupts then they will be unmasked and this change will have no effect. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28input: Touchscreen driver for TPS6507xTodd Fischer
Add touch screen input driver for TPS6507x family of multi-function chips. Uses the TPS6507x MFD driver. No interrupt support due to testing limitations of current hardware. Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Add TPS6507x supportTodd Fischer
TPS6507x are multi function (PM, touchscreen) chipsets from TI. This commit also changes the corresponding regulator driver from being standalone to an MFD subdevice. Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Add tps6507x board data structureTodd Fischer
Add mfd structure which refrences sub-driver initialization data. For example, for a giving hardware implementation, the voltage regulator sub-driver initialization data provides the mapping betten a voltage regulator and what the output voltage is being used for. Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Move TPS6507x register definition to header file.Todd Fischer
Other sub-drivers for the TPS6507x chip will need to use register definition so move it out of the source file and into a header file. Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Janz CMOD-IO PCI MODULbus Carrier Board supportIra W. Snyder
The Janz CMOD-IO PCI MODULbus carrier board is a PCI to MODULbus bridge, which may host many different types of MODULbus daughterboards, including CAN and GPIO controllers. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Reviewed-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Section cleanup of 88pm860x driverHenrik Kretzschmar
This patch fixes three section mismatches. WARNING: drivers/mfd/88pm860x.o(.text+0x12): Section mismatch in reference from the function pm860x_device_exit() to the function .devexit.text:device_irq_exit() The function pm860x_device_exit() references a function in an exit section. Often the function device_irq_exit() has valid usage outside the exit section and the fix is to remove the __devexit annotation of device_irq_exit. WARNING: drivers/mfd/88pm860x.o(.text+0xb0): Section mismatch in reference from the function pm860x_device_init() to the function .devinit.text:device_8606_init() The function pm860x_device_init() references the function __devinit device_8606_init(). This is often because pm860x_device_init lacks a __devinit annotation or the annotation of device_8606_init is wrong. WARNING: drivers/mfd/88pm860x.o(.text+0xbe): Section mismatch in reference from the function pm860x_device_init() to the function .devinit.text:device_8607_init() The function pm860x_device_init() references the function __devinit device_8607_init(). This is often because pm860x_device_init lacks a __devinit annotation or the annotation of device_8607_init is wrong. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-28mfd: Add support for the RDC321x southbridgeFlorian Fainelli
This patch adds a new MFD driver for the RDC321x southbridge. This southbridge is always present in the RDC321x System-on-a-Chip and provides access to some GPIOs as well as a watchdog. Access to these two functions is done using the southbridge PCI device configuration space. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-05-27Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlightLinus Torvalds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: gta02: Use pcf50633 backlight driver instead of platform backlight driver. backlight: pcf50633: Register a pcf50633-backlight device in pcf50633 core driver. backlight: Add pcf50633 backlight driver backlight: 88pm860x_bl: fix error handling in pm860x_backlight_probe backlight: max8925_bl: Fix error handling path backlight: l4f00242t03: fix error handling in l4f00242t03_probe backlight: add S6E63M0 AMOLED LCD Panel driver backlight: adp8860: add support for ADP8861 & ADP8863 backlight: mbp_nvidia_bl - Fix DMI_SYS_VENDOR for MacBook1,1 backlight: Add Cirrus EP93xx backlight driver backlight: l4f00242t03: Fix regulators handling code in remove function backlight: fix adp8860_bl build errors backlight: new driver for the ADP8860 backlight parts backlight: 88pm860x_bl - potential memory leak backlight: mbp_nvidia_bl - add support for older MacBookPro and MacBook 6,1. backlight: Kconfig cleanup backlight: backlight_device_register() return ERR_PTR()
2010-05-26backlight: pcf50633: Register a pcf50633-backlight device in pcf50633 core ↵Lars-Peter Clausen
driver. Register a device newly added pcf50633-backlight driver as a child device in the pcf50633 core driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-26backlight: Add pcf50633 backlight driverLars-Peter Clausen
This patch adds a backlight driver for controlling the pcf50633 LED module. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-26leds: Add mc13783 LED supportPhilippe Rétornaz
This add basic led support for Freescale MC13783 PMIC. Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-25regulator: use voltage number array in 88pm860xHaojian Zhuang
A lot of condition comparision statements are used in original driver. These statements are used to check the boundary of voltage numbers since voltage number isn't linear. Now use array of voltage numbers instead. Clean code with simpler way. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-22sh: allow platforms to specify SD-card supported voltagesGuennadi Liakhovetski
Boards can have different supplied voltages on different SD card slots. This information has to be passed down to the SD/MMC driver. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22mmc: let MFD's provide supported Vdd card voltages to tmio_mmcGuennadi Liakhovetski
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22mfd: pass platform flags down to the tmio_mmc driverGuennadi Liakhovetski
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22tmio: add a platform flag to disable card write-protection detectionGuennadi Liakhovetski
Write-protection status is not always available, e.g., micro-SD cards do not have a write-protection switch at all. This patch adds a flag to let platforms force tmio_mmc to consider the card writable. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22sh: prepare the SDHI MFD driver to pass DMA configuration to tmio_mmc.cGuennadi Liakhovetski
Pass DMA slave IDs from platform down to the tmio_mmc driver, to be used for dmaengine configuration. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-22mmc: prepare tmio_mmc for passing of DMA configuration from the MFD cellGuennadi Liakhovetski
After this patch, if the "dma" pointer in struct tmio_mmc_data is not NULL, it points to a struct, containing two tokens, that have to be passed to the dmaengine driver for channel configuration. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-05mfd: Add WM8994 interrupt controller supportMark Brown
The WM8994 has an interrupt controller which supports interrupts for both CODEC and GPIO portions of the chip. Support this using genirq, while allowing for systems that do not have an interrupt hooked up. Wrapper functions are provided for the IRQ request and free to simplify the code in consumer drivers when handling cases where IRQs are not set up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-17ASoC: Implement WM835x microphone jack detection supportMark Brown
The WM8350 provides microphone presence and short circuit detection. Integrate this with the ASoC jack reporting API. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-12MFD: DaVinci Voice CodecMiguel Aguilar
This is the MFD driver for the DaVinci Voice codec, it has two clients: * Voice codec interface * Voice codec CQ93VC Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-07mfd: Fix ucb1x00 build failure for collie_defconfigPeter Huewe
This patch fixes a build failure[1], by adding the missing semaphore.h include References: [1] http://kisskb.ellerman.id.au/kisskb/buildresult/2234322/ Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Use completion interrupt for WM831x AUXADCMark Brown
Use the completion interrupt generated by the device rather than polling for conversions to complete. As a backup we still check the status of the AUXADC if we don't get a completion, mostly for systems that don't have the WM831x interrupt infrastructure hooked up. Also reduce the timeout for completion of conversions to 5ms from the previous 10ms, the lower timeout should be sufficient. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Use completion interrupt for WM835x AUXADCMark Brown
Use the completion interrupt generated by the device rather than polling for conversions to complete. As a backup we still check the state of the AUXADC if we don't get a completion, mostly for systems that don't have the WM8350 interrupt infrastructure hooked up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Add WM831x revision B supportMark Brown
Revision B of the WM831x devices changes the sense of the tristate bit for GPIO configuration, inverting it to become an enable instead. Take account of this in the gpiolib driver. A current sink regulation status bit has also been added in revision B, add a flag indicating if it's present but don't use it yet. This revision also adds an interrupt on key up for the ON pin event which the existing code is able to take advantage of. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07tmio_mmc: Remove const from platform data V3Magnus Damm
Remove const from the tmio-mmc platform data hclk V3. This change makes it possible to remove the type cast from the sh_mobile_sdhi driver which is using the clock framework to get the clock rate. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2Yusuke Goda
Enable MMC_CAP_XX support in the tmio_mmc driver if pdata->capabilities is set. Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Use genirq in 88pm860xHaojian Zhuang
Use genirq to simplify IRQ handling in 88pm860x. Remove the interface of mask/free IRQs on 88pm860x. All these work is taken by genirq. Update the touchscreen driver of 88pm860x since IRQ handling is changed. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Clean code in max8925Haojian Zhuang
Remove unused definitions. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Update irq handler in max8925Haojian Zhuang
Update thread irq handler. Simply the interface of using thread irq. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Add initial WM8994 supportMark Brown
The WM8994 is a highly integrated ultra low power audio hub CODEC. Since it includes on-board regulators and GPIOs it is represented as a multi-function device, though the overwhelming majority of the functionality is provided by the ASoC CODEC driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Add WM8994 register definitionsMark Brown
As a separate patch due to the large size. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Add subdevs in max8925Haojian Zhuang
Add subdevs in MAX8925. MAX8925 includes regulator, backlight and touch components. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Initial max8925 supportHaojian Zhuang
Basic Max8925 support, which is a power management IC from Maxim Semiconductor. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07input: Enable touch on 88pm860xHaojian Zhuang
Enable touchscreen driver for the 88pm860x multi function core. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Append subdev into 88pm860x driverHaojian Zhuang
Append backlight, led & touch subdevs into 88pm860x driver. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Add irq support in 88pm860xHaojian Zhuang
88PM860x is a complex PMIC device. It contains touch, charger, sound, rtc, backlight, led, and so on. Host communicates to 88PM860x by I2C bus. Use thread irq to support this usage case. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Support 88pm8606 in 860x driverHaojian Zhuang
88PM8606 and 88PM8607 are two discrete chips used for power management. Hardware designer can use them together or only one of them according to requirement. There's some logic tightly linked between these two chips. For example, USB charger driver needs to access both chips by I2C interface. Now share one driver to these two devices. Only one I2C client is identified in platform init data. If another chip is also used, user should mark it in companion_addr field of platform init data. Then driver could create another I2C client for the companion chip. All I2C operations are accessed by 860x-i2c driver. In order to support both I2C client address, the read/write API is changed in below. reg_read(client, offset) reg_write(client, offset, data) The benefit is that client drivers only need one kind of read/write API. I2C and MFD driver can be shared in both 8606 and 8607. Since API is changed, update API in 8607 regulator driver. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Split 88pm8607 driverHaojian Zhuang
Create 88pm8607-i2c driver to support all I2C operation of 88PM8607. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Convert AB3100 driver to threaded IRQLinus Walleij
This converts the AB3100 core MFD driver to use a threaded interrupt handler instead of the explicit top/bottom-half construction with a workqueue. This saves some code and make it more similar to other modern MFD drivers. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07gpiolib: Add support for WM8350 GPIO controllerMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Convert WM8350 to genirqMark Brown
This gives us use of the diagnostic facilities genirq provides and will allow implementation of interrupt support for the WM8350 GPIOs. Stub functions are provided to ease the transition of the individual drivers, probably after additional work to pass the IRQ numbers via the struct devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07rtc: Suppress duplicate enable/disable of WM8350 update interruptMark Brown
Unlike the wm8350-custom code genirq nests enable and disable calls so we can't just unconditionally mask or unmask the interrupt, we need to remember the state we set and only mask or unmask when there is a real change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Cc: rtc-linux@googlegroups.com Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07mfd: Add a data argument to the WM8350 IRQ free functionMark Brown
To better match genirq. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-06mfd/mc13783: new function reading irq mask and status registerUwe Kleine-König
The driver for the mc13783 rtc needs to know if the TODA irq is pending. Instead of tracking in the rtc driver if the irq is enabled provide that information, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: Valentin Longchamp <valentin.longchamp@epfl.ch> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>