pcf50633: Query charger status directly
authorPaul Fertser <fercerpav@gmail.com>
Wed, 4 Nov 2009 21:24:59 +0000 (00:24 +0300)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Mon, 16 Nov 2009 00:32:09 +0000 (03:32 +0300)
commitc329795052aa339850a45fab649ab97a36905136
tree96bc7769c35baaec5d87c0ab418e333b6983eeac
parent1282b35a1edf5f12ae58a2b16ae8615dfe0d9ecc
pcf50633: Query charger status directly

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>
drivers/power/pcf50633-charger.c
include/linux/mfd/pcf50633/mbc.h