From ebb3f320edcc6c4665a71ea060ef2ce6a83402b0 Mon Sep 17 00:00:00 2001 From: merge Date: Mon, 8 Dec 2008 22:50:52 +0000 Subject: MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-fix-s3c2410_ts-fifo-allocation-1228776491 pending-tracking-hist top was MERGE-via-stable-tracking-fix-s3c2410_ts-fifo-allocation-1228776491 / a85a8a282939b4f6800081f67e1d568e0b97bd7a ... parent commitmessage: From: merge MERGE-via-stable-tracking-hist-fix-s3c2410_ts-fifo-allocation stable-tracking-hist top was fix-s3c2410_ts-fifo-allocation / 56a57ba0d4c1d60869250d5f89fae61544f01012 ... parent commitmessage: From: Nelson Castillo Fix s3c2410_ts FIFO allocation When I added the FIFO improving the interrupts handlers I introduced a bug. The FIFO is allocated after the interrupts are requested. This makes the kernel crash if the touchscreen generates activity before the allocation takes place. This patch fixes the bug. I reproduced it and tested the fix in a GTA02. - Fix bug - Fix a typo Reported-by: Andy Green Signed-off-by: Nelson Castillo --- include/linux/mfd/pcf50633/core.h | 7 ++++++- include/linux/mfd/pcf50633/mbc.h | 13 +++++++++++++ include/linux/ts_filter.h | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h index bf107d3794e..4ee3f527172 100644 --- a/include/linux/mfd/pcf50633/core.h +++ b/include/linux/mfd/pcf50633/core.h @@ -34,6 +34,8 @@ struct pcf50633_platform_data { char **batteries; int num_batteries; + int good_main_battery_adc_threshold; + /* Callbacks */ void (*probe_done)(struct pcf50633 *); void (*mbc_event_callback)(struct pcf50633 *, int); @@ -78,6 +80,7 @@ int pcf50633_reg_clear_bits(struct pcf50633 *pcf, u8 reg, u8 bits); #define PCF50633_REG_INT3M 0x09 #define PCF50633_REG_INT4M 0x0a #define PCF50633_REG_INT5M 0x0b +#define PCF50633_REG_OOSHDWN 0x0c enum { /* Chip IRQs */ @@ -122,8 +125,10 @@ enum { PCF50633_IRQ_HCLDOPWRFAIL, PCF50633_IRQ_HCLDOOVL, - /* Always last */ + /* Always last of real IRQs */ PCF50633_NUM_IRQ, + /* fake IRQ */ + PCF50633_ABOUT_TO_INCREASE_POWER }; struct pcf50633 { diff --git a/include/linux/mfd/pcf50633/mbc.h b/include/linux/mfd/pcf50633/mbc.h index 9a7938ad132..a1cd44957ac 100644 --- a/include/linux/mfd/pcf50633/mbc.h +++ b/include/linux/mfd/pcf50633/mbc.h @@ -15,6 +15,7 @@ #include +#define PCF50633_REG_BVMCTL 0x19 #define PCF50633_REG_MBCC1 0x43 #define PCF50633_REG_MBCC2 0x44 #define PCF50633_REG_MBCC3 0x45 @@ -122,6 +123,18 @@ struct pcf50633; void pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma); +enum pcf50633_power_avail { + PCF50633_PA_DEAD_BATTERY_ONLY, + PCF50633_PA_LIVE_BATTERY_ONLY, + PCF50633_PA_ADAPTER, + PCF50633_PA_USB_100mA_AND_LIVE_BATTERY, + PCF50633_PA_USB_100mA_AND_DEAD_BATTERY, + PCF50633_PA_USB_500mA, + PCF50633_PA_USB_1A +}; + +enum pcf50633_power_avail pcf50633_check_power_available(struct pcf50633 *pcf); + struct pcf50633_mbc { int adapter_active; int adapter_online; diff --git a/include/linux/ts_filter.h b/include/linux/ts_filter.h index bfb8a221964..715f1badbf4 100644 --- a/include/linux/ts_filter.h +++ b/include/linux/ts_filter.h @@ -8,7 +8,7 @@ */ #define MAX_TS_FILTER_CHAIN 4 /* max filters you can chain up */ -#define MAX_TS_FILTER_COORDS 3 /* Y, Y and Z (pressure) */ +#define MAX_TS_FILTER_COORDS 3 /* X, Y and Z (pressure) */ struct ts_filter; -- cgit v1.2.3