[ar71xx] create firmware image for the Ubiquiti LS-SR71 board
[openwrt/svn-archive/archive.git] / target / linux / s3c24xx / patches-2.6.26 / 1200-From-c221bb27c8e22daa451e26353140777223d397d2-Mon-Se.patch
1 From 1e8163901ed89e4849a1c9e304d140e043cc2b9f Mon Sep 17 00:00:00 2001
2 From: Holger Freyther <zecke@openmoko.org>
3 Date: Fri, 25 Jul 2008 23:06:17 +0100
4 Subject: [PATCH] From c221bb27c8e22daa451e26353140777223d397d2 Mon Sep 17 00:00:00 2001
5 Subject: [PATCH] [pcf50633] Report more events to userspace using the default callback
6
7 Signed-Off-By: Holger Freyther <zecke@openmoko.org>
8 ---
9 drivers/i2c/chips/pcf50633.c | 20 +++++++++++++++-----
10 include/linux/pcf506xx.h | 1 +
11 2 files changed, 16 insertions(+), 5 deletions(-)
12
13 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
14 index 4be6cd3..ead4273 100644
15 --- a/drivers/i2c/chips/pcf50633.c
16 +++ b/drivers/i2c/chips/pcf50633.c
17 @@ -1036,25 +1036,35 @@ static void pcf50633_work(struct work_struct *work)
18 * this is really "battery not pulling current" -- it can
19 * appear with no battery attached
20 */
21 - /* FIXME: signal this to userspace */
22 + if (pcf->pdata->cb)
23 + pcf->pdata->cb(&pcf->client.dev,
24 + PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
25 }
26 if (pcfirq[2] & PCF50633_INT3_THLIMON) {
27 DEBUGPC("THLIMON ");
28 pcf->flags |= PCF50633_F_CHG_PROT;
29 - /* FIXME: signal this to userspace */
30 + if (pcf->pdata->cb)
31 + pcf->pdata->cb(&pcf->client.dev,
32 + PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
33 }
34 if (pcfirq[2] & PCF50633_INT3_THLIMOFF) {
35 DEBUGPC("THLIMOFF ");
36 pcf->flags &= ~PCF50633_F_CHG_PROT;
37 - /* FIXME: signal this to userspace */
38 + if (pcf->pdata->cb)
39 + pcf->pdata->cb(&pcf->client.dev,
40 + PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
41 }
42 if (pcfirq[2] & PCF50633_INT3_USBLIMON) {
43 DEBUGPC("USBLIMON ");
44 - /* FIXME: signal this to userspace */
45 + if (pcf->pdata->cb)
46 + pcf->pdata->cb(&pcf->client.dev,
47 + PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
48 }
49 if (pcfirq[2] & PCF50633_INT3_USBLIMOFF) {
50 DEBUGPC("USBLIMOFF ");
51 - /* FIXME: signal this to userspace */
52 + if (pcf->pdata->cb)
53 + pcf->pdata->cb(&pcf->client.dev,
54 + PCF50633_FEAT_MBC, PMU_EVT_CHARGER_CHANGE);
55 }
56 if (pcfirq[2] & PCF50633_INT3_ADCRDY) {
57 /* ADC result ready */
58 diff --git a/include/linux/pcf506xx.h b/include/linux/pcf506xx.h
59 index a1365e0..459b160 100644
60 --- a/include/linux/pcf506xx.h
61 +++ b/include/linux/pcf506xx.h
62 @@ -23,6 +23,7 @@ enum pmu_event {
63 #endif
64 PMU_EVT_CHARGER_ACTIVE,
65 PMU_EVT_CHARGER_IDLE,
66 + PMU_EVT_CHARGER_CHANGE,
67 __NUM_PMU_EVTS
68 };
69
70 --
71 1.5.6.3
72