aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mfd/pcf50633
AgeCommit message (Collapse)Author
2010-01-22pcf50633-gpio: Add gpiolib support.Lars-Peter Clausen
2009-12-06backlight/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-06mfd: pcf50633: 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>
2009-12-06power: pcf50633: 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>
2009-12-06power: pcf50633: 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>
2009-12-06power: pcf50633: introduces battery charging current controlBalaji Rao
Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Signed-off-by: Paul Fertser <fercerpav@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>