Re: [Linuxwacom-devel] [PATCH input-wacom 1/6] 2.6.30: Check WACOM_QUIRK_BBTOUCH_LOWRES before modifying Bamboo coords

2018-04-12 Thread Ping Cheng
On Fri, Apr 6, 2018 at 11:19 AM, Jason Gerecke  wrote:

> Only tablets with the WACOM_QUIRK_BBTOUCH_LOWRES flag set should have
> their coordinates expanded. This fix was never backported from upstream
> to the 2.6.30 kernel; only the 2.6.38+ kernels.
>
> Signed-off-by: Jason Gerecke 
>

The whole set looks find to me. The set is

Reviewed-by: Ping Cheng 

Cheers,
Ping

> ---
>  2.6.30/wacom_wac.c | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/2.6.30/wacom_wac.c b/2.6.30/wacom_wac.c
> index 3b65a8d..e2696ef 100644
> --- a/2.6.30/wacom_wac.c
> +++ b/2.6.30/wacom_wac.c
> @@ -1375,6 +1375,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom,
> size_t len)
>
>  static int wacom_bpt_touch(struct wacom_wac *wacom)
>  {
> +   struct wacom_features *features = >features;
> struct input_dev *input = wacom->input;
> unsigned char *data = wacom->data;
> int i, touch_count = 0;
> @@ -1404,8 +1405,10 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
> if (touch) {
> int x = get_unaligned_be16([offset + 3]) &
> 0x7ff;
> int y = get_unaligned_be16([offset + 5]) &
> 0x7ff;
> -   x <<= 5;
> -   y <<= 5;
> +   if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES)
> {
> +   x <<= 5;
> +   y <<= 5;
> +   }
> input_report_abs(input, ABS_X, x);
> input_report_abs(input, ABS_Y, y);
> }
> --
> 2.17.0
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH input-wacom 1/6] 2.6.30: Check WACOM_QUIRK_BBTOUCH_LOWRES before modifying Bamboo coords

2018-04-06 Thread Jason Gerecke
Only tablets with the WACOM_QUIRK_BBTOUCH_LOWRES flag set should have
their coordinates expanded. This fix was never backported from upstream
to the 2.6.30 kernel; only the 2.6.38+ kernels.

Signed-off-by: Jason Gerecke 
---
 2.6.30/wacom_wac.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/2.6.30/wacom_wac.c b/2.6.30/wacom_wac.c
index 3b65a8d..e2696ef 100644
--- a/2.6.30/wacom_wac.c
+++ b/2.6.30/wacom_wac.c
@@ -1375,6 +1375,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t 
len)
 
 static int wacom_bpt_touch(struct wacom_wac *wacom)
 {
+   struct wacom_features *features = >features;
struct input_dev *input = wacom->input;
unsigned char *data = wacom->data;
int i, touch_count = 0;
@@ -1404,8 +1405,10 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
if (touch) {
int x = get_unaligned_be16([offset + 3]) & 0x7ff;
int y = get_unaligned_be16([offset + 5]) & 0x7ff;
-   x <<= 5;
-   y <<= 5;
+   if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) {
+   x <<= 5;
+   y <<= 5;
+   }
input_report_abs(input, ABS_X, x);
input_report_abs(input, ABS_Y, y);
}
-- 
2.17.0


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel