diff options
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 30 | ||||
-rw-r--r-- | drivers/input/touchscreen/corgi_ts.c | 3 | ||||
-rw-r--r-- | drivers/input/touchscreen/elo.c | 3 | ||||
-rw-r--r-- | drivers/input/touchscreen/gunze.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/h3600_ts_input.c | 9 | ||||
-rw-r--r-- | drivers/input/touchscreen/mtouch.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/penmount.c | 3 | ||||
-rw-r--r-- | drivers/input/touchscreen/touchright.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/touchwin.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/ucb1400_ts.c | 26 |
10 files changed, 47 insertions, 35 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 0a26e0663542..693e3b2a65a3 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -39,7 +39,8 @@ | |||
39 | /* | 39 | /* |
40 | * This code has been heavily tested on a Nokia 770, and lightly | 40 | * This code has been heavily tested on a Nokia 770, and lightly |
41 | * tested on other ads7846 devices (OSK/Mistral, Lubbock). | 41 | * tested on other ads7846 devices (OSK/Mistral, Lubbock). |
42 | * Support for ads7843 and ads7845 has only been stubbed in. | 42 | * Support for ads7843 tested on Atmel at91sam926x-EK. |
43 | * Support for ads7845 has only been stubbed in. | ||
43 | * | 44 | * |
44 | * IRQ handling needs a workaround because of a shortcoming in handling | 45 | * IRQ handling needs a workaround because of a shortcoming in handling |
45 | * edge triggered IRQs on some platforms like the OMAP1/2. These | 46 | * edge triggered IRQs on some platforms like the OMAP1/2. These |
@@ -246,18 +247,16 @@ static int ads7846_read12_ser(struct device *dev, unsigned command) | |||
246 | 247 | ||
247 | /* REVISIT: take a few more samples, and compare ... */ | 248 | /* REVISIT: take a few more samples, and compare ... */ |
248 | 249 | ||
249 | /* maybe off internal vREF */ | 250 | /* converter in low power mode & enable PENIRQ */ |
250 | if (use_internal) { | 251 | req->ref_off = PWRDOWN; |
251 | req->ref_off = REF_OFF; | 252 | req->xfer[4].tx_buf = &req->ref_off; |
252 | req->xfer[4].tx_buf = &req->ref_off; | 253 | req->xfer[4].len = 1; |
253 | req->xfer[4].len = 1; | 254 | spi_message_add_tail(&req->xfer[4], &req->msg); |
254 | spi_message_add_tail(&req->xfer[4], &req->msg); | 255 | |
255 | 256 | req->xfer[5].rx_buf = &req->scratch; | |
256 | req->xfer[5].rx_buf = &req->scratch; | 257 | req->xfer[5].len = 2; |
257 | req->xfer[5].len = 2; | 258 | CS_CHANGE(req->xfer[5]); |
258 | CS_CHANGE(req->xfer[5]); | 259 | spi_message_add_tail(&req->xfer[5], &req->msg); |
259 | spi_message_add_tail(&req->xfer[5], &req->msg); | ||
260 | } | ||
261 | 260 | ||
262 | ts->irq_disabled = 1; | 261 | ts->irq_disabled = 1; |
263 | disable_irq(spi->irq); | 262 | disable_irq(spi->irq); |
@@ -536,6 +535,9 @@ static void ads7846_rx(void *ads) | |||
536 | } else | 535 | } else |
537 | Rt = 0; | 536 | Rt = 0; |
538 | 537 | ||
538 | if (ts->model == 7843) | ||
539 | Rt = ts->pressure_max / 2; | ||
540 | |||
539 | /* Sample found inconsistent by debouncing or pressure is beyond | 541 | /* Sample found inconsistent by debouncing or pressure is beyond |
540 | * the maximum. Don't report it to user space, repeat at least | 542 | * the maximum. Don't report it to user space, repeat at least |
541 | * once more the measurement | 543 | * once more the measurement |
@@ -897,7 +899,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
897 | 899 | ||
898 | input_dev->name = "ADS784x Touchscreen"; | 900 | input_dev->name = "ADS784x Touchscreen"; |
899 | input_dev->phys = ts->phys; | 901 | input_dev->phys = ts->phys; |
900 | input_dev->cdev.dev = &spi->dev; | 902 | input_dev->dev.parent = &spi->dev; |
901 | 903 | ||
902 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 904 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
903 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 905 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index e2945582828e..e6a31d118786 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c | |||
@@ -300,8 +300,7 @@ static int __init corgits_probe(struct platform_device *pdev) | |||
300 | input_dev->id.vendor = 0x0001; | 300 | input_dev->id.vendor = 0x0001; |
301 | input_dev->id.product = 0x0002; | 301 | input_dev->id.product = 0x0002; |
302 | input_dev->id.version = 0x0100; | 302 | input_dev->id.version = 0x0100; |
303 | input_dev->cdev.dev = &pdev->dev; | 303 | input_dev->dev.parent = &pdev->dev; |
304 | input_dev->private = corgi_ts; | ||
305 | 304 | ||
306 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 305 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
307 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 306 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
diff --git a/drivers/input/touchscreen/elo.c b/drivers/input/touchscreen/elo.c index 9d61cd133d01..557d781719f1 100644 --- a/drivers/input/touchscreen/elo.c +++ b/drivers/input/touchscreen/elo.c | |||
@@ -312,14 +312,13 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv) | |||
312 | init_completion(&elo->cmd_done); | 312 | init_completion(&elo->cmd_done); |
313 | snprintf(elo->phys, sizeof(elo->phys), "%s/input0", serio->phys); | 313 | snprintf(elo->phys, sizeof(elo->phys), "%s/input0", serio->phys); |
314 | 314 | ||
315 | input_dev->private = elo; | ||
316 | input_dev->name = "Elo Serial TouchScreen"; | 315 | input_dev->name = "Elo Serial TouchScreen"; |
317 | input_dev->phys = elo->phys; | 316 | input_dev->phys = elo->phys; |
318 | input_dev->id.bustype = BUS_RS232; | 317 | input_dev->id.bustype = BUS_RS232; |
319 | input_dev->id.vendor = SERIO_ELO; | 318 | input_dev->id.vendor = SERIO_ELO; |
320 | input_dev->id.product = elo->id; | 319 | input_dev->id.product = elo->id; |
321 | input_dev->id.version = 0x0100; | 320 | input_dev->id.version = 0x0100; |
322 | input_dev->cdev.dev = &serio->dev; | 321 | input_dev->dev.parent = &serio->dev; |
323 | 322 | ||
324 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 323 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
325 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 324 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
diff --git a/drivers/input/touchscreen/gunze.c b/drivers/input/touchscreen/gunze.c index 9157eb148e84..39d602600d7c 100644 --- a/drivers/input/touchscreen/gunze.c +++ b/drivers/input/touchscreen/gunze.c | |||
@@ -130,13 +130,13 @@ static int gunze_connect(struct serio *serio, struct serio_driver *drv) | |||
130 | gunze->dev = input_dev; | 130 | gunze->dev = input_dev; |
131 | snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys); | 131 | snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys); |
132 | 132 | ||
133 | input_dev->private = gunze; | ||
134 | input_dev->name = "Gunze AHL-51S TouchScreen"; | 133 | input_dev->name = "Gunze AHL-51S TouchScreen"; |
135 | input_dev->phys = gunze->phys; | 134 | input_dev->phys = gunze->phys; |
136 | input_dev->id.bustype = BUS_RS232; | 135 | input_dev->id.bustype = BUS_RS232; |
137 | input_dev->id.vendor = SERIO_GUNZE; | 136 | input_dev->id.vendor = SERIO_GUNZE; |
138 | input_dev->id.product = 0x0051; | 137 | input_dev->id.product = 0x0051; |
139 | input_dev->id.version = 0x0100; | 138 | input_dev->id.version = 0x0100; |
139 | input_dev->dev.parent = &serio->dev; | ||
140 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 140 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
141 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 141 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
142 | input_set_abs_params(input_dev, ABS_X, 24, 1000, 0, 0); | 142 | input_set_abs_params(input_dev, ABS_X, 24, 1000, 0, 0); |
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c index c4116d4f64e7..09ed7803cb8f 100644 --- a/drivers/input/touchscreen/h3600_ts_input.c +++ b/drivers/input/touchscreen/h3600_ts_input.c | |||
@@ -147,7 +147,7 @@ enum flite_pwr { | |||
147 | unsigned int h3600_flite_power(struct input_dev *dev, enum flite_pwr pwr) | 147 | unsigned int h3600_flite_power(struct input_dev *dev, enum flite_pwr pwr) |
148 | { | 148 | { |
149 | unsigned char brightness = (pwr == FLITE_PWR_OFF) ? 0 : flite_brightness; | 149 | unsigned char brightness = (pwr == FLITE_PWR_OFF) ? 0 : flite_brightness; |
150 | struct h3600_dev *ts = dev->private; | 150 | struct h3600_dev *ts = input_get_drvdata(dev); |
151 | 151 | ||
152 | /* Must be in this order */ | 152 | /* Must be in this order */ |
153 | ts->serio->write(ts->serio, 1); | 153 | ts->serio->write(ts->serio, 1); |
@@ -260,7 +260,7 @@ static int h3600ts_event(struct input_dev *dev, unsigned int type, | |||
260 | unsigned int code, int value) | 260 | unsigned int code, int value) |
261 | { | 261 | { |
262 | #if 0 | 262 | #if 0 |
263 | struct h3600_dev *ts = dev->private; | 263 | struct h3600_dev *ts = input_get_drvdata(dev); |
264 | 264 | ||
265 | switch (type) { | 265 | switch (type) { |
266 | case EV_LED: { | 266 | case EV_LED: { |
@@ -367,8 +367,9 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv) | |||
367 | input_dev->id.vendor = SERIO_H3600; | 367 | input_dev->id.vendor = SERIO_H3600; |
368 | input_dev->id.product = 0x0666; /* FIXME !!! We can ask the hardware */ | 368 | input_dev->id.product = 0x0666; /* FIXME !!! We can ask the hardware */ |
369 | input_dev->id.version = 0x0100; | 369 | input_dev->id.version = 0x0100; |
370 | input_dev->cdev.dev = &serio->dev; | 370 | input_dev->dev.parent = &serio->dev; |
371 | input_dev->private = ts; | 371 | |
372 | input_set_drvdata(input_dev, ts); | ||
372 | 373 | ||
373 | input_dev->event = h3600ts_event; | 374 | input_dev->event = h3600ts_event; |
374 | 375 | ||
diff --git a/drivers/input/touchscreen/mtouch.c b/drivers/input/touchscreen/mtouch.c index c3c2d735d0ec..4ec3b1f940c8 100644 --- a/drivers/input/touchscreen/mtouch.c +++ b/drivers/input/touchscreen/mtouch.c | |||
@@ -144,13 +144,13 @@ static int mtouch_connect(struct serio *serio, struct serio_driver *drv) | |||
144 | mtouch->dev = input_dev; | 144 | mtouch->dev = input_dev; |
145 | snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys); | 145 | snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys); |
146 | 146 | ||
147 | input_dev->private = mtouch; | ||
148 | input_dev->name = "MicroTouch Serial TouchScreen"; | 147 | input_dev->name = "MicroTouch Serial TouchScreen"; |
149 | input_dev->phys = mtouch->phys; | 148 | input_dev->phys = mtouch->phys; |
150 | input_dev->id.bustype = BUS_RS232; | 149 | input_dev->id.bustype = BUS_RS232; |
151 | input_dev->id.vendor = SERIO_MICROTOUCH; | 150 | input_dev->id.vendor = SERIO_MICROTOUCH; |
152 | input_dev->id.product = 0; | 151 | input_dev->id.product = 0; |
153 | input_dev->id.version = 0x0100; | 152 | input_dev->id.version = 0x0100; |
153 | input_dev->dev.parent = &serio->dev; | ||
154 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 154 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
155 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 155 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
156 | input_set_abs_params(mtouch->dev, ABS_X, MTOUCH_MIN_XC, MTOUCH_MAX_XC, 0, 0); | 156 | input_set_abs_params(mtouch->dev, ABS_X, MTOUCH_MIN_XC, MTOUCH_MAX_XC, 0, 0); |
diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c index bd2767991ae9..f2c0d3c7149c 100644 --- a/drivers/input/touchscreen/penmount.c +++ b/drivers/input/touchscreen/penmount.c | |||
@@ -105,14 +105,13 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv) | |||
105 | pm->dev = input_dev; | 105 | pm->dev = input_dev; |
106 | snprintf(pm->phys, sizeof(pm->phys), "%s/input0", serio->phys); | 106 | snprintf(pm->phys, sizeof(pm->phys), "%s/input0", serio->phys); |
107 | 107 | ||
108 | input_dev->private = pm; | ||
109 | input_dev->name = "Penmount Serial TouchScreen"; | 108 | input_dev->name = "Penmount Serial TouchScreen"; |
110 | input_dev->phys = pm->phys; | 109 | input_dev->phys = pm->phys; |
111 | input_dev->id.bustype = BUS_RS232; | 110 | input_dev->id.bustype = BUS_RS232; |
112 | input_dev->id.vendor = SERIO_PENMOUNT; | 111 | input_dev->id.vendor = SERIO_PENMOUNT; |
113 | input_dev->id.product = 0; | 112 | input_dev->id.product = 0; |
114 | input_dev->id.version = 0x0100; | 113 | input_dev->id.version = 0x0100; |
115 | input_dev->cdev.dev = &serio->dev; | 114 | input_dev->dev.parent = &serio->dev; |
116 | 115 | ||
117 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 116 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
118 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 117 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
diff --git a/drivers/input/touchscreen/touchright.c b/drivers/input/touchscreen/touchright.c index 35ba46c6ad2d..3def7bb1df44 100644 --- a/drivers/input/touchscreen/touchright.c +++ b/drivers/input/touchscreen/touchright.c | |||
@@ -118,13 +118,13 @@ static int tr_connect(struct serio *serio, struct serio_driver *drv) | |||
118 | tr->dev = input_dev; | 118 | tr->dev = input_dev; |
119 | snprintf(tr->phys, sizeof(tr->phys), "%s/input0", serio->phys); | 119 | snprintf(tr->phys, sizeof(tr->phys), "%s/input0", serio->phys); |
120 | 120 | ||
121 | input_dev->private = tr; | ||
122 | input_dev->name = "Touchright Serial TouchScreen"; | 121 | input_dev->name = "Touchright Serial TouchScreen"; |
123 | input_dev->phys = tr->phys; | 122 | input_dev->phys = tr->phys; |
124 | input_dev->id.bustype = BUS_RS232; | 123 | input_dev->id.bustype = BUS_RS232; |
125 | input_dev->id.vendor = SERIO_TOUCHRIGHT; | 124 | input_dev->id.vendor = SERIO_TOUCHRIGHT; |
126 | input_dev->id.product = 0; | 125 | input_dev->id.product = 0; |
127 | input_dev->id.version = 0x0100; | 126 | input_dev->id.version = 0x0100; |
127 | input_dev->dev.parent = &serio->dev; | ||
128 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 128 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
129 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 129 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
130 | input_set_abs_params(tr->dev, ABS_X, TR_MIN_XC, TR_MAX_XC, 0, 0); | 130 | input_set_abs_params(tr->dev, ABS_X, TR_MIN_XC, TR_MAX_XC, 0, 0); |
diff --git a/drivers/input/touchscreen/touchwin.c b/drivers/input/touchscreen/touchwin.c index 4dc073dacabb..ac4bdcf18666 100644 --- a/drivers/input/touchscreen/touchwin.c +++ b/drivers/input/touchscreen/touchwin.c | |||
@@ -125,13 +125,13 @@ static int tw_connect(struct serio *serio, struct serio_driver *drv) | |||
125 | tw->dev = input_dev; | 125 | tw->dev = input_dev; |
126 | snprintf(tw->phys, sizeof(tw->phys), "%s/input0", serio->phys); | 126 | snprintf(tw->phys, sizeof(tw->phys), "%s/input0", serio->phys); |
127 | 127 | ||
128 | input_dev->private = tw; | ||
129 | input_dev->name = "Touchwindow Serial TouchScreen"; | 128 | input_dev->name = "Touchwindow Serial TouchScreen"; |
130 | input_dev->phys = tw->phys; | 129 | input_dev->phys = tw->phys; |
131 | input_dev->id.bustype = BUS_RS232; | 130 | input_dev->id.bustype = BUS_RS232; |
132 | input_dev->id.vendor = SERIO_TOUCHWIN; | 131 | input_dev->id.vendor = SERIO_TOUCHWIN; |
133 | input_dev->id.product = 0; | 132 | input_dev->id.product = 0; |
134 | input_dev->id.version = 0x0100; | 133 | input_dev->id.version = 0x0100; |
134 | input_dev->dev.parent = &serio->dev; | ||
135 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 135 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
136 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); | 136 | input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
137 | input_set_abs_params(tw->dev, ABS_X, TW_MIN_XC, TW_MAX_XC, 0, 0); | 137 | input_set_abs_params(tw->dev, ABS_X, TW_MIN_XC, TW_MAX_XC, 0, 0); |
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index e8606c48c9c3..6582816a0477 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
@@ -97,6 +97,8 @@ struct ucb1400 { | |||
97 | }; | 97 | }; |
98 | 98 | ||
99 | static int adcsync; | 99 | static int adcsync; |
100 | static int ts_delay = 55; /* us */ | ||
101 | static int ts_delay_pressure; /* us */ | ||
100 | 102 | ||
101 | static inline u16 ucb1400_reg_read(struct ucb1400 *ucb, u16 reg) | 103 | static inline u16 ucb1400_reg_read(struct ucb1400 *ucb, u16 reg) |
102 | { | 104 | { |
@@ -159,6 +161,7 @@ static inline unsigned int ucb1400_ts_read_pressure(struct ucb1400 *ucb) | |||
159 | UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW | | 161 | UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW | |
160 | UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND | | 162 | UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND | |
161 | UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA); | 163 | UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA); |
164 | udelay(ts_delay_pressure); | ||
162 | return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY); | 165 | return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY); |
163 | } | 166 | } |
164 | 167 | ||
@@ -180,7 +183,7 @@ static inline unsigned int ucb1400_ts_read_xpos(struct ucb1400 *ucb) | |||
180 | UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW | | 183 | UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW | |
181 | UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA); | 184 | UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA); |
182 | 185 | ||
183 | udelay(55); | 186 | udelay(ts_delay); |
184 | 187 | ||
185 | return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY); | 188 | return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY); |
186 | } | 189 | } |
@@ -203,7 +206,7 @@ static inline unsigned int ucb1400_ts_read_ypos(struct ucb1400 *ucb) | |||
203 | UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW | | 206 | UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW | |
204 | UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA); | 207 | UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA); |
205 | 208 | ||
206 | udelay(55); | 209 | udelay(ts_delay); |
207 | 210 | ||
208 | return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPX); | 211 | return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPX); |
209 | } | 212 | } |
@@ -369,7 +372,7 @@ static irqreturn_t ucb1400_hard_irq(int irqnr, void *devid) | |||
369 | 372 | ||
370 | static int ucb1400_ts_open(struct input_dev *idev) | 373 | static int ucb1400_ts_open(struct input_dev *idev) |
371 | { | 374 | { |
372 | struct ucb1400 *ucb = idev->private; | 375 | struct ucb1400 *ucb = input_get_drvdata(idev); |
373 | int ret = 0; | 376 | int ret = 0; |
374 | 377 | ||
375 | BUG_ON(ucb->ts_task); | 378 | BUG_ON(ucb->ts_task); |
@@ -385,7 +388,7 @@ static int ucb1400_ts_open(struct input_dev *idev) | |||
385 | 388 | ||
386 | static void ucb1400_ts_close(struct input_dev *idev) | 389 | static void ucb1400_ts_close(struct input_dev *idev) |
387 | { | 390 | { |
388 | struct ucb1400 *ucb = idev->private; | 391 | struct ucb1400 *ucb = input_get_drvdata(idev); |
389 | 392 | ||
390 | if (ucb->ts_task) | 393 | if (ucb->ts_task) |
391 | kthread_stop(ucb->ts_task); | 394 | kthread_stop(ucb->ts_task); |
@@ -507,8 +510,9 @@ static int ucb1400_ts_probe(struct device *dev) | |||
507 | } | 510 | } |
508 | printk(KERN_DEBUG "UCB1400: found IRQ %d\n", ucb->irq); | 511 | printk(KERN_DEBUG "UCB1400: found IRQ %d\n", ucb->irq); |
509 | 512 | ||
510 | idev->private = ucb; | 513 | input_set_drvdata(idev, ucb); |
511 | idev->cdev.dev = dev; | 514 | |
515 | idev->dev.parent = dev; | ||
512 | idev->name = "UCB1400 touchscreen interface"; | 516 | idev->name = "UCB1400 touchscreen interface"; |
513 | idev->id.vendor = ucb1400_reg_read(ucb, AC97_VENDOR_ID1); | 517 | idev->id.vendor = ucb1400_reg_read(ucb, AC97_VENDOR_ID1); |
514 | idev->id.product = id; | 518 | idev->id.product = id; |
@@ -571,7 +575,15 @@ static void __exit ucb1400_ts_exit(void) | |||
571 | driver_unregister(&ucb1400_ts_driver); | 575 | driver_unregister(&ucb1400_ts_driver); |
572 | } | 576 | } |
573 | 577 | ||
574 | module_param(adcsync, int, 0444); | 578 | module_param(adcsync, bool, 0444); |
579 | MODULE_PARM_DESC(adcsync, "Synchronize touch readings with ADCSYNC pin."); | ||
580 | |||
581 | module_param(ts_delay, int, 0444); | ||
582 | MODULE_PARM_DESC(ts_delay, "Delay between panel setup and position read. Default = 55us."); | ||
583 | |||
584 | module_param(ts_delay_pressure, int, 0444); | ||
585 | MODULE_PARM_DESC(ts_delay_pressure, | ||
586 | "delay between panel setup and pressure read. Default = 0us."); | ||
575 | 587 | ||
576 | module_init(ucb1400_ts_init); | 588 | module_init(ucb1400_ts_init); |
577 | module_exit(ucb1400_ts_exit); | 589 | module_exit(ucb1400_ts_exit); |