aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/h3600_ts_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/h3600_ts_input.c')
-rw-r--r--drivers/input/touchscreen/h3600_ts_input.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c
index e2b910018773..d9e61ee05ea9 100644
--- a/drivers/input/touchscreen/h3600_ts_input.c
+++ b/drivers/input/touchscreen/h3600_ts_input.c
@@ -106,19 +106,18 @@ struct h3600_dev {
106 char phys[32]; 106 char phys[32];
107}; 107};
108 108
109static irqreturn_t action_button_handler(int irq, void *dev_id, struct pt_regs *regs) 109static irqreturn_t action_button_handler(int irq, void *dev_id)
110{ 110{
111 int down = (GPLR & GPIO_BITSY_ACTION_BUTTON) ? 0 : 1; 111 int down = (GPLR & GPIO_BITSY_ACTION_BUTTON) ? 0 : 1;
112 struct input_dev *dev = (struct input_dev *) dev_id; 112 struct input_dev *dev = (struct input_dev *) dev_id;
113 113
114 input_regs(dev, regs);
115 input_report_key(dev, KEY_ENTER, down); 114 input_report_key(dev, KEY_ENTER, down);
116 input_sync(dev); 115 input_sync(dev);
117 116
118 return IRQ_HANDLED; 117 return IRQ_HANDLED;
119} 118}
120 119
121static irqreturn_t npower_button_handler(int irq, void *dev_id, struct pt_regs *regs) 120static irqreturn_t npower_button_handler(int irq, void *dev_id)
122{ 121{
123 int down = (GPLR & GPIO_BITSY_NPOWER_BUTTON) ? 0 : 1; 122 int down = (GPLR & GPIO_BITSY_NPOWER_BUTTON) ? 0 : 1;
124 struct input_dev *dev = (struct input_dev *) dev_id; 123 struct input_dev *dev = (struct input_dev *) dev_id;
@@ -127,7 +126,6 @@ static irqreturn_t npower_button_handler(int irq, void *dev_id, struct pt_regs *
127 * This interrupt is only called when we release the key. So we have 126 * This interrupt is only called when we release the key. So we have
128 * to fake a key press. 127 * to fake a key press.
129 */ 128 */
130 input_regs(dev, regs);
131 input_report_key(dev, KEY_SUSPEND, 1); 129 input_report_key(dev, KEY_SUSPEND, 1);
132 input_report_key(dev, KEY_SUSPEND, down); 130 input_report_key(dev, KEY_SUSPEND, down);
133 input_sync(dev); 131 input_sync(dev);
@@ -165,14 +163,12 @@ unsigned int h3600_flite_power(struct input_dev *dev, enum flite_pwr pwr)
165 * packets. Some packets coming from serial are not touchscreen related. In 163 * packets. Some packets coming from serial are not touchscreen related. In
166 * this case we send them off to be processed elsewhere. 164 * this case we send them off to be processed elsewhere.
167 */ 165 */
168static void h3600ts_process_packet(struct h3600_dev *ts, struct pt_regs *regs) 166static void h3600ts_process_packet(struct h3600_dev *ts)
169{ 167{
170 struct input_dev *dev = ts->dev; 168 struct input_dev *dev = ts->dev;
171 static int touched = 0; 169 static int touched = 0;
172 int key, down = 0; 170 int key, down = 0;
173 171
174 input_regs(dev, regs);
175
176 switch (ts->event) { 172 switch (ts->event) {
177 /* 173 /*
178 Buttons - returned as a single byte 174 Buttons - returned as a single byte
@@ -301,7 +297,7 @@ static int state;
301#define STATE_EOF 3 /* state where we decode checksum or EOF */ 297#define STATE_EOF 3 /* state where we decode checksum or EOF */
302 298
303static irqreturn_t h3600ts_interrupt(struct serio *serio, unsigned char data, 299static irqreturn_t h3600ts_interrupt(struct serio *serio, unsigned char data,
304 unsigned int flags, struct pt_regs *regs) 300 unsigned int flags)
305{ 301{
306 struct h3600_dev *ts = serio_get_drvdata(serio); 302 struct h3600_dev *ts = serio_get_drvdata(serio);
307 303
@@ -333,7 +329,7 @@ static irqreturn_t h3600ts_interrupt(struct serio *serio, unsigned char data,
333 case STATE_EOF: 329 case STATE_EOF:
334 state = STATE_SOF; 330 state = STATE_SOF;
335 if (data == CHAR_EOF || data == ts->chksum) 331 if (data == CHAR_EOF || data == ts->chksum)
336 h3600ts_process_packet(ts, regs); 332 h3600ts_process_packet(ts);
337 break; 333 break;
338 default: 334 default:
339 printk("Error3\n"); 335 printk("Error3\n");