diff --git a/kernel-2.6.33/arch/arm/mach-pxa/g900/g900.c b/kernel-2.6.33/arch/arm/mach-pxa/g900/g900.c old mode 100644 new mode 100755 index 397d3a07..eb7d30eb --- a/kernel-2.6.33/arch/arm/mach-pxa/g900/g900.c +++ b/kernel-2.6.33/arch/arm/mach-pxa/g900/g900.c @@ -212,7 +212,6 @@ GPIO79_PSKTSEL //mb /****** TouchScreen for AK4183 Device ********/ /***********************************************/ - static int ts_get_pendown_state(void) { //printk(KERN_INFO "\t >>> %s <<< \n", __FUNCTION__); @@ -232,7 +231,8 @@ struct ak4183_platform_data ak4183_info = { .model = 4183, .get_pendown_state = ts_get_pendown_state, .init_platform_hw = ts_init, - .x_plate_ohms = 8000, + .x_plate_ohms = 248, + .y_plate_ohms = 516, // .clear_penirq = true, }; @@ -468,7 +468,7 @@ struct libertas_spi_platform_data g900_libertas_pdata = { static struct spi_board_info g900_spi_devices[] __initdata = { { .modalias = "libertas_spi", - .max_speed_hz = 13000000, + .max_speed_hz = 12000000, /*MAX 13000000*/ .bus_num = 3, .irq = gpio_to_irq(G900_WIFI_IRQ), .chip_select = 0, @@ -477,7 +477,7 @@ static struct spi_board_info g900_spi_devices[] __initdata = { }, { .modalias = "finderprint_sensor", - .max_speed_hz = 13000000, + .max_speed_hz = 8000000, .bus_num = 2, .irq = gpio_to_irq(FP_IRQ), .chip_select = 0, diff --git a/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_buttons.c b/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_buttons.c index fb0755c5..38f04de2 100755 --- a/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_buttons.c +++ b/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_buttons.c @@ -20,7 +20,6 @@ #include #include -#define GET_GPIO(gpio) (GPLR(gpio) & GPIO_bit(gpio)) #ifdef CONFIG_SWITCH_GPIO diff --git a/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_leds.c b/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_leds.c index 1e5d8ae1..515f7d9e 100755 --- a/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_leds.c +++ b/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_leds.c @@ -170,7 +170,7 @@ static struct platform_device g900_lcd_backlight = { &g900_gpio_leds, &g900_lcd_backlight, #ifdef CONFIG_ANDROID_TIMED_GPIO - &g900_timed_gpio, + //&g900_timed_gpio, /* BUG !*/ #endif }; diff --git a/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_msm6280.c b/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_msm6280.c index fee2be61..7626c772 100755 --- a/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_msm6280.c +++ b/kernel-2.6.33/arch/arm/mach-pxa/g900/g900_msm6280.c @@ -113,23 +113,17 @@ static int g900_power_get_property(struct power_supply *psy, { int ret = 0; - - dbprintk("MSM6280:g900_power_get_property %d\n",prop); - switch (prop) { case POWER_SUPPLY_PROP_CAPACITY: - dbprintk("MSM6280:POWER_SUPPLY_PROP_CAPACITY\n"); val->intval = p_BATT_CAPACITY; break; case POWER_SUPPLY_PROP_TECHNOLOGY: /* All our batteries are Li-ions (right?)*/ - dbprintk("MSM6280:POWER_SUPPLY_PROP_TECHNOLOGY\n"); val->intval = POWER_SUPPLY_TECHNOLOGY_LION; break; case POWER_SUPPLY_PROP_STATUS: - dbprintk("MSM6280:POWER_SUPPLY_PROP_STATUS\n"); if (p_AC_POWER > 0 && p_BATT_CAPACITY <= 99) val->intval = POWER_SUPPLY_STATUS_CHARGING; else if (p_AC_POWER == 1 && p_BATT_CAPACITY > 99) @@ -145,10 +139,15 @@ static int g900_power_get_property(struct power_supply *psy, }else{ val->intval = 0; } - dbprintk("MSM6280:POWER_SUPPLY_PROP_ONLINE AC power = %d, ans = %d \n",p_AC_POWER,val->intval); }else if(psy->type == POWER_SUPPLY_TYPE_USB) { /* USB on/offline */ - val->intval = 0; /* TODO!!! */ - dbprintk("MSM6280:POWER_SUPPLY_PROP_ONLINE USB = %d \n",val->intval); + + /* + 40 USB detect IRQ + 41 USB_P2_7(Client = 1, host =0(up 75,93) ) + */ + + + val->intval =0 ;// (GPIO41_USB_MODE ? 1 : 0); /* TODO!!! */ }else dbprintk("MSM6280:POWER_SUPPLY_PROP_ONLINE type = %d = %d \n",psy->type,val->intval); @@ -157,62 +156,38 @@ static int g900_power_get_property(struct power_supply *psy, break; -#if 0 #define VOLTAGE_MIN 3635000 /* todo */ #define VOLTAGE_MAX 4158000 /* todo */ -#define VOLTAGE_STEP 5230 /* todo */ - +#define VOLTAGE_STEP ((VOLTAGE_MAX - VOLTAGE_MIN)/100) + + case POWER_SUPPLY_PROP_BATT_VOL: + val->intval = (p_BATT_CAPACITY * VOLTAGE_STEP ) + VOLTAGE_MIN; //fake !!! percent math + break; + case POWER_SUPPLY_PROP_BATT_TEMP: + val->intval = 27; /// fake !!! + break; + case POWER_SUPPLY_PROP_PRESENT: + val->intval = 0; + break; + case POWER_SUPPLY_PROP_HEALTH: + val->intval = 1; + break; + +#if 0 case POWER_SUPPLY_PROP_VOLTAGE_MIN: /* lowest measured value in uV */ - dbprintk("MSM6280:POWER_SUPPLY_PROP_VOLTAGE_MIN\n"); val->intval = VOLTAGE_MIN; break; case POWER_SUPPLY_PROP_VOLTAGE_MAX: /* highest measured value in uV */ - dbprintk("MSM6280:POWER_SUPPLY_PROP_VOLTAGE_MAX\n"); val->intval = VOLTAGE_MAX; break; - - - /*mV*/ - case POWER_SUPPLY_PROP_VOLTAGE_NOW: - dbprintk("MSM6280:POWER_SUPPLY_PROP_VOLTAGE_NOW\n"); - val->intval = (p_BATT_CAPACITY * VOLTAGE_STEP ) + VOLTAGE_MIN; - break; - - case POWER_SUPPLY_PROP_BATT_VOL: - dbprintk("MSM6280:POWER_SUPPLY_PROP_BATT_VOL\n"); - val->intval = (p_BATT_CAPACITY * VOLTAGE_STEP ) + VOLTAGE_MIN; - break; - - /* uA */ - case POWER_SUPPLY_PROP_CURRENT_NOW: - - dbprintk("MSM6280:POWER_SUPPLY_PROP_CURRENT_NOW\n"); - val->intval = 10000 ; /* TODO!!! */ - /* value is expected to be in uA */ - break; - case POWER_SUPPLY_PROP_TEMP: - dbprintk("MSM6280:POWER_SUPPLY_PROP_TEMP\n"); - val->intval = 10; - break; - case POWER_SUPPLY_PROP_BATT_TEMP: - dbprintk("MSM6280:POWER_SUPPLY_PROP_BATT_TEMP\n"); - val->intval = 27; - break; - - case POWER_SUPPLY_PROP_PRESENT: - dbprintk("MSM6280:POWER_SUPPLY_PROP_PRESENT\n"); - val->intval = 1; - break; - - case POWER_SUPPLY_PROP_HEALTH: - dbprintk("MSM6280:POWER_SUPPLY_PROP_HEALTH\n"); - val->intval = 1; - break; + + case POWER_SUPPLY_PROP_VOLTAGE_NOW: + val->intval = (p_BATT_CAPACITY * VOLTAGE_STEP ) + VOLTAGE_MIN; /*mV*/ //fake !!! percent math + break; #endif default: ret = -EINVAL; - dbprintk("MSM6280:default %d\n",prop); } return ret; @@ -228,18 +203,15 @@ static enum power_supply_property g900_power_battery_props[] = { POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_TECHNOLOGY, POWER_SUPPLY_PROP_STATUS, + POWER_SUPPLY_PROP_PRESENT, + POWER_SUPPLY_PROP_HEALTH, + POWER_SUPPLY_PROP_BATT_VOL, + POWER_SUPPLY_PROP_BATT_TEMP, + #if 0 POWER_SUPPLY_PROP_VOLTAGE_MIN, POWER_SUPPLY_PROP_VOLTAGE_MAX, POWER_SUPPLY_PROP_VOLTAGE_NOW, - POWER_SUPPLY_PROP_CURRENT_NOW, - POWER_SUPPLY_PROP_TEMP, - - POWER_SUPPLY_PROP_PRESENT, - POWER_SUPPLY_PROP_HEALTH, - - POWER_SUPPLY_PROP_BATT_VOL, - POWER_SUPPLY_PROP_BATT_TEMP, #endif }; @@ -490,7 +462,7 @@ static void receive_chars(struct uart_port *up) { struct tty_struct *tty = up->state->port.tty; - unsigned int ch,atcnt; + unsigned int ch,atcnt,i=0; u16 head,tail; char atbuf[256]; // unsigned long flags; @@ -514,13 +486,16 @@ receive_chars(struct uart_port *up) atcnt=0; atbuf[0] = 0; - while(head != tail) + while((head != tail)) { if(tail >= RX_AT_BUF){ tail = 0x00; } + if(i >= RX_AT_BUF) break; + ch =*((u8*)dpram_data.data_virt+tail+0x04); tail++; + i++; up->icount.rx++; if (!uart_handle_sysrq_char(up, c)) diff --git a/kernel-2.6.33/arch/arm/mach-pxa/include/mach/g900-gpio.h b/kernel-2.6.33/arch/arm/mach-pxa/include/mach/g900-gpio.h index 1078f31a..a7f2a004 100755 --- a/kernel-2.6.33/arch/arm/mach-pxa/include/mach/g900-gpio.h +++ b/kernel-2.6.33/arch/arm/mach-pxa/include/mach/g900-gpio.h @@ -6,6 +6,7 @@ #ifndef _G900_GPIO_H_ #define _G900_GPIO_H_ +#define GET_GPIO(gpio) (GPLR(gpio) & GPIO_bit(gpio)) #define GPIO_G900_AC97_BITCLK 28 #define GPIO_G900_AC97_SDATA_IN 29 @@ -36,6 +37,7 @@ /* USB */ #define GPIO40_nUSB_DETECT 40 +#define GPIO41_USB_MODE 41 /* Client = 1, host =0 */ #define GPIO75_USB_ENABLE 75 #define GPIO93_USB_ENABLE 93 /* Finderprint sensor */ diff --git a/kernel-2.6.33/drivers/input/touchscreen/ak4183.c b/kernel-2.6.33/drivers/input/touchscreen/ak4183.c index 0426b0ad..60d1d4f4 100755 --- a/kernel-2.6.33/drivers/input/touchscreen/ak4183.c +++ b/kernel-2.6.33/drivers/input/touchscreen/ak4183.c @@ -30,40 +30,63 @@ #include #include -#define TS_POLL_DELAY 1 /* ms delay between samples */ -#define TS_POLL_PERIOD 1 /* ms delay between samples */ +#define TS_POLL_DELAY 10 /* us delay between samples */ +#define TS_POLL_PERIOD 100 /* us delay between samples */ +#define AK4183_12BIT 1 /* 12 bit mode */ -#define AK4183_MEASURE_X 0xc0 -#define AK4183_MEASURE_Y 0xd0 -#define AK4183_MEASURE_Z1 0xE0 -#define AK4183_MEASURE_Z2 0xF0 -#define AK4183_POWER_OFF_IRQ_EN 0x00 -#define AK4183_ADC_ON_IRQ_DIS0 (0x1 << 2) +#define devdbg(x...) printk(x) + + +#define AK4183_BIT_S (0x1 << 7) +#define AK4183_BIT_A2 (0x1 << 6) +#define AK4183_BIT_A1 (0x1 << 5) +#define AK4183_BIT_A0 (0x1 << 4) +#define AK4183_BIT_PD0 (0x1 << 2) +#define AK4183_BIT_MODE (0x1 << 1) -#define AK4183_12BIT 0x02 #define MAX_12BIT ((1 << 12) - 1) -#define ADC_ON_12BIT 0x02 -//(AK4183_12BIT | AK4183_ADC_ON_IRQ_DIS0) - -#define READ_Y (ADC_ON_12BIT | AK4183_MEASURE_Y) -#define READ_Z1 (ADC_ON_12BIT | AK4183_MEASURE_Z1) -#define READ_Z2 (ADC_ON_12BIT | AK4183_MEASURE_Z2) -#define READ_X (ADC_ON_12BIT | AK4183_MEASURE_X) -#define PWRDOWN (AK4183_12BIT | AK4183_POWER_OFF_IRQ_EN) +#if AK4183_12BIT +#define ADC_ON_12BIT 0 +#else +#define ADC_ON_12BIT AK4183_BIT_MODE +#endif +#define READ_X ( ADC_ON_12BIT | AK4183_BIT_S | AK4183_BIT_A2 ) +#define READ_Y ( ADC_ON_12BIT | AK4183_BIT_S | AK4183_BIT_A0 | AK4183_BIT_A2 ) +#define READ_Z1 ( ADC_ON_12BIT | AK4183_BIT_S | AK4183_BIT_A1 | AK4183_BIT_A2 ) +#define READ_Z2 ( ADC_ON_12BIT | AK4183_BIT_S | AK4183_BIT_A0 | AK4183_BIT_A1 | AK4183_BIT_A2 ) + +#define READ_AX ( ADC_ON_12BIT | AK4183_BIT_S ) +#define READ_AY ( ADC_ON_12BIT | AK4183_BIT_S | AK4183_BIT_A0 ) +#define READ_AXY ( ADC_ON_12BIT | AK4183_BIT_S | AK4183_BIT_A1 ) + +#define PWRDOWN ( AK4183_BIT_S | AK4183_BIT_PD0 ) +/* +BIT Name Function +7 S Start Bit. “1” Accelerate and Axis Command, “0”: Sleep mode Command +6-4 A2-A0 Channel Selection Bits. Analog inputs to the A/D converter and the activated driver switches are + selected. Please see the following table for the detail. +3 X1 Don’t care +2 PD0 Power down bit (refer to power-down control) +1 MODE Resolution of A/D converter. “0”: 12 bit output “1”: 8 bit output +0 X2 Don’t care + + +*/ struct ts_event { u16 x; u16 y; u16 z1, z2; + u32 prs; }; struct ak4183 { @@ -75,6 +98,7 @@ struct ak4183 { u16 model; u16 x_plate_ohms; + u16 y_plate_ohms; bool pendown; int irq; @@ -92,18 +116,21 @@ struct ak4183 { wince CalibrationData 2174,1990 563,3553 700,465 3463,506 3440,3547 - +wince hex +CalibrationData 0x87E,0x7C6 0x233,0xDE1 0x2BC,0x1D1 0xD87,0x1FA 0xD70,0xDDB +ñåðåäèíà, âåðõ ëåâî,íèç ëåâî,íèç ïðàâî, âåðõ ïðàâî */ -static int abs_x[3] = {0x0110, 0x0dc0, 20}; +static int abs_x[3] = {0x0110, 0x0dc0, 1}; module_param_array(abs_x, int, NULL, 0); MODULE_PARM_DESC(abs_x, "Touchscreen absolute X min, max, fuzz"); -static int abs_y[3] = {0x0ee0, 0x0080, 20}; +static int abs_y[3] = {0x0ee0, 0x0080, 1}; module_param_array(abs_y, int, NULL, 0); MODULE_PARM_DESC(abs_y, "Touchscreen absolute Y min, max, fuzz"); -static int abs_p[3] = {0, 40, 4}; + +static int abs_p[3] = {0, MAX_12BIT, 0}; module_param_array(abs_p, int, NULL, 0); MODULE_PARM_DESC(abs_p, "Touchscreen absolute Pressure min, max, fuzz"); @@ -125,52 +152,78 @@ static inline int ak4183_xfer(struct ak4183 *tsc, u8 cmd) */ val = swab16(data) >> 4; - dev_dbg(&tsc->client->dev, "data: 0x%x, val: 0x%x\n", data, val); + devdbg("data: 0x%x, val: 0x%x\n", data, val); return val; } static void ak4183_read_values(struct ak4183 *tsc, struct ts_event *tc) { - /* y- still on; turn on only y+ (and ADC) */ - tc->y = ak4183_xfer(tsc, READ_Y); + + /* y- still on; turn on only y+ (and ADC) */ + tc->y = ak4183_xfer(tsc, READ_Y); /* turn y- off, x+ on, then leave in lowpower */ - tc->x = ak4183_xfer(tsc, READ_X); + tc->x = ak4183_xfer(tsc, READ_X); /* turn y+ off, x- on; we'll use formula #1 */ tc->z1 = ak4183_xfer(tsc, READ_Z1); tc->z2 = ak4183_xfer(tsc, READ_Z2); - /* Prepare for next touch reading - power down ADC, enable PENIRQ */ - //ak4183_xfer(tsc, PWRDOWN); -} +/** calcilate pressure resistance **/ -static u32 ak4183_calculate_pressure(struct ak4183 *tsc, struct ts_event *tc) -{ - u32 rt = 0; + tc->prs = 0; /* range filtering */ if (tc->x == MAX_12BIT) tc->x = 0; + + /* compute touch pressure resistance using equation #1 */ +#if 1 if (likely(tc->x && tc->z1)) { - /* compute touch pressure resistance using equation #1 */ - rt = tc->z2 - tc->z1; - rt *= tc->x; - rt *= tsc->x_plate_ohms; - rt /= tc->z1; - rt = (rt + 2047) >> 12; - } - return rt; + + //tc->prs = tc->z2 - tc->z1; + tc->prs = (tc->z2 / tc->z1 - 1); + tc->prs *= (tc->x/256); + tc->prs *= tsc->x_plate_ohms; + tc->prs /= tc->z1; + //tc->prs = (tc->prs + 2047) >> 12; + + }else + tc->prs = 0; +#else + if(likely(tc->x && tc->z1)) { + //tc->prs = (tsc->x_plate_ohms * tc->x * (tc->z2 - tc->z1) ) / (4096 * tc->z1); // 12 áèò + tc->prs = tsc->x_plate_ohms; + tc->prs *= tc->x; + tc->prs /= 4096; + tc->prs *= ((4096/tc->z1) - 1); + tc->prs -= tsc->y_plate_ohms * (1 - (tc->y / 4096)); + } +#endif + +/* +Rtouch = (Rxplate) * (Xposition/4096) * [(Z2/Z1) – 1] +Rtouch = (Rxplate*Xposition/4096)*[(4096/Z1) – 1] – Ryplate*[1 – (Yposition/4096)] +*/ + + + printk(KERN_INFO "ts: calc X = 0x%04x Y = 0x%04x Z1 = 0x%04x, Z2 = 0x%04x, PRS = 0x%04x\n", tc->x, tc->y, tc->z1, tc->z2, tc->prs); + + + /* Prepare for next touch reading - power down ADC, enable PENIRQ */ + //ak4183_xfer(tsc, PWRDOWN); } + + static void ak4183_send_up_event(struct ak4183 *tsc) { struct input_dev *input = tsc->input; - dev_dbg(&tsc->client->dev, "UP\n"); + devdbg("ak4183: send_up_event\n"); input_report_key(input, BTN_TOUCH, 0); input_report_abs(input, ABS_PRESSURE, 0); @@ -179,11 +232,8 @@ static void ak4183_send_up_event(struct ak4183 *tsc) static void ak4183_work(struct work_struct *work) { - struct ak4183 *ts = - container_of(to_delayed_work(work), struct ak4183, work); + struct ak4183 *ts = container_of(to_delayed_work(work), struct ak4183, work); struct ts_event tc; - u32 rt; - /* * NOTE: We can't rely on the pressure to determine the pen down * state, even though this controller has a pressure sensor. @@ -198,33 +248,33 @@ static void ak4183_work(struct work_struct *work) */ if (ts->get_pendown_state) { if (unlikely(!ts->get_pendown_state())) { + devdbg("ak4183: pendown_state = UP\n"); ak4183_send_up_event(ts); ts->pendown = false; goto out; } - dev_dbg(&ts->client->dev, "pen is still down\n"); + devdbg("ak4183: pen is still down\n"); } ak4183_read_values(ts, &tc); - rt = ak4183_calculate_pressure(ts, &tc); - if (rt > MAX_12BIT) { + if (tc.prs > MAX_12BIT) { /* * Sample found inconsistent by debouncing or pressure is * beyond the maximum. Don't report it to user space, * repeat at least once more the measurement. */ - dev_dbg(&ts->client->dev, "ignored pressure %d\n", rt); + devdbg("ak4183: ignored pressure %d\n", tc.prs); goto out; } - if (rt) { + if (tc.prs) { struct input_dev *input = ts->input; if (!ts->pendown) { - dev_dbg(&ts->client->dev, "DOWN\n"); + devdbg("ak4183: DOWN\n"); input_report_key(input, BTN_TOUCH, 1); ts->pendown = true; @@ -232,10 +282,10 @@ static void ak4183_work(struct work_struct *work) input_report_abs(input, ABS_X, tc.x); input_report_abs(input, ABS_Y, tc.y); - input_report_abs(input, ABS_PRESSURE, rt); + input_report_abs(input, ABS_PRESSURE, tc.prs); input_sync(input); - //printk(KERN_INFO "ts: X=0x%04x Y=0x%04x P=0x%04x\n", tc.x, tc.y, rt); + } else if (!ts->get_pendown_state && ts->pendown) { @@ -251,7 +301,7 @@ static void ak4183_work(struct work_struct *work) out: if (ts->pendown) schedule_delayed_work(&ts->work, - msecs_to_jiffies(TS_POLL_PERIOD)); + usecs_to_jiffies(TS_POLL_PERIOD)); else enable_irq(ts->irq); } @@ -263,7 +313,7 @@ static irqreturn_t ak4183_irq(int irq, void *handle) if (!ts->get_pendown_state || likely(ts->get_pendown_state())) { disable_irq_nosync(ts->irq); schedule_delayed_work(&ts->work, - msecs_to_jiffies(TS_POLL_DELAY)); + usecs_to_jiffies(TS_POLL_DELAY)); } if (ts->clear_penirq) @@ -271,7 +321,7 @@ static irqreturn_t ak4183_irq(int irq, void *handle) ts->clear_penirq(); } schedule_delayed_work(&ts->work, - msecs_to_jiffies(TS_POLL_DELAY)); + usecs_to_jiffies(TS_POLL_DELAY)); return IRQ_HANDLED; } @@ -344,8 +394,8 @@ static int __devinit ak4183_probe(struct i2c_client *client, input_set_abs_params(input_dev, ABS_X, abs_x[0], abs_x[1], abs_x[2], 0); // input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0); input_set_abs_params(input_dev, ABS_Y, abs_y[0], abs_y[1], abs_y[2], 0); -// input_set_abs_params(input_dev, ABS_PRESSURE, abs_p[0], abs_p[1], abs_p[2], 0); - input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0); + input_set_abs_params(input_dev, ABS_PRESSURE, abs_p[0], abs_p[1], abs_p[2], 0); +// input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0); if (pdata->init_platform_hw) pdata->init_platform_hw(); diff --git a/kernel-2.6.33/include/linux/i2c/ak4183.h b/kernel-2.6.33/include/linux/i2c/ak4183.h old mode 100644 new mode 100755 index ecdacdf1..b972c560 --- a/kernel-2.6.33/include/linux/i2c/ak4183.h +++ b/kernel-2.6.33/include/linux/i2c/ak4183.h @@ -6,6 +6,7 @@ struct ak4183_platform_data { u16 model; u16 x_plate_ohms; + u16 y_plate_ohms; int (*get_pendown_state)(void); void (*clear_penirq)(void); /* If needed, clear 2nd level diff --git a/kernel-2.6.33/kernel/irq/manage.c b/kernel-2.6.33/kernel/irq/manage.c old mode 100644 new mode 100755 index eb6078ca..b6e85b3f --- a/kernel-2.6.33/kernel/irq/manage.c +++ b/kernel-2.6.33/kernel/irq/manage.c @@ -271,7 +271,9 @@ void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume) switch (desc->depth) { case 0: err_out: + /* WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n", irq); + */ break; case 1: { unsigned int status = desc->status & ~IRQ_DISABLED; diff --git a/ramfs-android/init.rc b/ramfs-android/init.rc index c479628b..17773b9f 100755 --- a/ramfs-android/init.rc +++ b/ramfs-android/init.rc @@ -8,7 +8,7 @@ loglevel 3 # setup the global environment export PATH /sbin:/system/sbin:/system/bin:/system/xbin export LD_LIBRARY_PATH /system/lib - export ANDROID_BOOTLOGO 0 + export ANDROID_BOOTLOGO 1 export ANDROID_ROOT /system export ANDROID_ASSETS /system/app export ANDROID_DATA /data @@ -220,7 +220,7 @@ on boot setprop wifi.interface "wlan0" setprop wlan.driver.status "ok" setprop wlan.interface "wlan0" -# setprop wifi.interface "/data/system/wpa_supplicant/wlan0" + # SDCARD hack setprop EXTERNAL_STORAGE_STATE mounted @@ -251,7 +251,7 @@ on boot chmod 0777 /sys/power/wake_unlock -# chown system system /sys/class/timed_output/vibrator/enable + chown system system /sys/class/timed_output/vibrator/enable chown system system /sys/class/leds/keyboard-backlight/brightness chown system system /sys/class/leds/lcd-backlight/brightness chown system system /sys/class/leds/button-backlight/brightness @@ -290,8 +290,8 @@ service usb-ether-ifup /system/bin/ifconfig usb0 192.168.1.2 -#service usb-ether-route /system/bin/route add default gw 192.168.1.100 dev usb0 -# oneshot +service usb-ether-route /system/bin/route add default gw 192.168.1.1 dev usb0 + oneshot ## Daemon processes to be run by init. ## @@ -401,9 +401,6 @@ service keystore /system/bin/keystore group keystore socket keystore stream 666 - -#service dhcpcd /system/bin/logwrapper /system/bin/dhcpcd -d wlan0 -#service dhcpcd /system/bin/dhcpcd -ABKL -f /system/etc/dhcpcd/dhcpcd.conf -d wlan0 service dhcpcd /system/bin/dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf -d wlan0 disabled oneshot @@ -424,8 +421,6 @@ service alsa-init /system/bin/alsa_ctl init oneshot user root group root -# onstart restart alsa-set -# onrestart restart alsa-set service alsa-set /system/bin/alsa_amixer sset "Master" "100,0" "on" oneshot