aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mfd/pcf50633
AgeCommit message (Collapse)Author
2010-06-08MFD: pcf50633: Use mfd cells to register child devicesLars-Peter Clausen
This patch changes the pcf50633 core code to use mfd cells to register child devices instead of calling platform_device_{alloc,add} for each child. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2010-05-17pcf50633-gpio: Add gpiolib support.Lars-Peter Clausen
2010-05-17backlight/mfd: Add pcf50633 backlight driverLars-Peter Clausen
This patch adds a backlight driver controling the pcf50633 led converter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2009-12-15Merge git://git.infradead.org/battery-2.6Linus Torvalds
* git://git.infradead.org/battery-2.6: power_supply_sysfs: Handle -ENODATA in a special way wm831x_backup: Remove unused variables gta02: Set pcf50633 charger_reference_current_ma pcf50633: Query charger status directly pcf50633: Properly reenable charging when the supply conditions change pcf50633: Get rid of charging restart software auto-triggering pcf50633: introduces battery charging current control pcf50633: Add ac power supply class to the charger wm831x: Factor out WM831x backup battery charger
2009-12-13mfd: Fix memleak in pcf50633_client_dev_registerLars-Peter Clausen
Since platform_device_add_data copies the passed data, the allocated subdev_pdata is never freed. A simple fix would be to either free subdev_pdata or put it onto the stack. But since the pcf50633 child devices can rely on beeing children of the pcf50633 core device it's much more elegant to get access to pcf50633 core structure through that link. This allows to get completly rid of pcf5033_subdev_pdata. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-11-16pcf50633: Query charger status directlyPaul Fertser
Current scheme is fragile and is likely to go off sync, especially on batfull->adapter charging automatic MBC transition. Query the status bit every time we need it instead. We need to export another function to query for USB presence because we can't read anything from PCF50633 (via I2C) inside irq context and that is needed by usb gadgets. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-11-16pcf50633: Get rid of charging restart software auto-triggeringPaul Fertser
After reaching Battery Full condition MBC state machine switches back into charging mode when the battery voltage falls below 96% of a battery float voltage. The voltage drop in Li-Ion batteries is marginal (1-2%) till about 80% of its capacity - which means, after a BATFULL, charging won't be restarted until 75-80%. That is a desired behaviour recommended by battery manufacturers, don't mess with it. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-11-16pcf50633: introduces battery charging current controlBalaji Rao
Implement a new sysfs attribute to allow changing MBC charging limit on the fly independently of usb current limit. It also gets set automatically every time usb current limit is changed. Limiting charging current also prevents violating USB specification in the case when the whole device is shut down and usb current limit is reset to the factory default by the pcf50633 state transition. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-09-17mfd: fix wrong define for 10bit pcf50633 ADC modePaul Fertser
The 10 bits definition was the 8 bits one. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: use a dedicated workqueue for pcf50633 irq processingPaul Fertser
Using the default kernel "events" workqueue causes problems with synchronous adc readings if initiated from some task on the same workqueue. I had a deadlock trying to use pcf50633_adc_sync_read from a power_supply class driver because the reading was initiated from the workqueue and it waited for the irq processing to complete (to get the result) and that was put on the same workqueue. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-02-02pcf50633_charger: Remove unused mbc_set_status functionBalaji Rao
The 'pcf50633_mbc_set_status' function is unused, so remove it. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-02-02pcf50633_charger: Enable periodic charging restartBalaji Rao
The battery charger state machine switches into charging mode when the battery voltage falls below 96% of a battery float voltage. But the voltage drop in Li-ion batteries is marginal(1~2 %) till about 80% of its capacity - which means, after a BATFULL, charging won't be restarted until 80%. This work_struct function restarts charging at regular intervals to make sure the battery doesn't discharge too much. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-01-11regulator: PCF50633 pmic driverBalaji Rao
Changes from V1: - Removed support for suspend_enable & suspend_disable functions. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11power_supply: PCF50633 battery charger driverBalaji Rao
Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: PCF50633 gpio supportBalaji Rao
What the PCF05633 calls as a 'GPIO' is much more than the GPIO in the linux sense and there are only 4 of them - which means, the gpiolib is not used here. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: PCF50633 adc driverBalaji Rao
This patch adds basic support for the PCF50633 ADC. The subtractive mode is not supported yet. Since we don't have adc subsystem, it currently lives in drivers/mfd. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Acked-by: Jonathan Cameron <jonathan.cameron@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: PCF50633 core driverBalaji Rao
This patch implements the core of the PCF50633 driver. This core driver has generic register read/write functions and does interrupt management for its sub devices. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>