Skip to contentSkip to conversation

ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event

PATCH New Jochen Friedrich 3 participants 3 messages Jan 30, 2011 – Jan 31, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event

Add BTN_TOUCH event reporting to ucb1x00_ts touchscreen driver. This will make this touchscreen driver behave consistently wrt. BTN_TOUCH.

---
 drivers/mfd/ucb1x00-ts.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/mfd/ucb1x00-ts.c +4 -1
index 92b85e2..38ffbd5 100644
@@ -60,6 +60,7 @@ static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x
 	input_report_abs(idev, ABS_X, x);
 	input_report_abs(idev, ABS_Y, y);
 	input_report_abs(idev, ABS_PRESSURE, pressure);
+	input_report_key(idev, BTN_TOUCH, 1);
 	input_sync(idev);
 }
 
@@ -68,6 +69,7 @@ static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
 	struct input_dev *idev = ts->idev;
 
 	input_report_abs(idev, ABS_PRESSURE, 0);
+	input_report_key(idev, BTN_TOUCH, 0);
 	input_sync(idev);
 }
 
@@ -384,7 +386,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
 	idev->open       = ucb1x00_ts_open;
 	idev->close      = ucb1x00_ts_close;
 
-	__set_bit(EV_ABS, idev->evbit);
+	idev->evbit[0]   = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY);
+	idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
 
 	input_set_drvdata(idev, ts);
 
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/1 ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event

Quoted 5 lines · Jochen Friedrich

Add BTN_TOUCH event reporting to ucb1x00_ts touchscreen driver. This will make this touchscreen driver behave consistently wrt. BTN_TOUCH.

Quoted 41 lines
---
 drivers/mfd/ucb1x00-ts.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/mfd/ucb1x00-ts.c +4 -1
index 92b85e2..38ffbd5 100644
@@ -60,6 +60,7 @@ static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x
 	input_report_abs(idev, ABS_X, x);
 	input_report_abs(idev, ABS_Y, y);
 	input_report_abs(idev, ABS_PRESSURE, pressure);
+	input_report_key(idev, BTN_TOUCH, 1);
 	input_sync(idev);
 }
 
@@ -68,6 +69,7 @@ static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
 	struct input_dev *idev = ts->idev;
 
 	input_report_abs(idev, ABS_PRESSURE, 0);
+	input_report_key(idev, BTN_TOUCH, 0);
 	input_sync(idev);
 }
 
@@ -384,7 +386,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
 	idev->open       = ucb1x00_ts_open;
 	idev->close      = ucb1x00_ts_close;
 
-	__set_bit(EV_ABS, idev->evbit);
+	idev->evbit[0]   = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY);
+	idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
 
 	input_set_drvdata(idev, ts);
 
Signature · 6 lines
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Dmitry
#2 lore raw

PATCH 1/1 ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event

In reply to Jochen Friedrich

Hi Jochen,

Quoted 3 lines · Jochen Friedrich

Add BTN_TOUCH event reporting to ucb1x00_ts touchscreen driver. This will make this touchscreen driver behave consistently wrt. BTN_TOUCH.

Patch applied, with Dmitry's ACK.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/