aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorHolger Freyther <zecke@openmoko.org>2008-11-19 17:09:53 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:53 +0000
commit7253ddeaa06c4b17ac36ebea9fe09979e13bc7ec (patch)
tree0798c983255405cd70f024598bf8d223e88447d9 /drivers/i2c
parent91f495bb69a8bd8f5f6619bd433bf73537ac447d (diff)
From c221bb27c8e22daa451e26353140777223d397d2 Mon Sep 17 00:00:00 2001
Subject: [PATCH] [pcf50633] Report more events to userspace using the default callback Signed-Off-By: Holger Freyther <zecke@openmoko.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/chips/pcf50633.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
index 4be6cd328ad..ead4273b17f 100644
--- a/drivers/i2c/chips/pcf50633.c
+++ b/drivers/i2c/chips/pcf50633.c
@@ -1036,25 +1036,35 @@ static void pcf50633_work(struct work_struct *work)
* this is really "battery not pulling current" -- it can
* appear with no battery attached
*/
- /* FIXME: signal this to userspace */
+ if (pcf->pdata->cb)
+ pcf->pdata->cb(&pcf->client.dev,
+ PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
}
if (pcfirq[2] & PCF50633_INT3_THLIMON) {
DEBUGPC("THLIMON ");
pcf->flags |= PCF50633_F_CHG_PROT;
- /* FIXME: signal this to userspace */
+ if (pcf->pdata->cb)
+ pcf->pdata->cb(&pcf->client.dev,
+ PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
}
if (pcfirq[2] & PCF50633_INT3_THLIMOFF) {
DEBUGPC("THLIMOFF ");
pcf->flags &= ~PCF50633_F_CHG_PROT;
- /* FIXME: signal this to userspace */
+ if (pcf->pdata->cb)
+ pcf->pdata->cb(&pcf->client.dev,
+ PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
}
if (pcfirq[2] & PCF50633_INT3_USBLIMON) {
DEBUGPC("USBLIMON ");
- /* FIXME: signal this to userspace */
+ if (pcf->pdata->cb)
+ pcf->pdata->cb(&pcf->client.dev,
+ PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
}
if (pcfirq[2] & PCF50633_INT3_USBLIMOFF) {
DEBUGPC("USBLIMOFF ");
- /* FIXME: signal this to userspace */
+ if (pcf->pdata->cb)
+ pcf->pdata->cb(&pcf->client.dev,
+ PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
}
if (pcfirq[2] & PCF50633_INT3_ADCRDY) {
/* ADC result ready */