* [PATCH] ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event
@ 2011-01-30 12:40 Jochen Friedrich
2011-01-30 19:57 ` Dmitry Torokhov
2011-01-31 11:00 ` Samuel Ortiz
0 siblings, 2 replies; 3+ messages in thread
From: Jochen Friedrich @ 2011-01-30 12:40 UTC (permalink / raw)
To: Samuel Ortiz, linux-arm-kernel, linux-input
Cc: Samuel Ortiz, Jochen Friedrich
Add BTN_TOUCH event reporting to ucb1x00_ts touchscreen driver.
This will make this touchscreen driver behave consistently wrt.
BTN_TOUCH.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
drivers/mfd/ucb1x00-ts.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index 92b85e2..38ffbd5 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -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);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event
2011-01-30 12:40 [PATCH] ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event Jochen Friedrich
@ 2011-01-30 19:57 ` Dmitry Torokhov
2011-01-31 11:00 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2011-01-30 19:57 UTC (permalink / raw)
To: Jochen Friedrich
Cc: Samuel Ortiz, linux-arm-kernel, linux-input, Samuel Ortiz
On Sun, Jan 30, 2011 at 01:40:56PM +0100, Jochen Friedrich wrote:
> Add BTN_TOUCH event reporting to ucb1x00_ts touchscreen driver.
> This will make this touchscreen driver behave consistently wrt.
> BTN_TOUCH.
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
> ---
> drivers/mfd/ucb1x00-ts.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
> index 92b85e2..38ffbd5 100644
> --- a/drivers/mfd/ucb1x00-ts.c
> +++ b/drivers/mfd/ucb1x00-ts.c
> @@ -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);
>
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event
2011-01-30 12:40 [PATCH] ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event Jochen Friedrich
2011-01-30 19:57 ` Dmitry Torokhov
@ 2011-01-31 11:00 ` Samuel Ortiz
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Ortiz @ 2011-01-31 11:00 UTC (permalink / raw)
To: Jochen Friedrich; +Cc: linux-arm-kernel, linux-input, Samuel Ortiz
Hi Jochen,
On Sun, Jan 30, 2011 at 01:40:56PM +0100, Jochen Friedrich wrote:
> 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.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-31 11:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-30 12:40 [PATCH] ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event Jochen Friedrich
2011-01-30 19:57 ` Dmitry Torokhov
2011-01-31 11:00 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).