summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/88pm860x-core.c
Commit message (Collapse)AuthorAgeFilesLines
...
* mfd: Adopt mfd_data in 88pm860x ledHaojian Zhuang2011-03-231-59/+50
| | | | | | | | | Copy 88pm860x platform data into different mfd_data structure for led driver. So move the identification of device node from led driver to mfd driver. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Adopt mfd_data in 88pm860x backlightHaojian Zhuang2011-03-231-45/+51
| | | | | | | | | Copy 88pm860x platform data into different mfd_data structure for backlight driver. So move the identification of device node from backlight driver to mfd driver. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Convert 88PM860x driver to new irq_ APIsMark Brown2011-01-141-21/+15
| | | | | | | | The interrupt controller APIs are being updated to pass a struct irq_data rather than the interrupt number. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Update chip id of 88pm8607Haojian Zhuang2010-10-291-2/+5
| | | | | | | Chipid of 88pm8607 is 0x40 or 0x50. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add codec resource into 88pm860x driverHaojian Zhuang2010-10-291-0/+44
| | | | | | | | Add codec IRQ resources that are used in 88pm860x codec driver. 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>
* mfd: Fix 88pm860x uninitialized variable and clean upDan Carpenter2010-08-121-40/+32
| | | | | | | | | | | | | | | | | | | The original code had a compile warning: drivers/mfd/88pm860x-core.c:431: warning: ‘ret’ may be used uninitialized in this function It seems like the warning is valid if either pdata or pdata->touch is NULL. This patch checks pdata and pdata->touch at the beginning of the function. That means everything can be pulled in one indent level. Now all the statements fit within the 80 character limit. Also at that point the "use_gpadc" variable isn't needed and removing it simplifies the logic. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Haojian Zhuang <hzhuang1@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix led resource in 88pm860xHaojian Zhuang2010-08-121-6/+6
| | | | | | | Fix typo error in LED resource of 88pm860x. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Section cleanup of 88pm860x driverHenrik Kretzschmar2010-05-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* regulator: use voltage number array in 88pm860xHaojian Zhuang2010-05-251-0/+2
| | | | | | | | | | | | 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>
* regulator: make 88pm860x sharing one driver structureHaojian Zhuang2010-05-251-17/+17
| | | | | | | | | Remove a lot of driver structures in 88pm860x driver. Make regulators share one driver structure. 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>
* mfd: Use genirq in 88pm860xHaojian Zhuang2010-03-071-114/+294
| | | | | | | | | 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>
* mfd: Append subdev into 88pm860x driverHaojian Zhuang2010-03-071-12/+205
| | | | | | | 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>
* mfd: Add irq support in 88pm860xHaojian Zhuang2010-03-071-7/+219
| | | | | | | | | | | 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>
* mfd: Support 88pm8606 in 860x driverHaojian Zhuang2010-03-071-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mfd: Split 88pm8607 driverHaojian Zhuang2010-03-071-0/+134
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>
OpenPOWER on IntegriCloud