diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-01-21 06:22:56 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-01-23 09:39:16 -0500 |
commit | c9ade0fca3f7939194677353097b16c9795df46b (patch) | |
tree | fa812c2a01be48859d9ece52462323a810af233d /drivers/power/ab8500_charger.c | |
parent | e07a56453b14b929cf01bf032cc3e3220094609c (diff) |
abx500-chargalg: Add new sysfs interface to get current charge status
Allow a user to check on AB8500 charging status from debugfs.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/power/ab8500_charger.c')
-rw-r--r-- | drivers/power/ab8500_charger.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c index 0483e7cb2268..d834566410bc 100644 --- a/drivers/power/ab8500_charger.c +++ b/drivers/power/ab8500_charger.c | |||
@@ -2764,6 +2764,9 @@ static int ab8500_charger_usb_notifier_call(struct notifier_block *nb, | |||
2764 | enum ab8500_usb_state bm_usb_state; | 2764 | enum ab8500_usb_state bm_usb_state; |
2765 | unsigned mA = *((unsigned *)power); | 2765 | unsigned mA = *((unsigned *)power); |
2766 | 2766 | ||
2767 | if (!di) | ||
2768 | return NOTIFY_DONE; | ||
2769 | |||
2767 | if (event != USB_EVENT_VBUS) { | 2770 | if (event != USB_EVENT_VBUS) { |
2768 | dev_dbg(di->dev, "not a standard host, returning\n"); | 2771 | dev_dbg(di->dev, "not a standard host, returning\n"); |
2769 | return NOTIFY_DONE; | 2772 | return NOTIFY_DONE; |