All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: hid-magicmouse: Correct touch orientation direction
@ 2011-03-09 17:38 Henrik Rydberg
  2011-03-09 17:44 ` Chase Douglas
  0 siblings, 1 reply; 3+ messages in thread
From: Henrik Rydberg @ 2011-03-09 17:38 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Dmitry Torokhov, linux-input, linux-kernel, Henrik Rydberg,
	stable, Michael Poole, Chase Douglas

The magic trackpad and mouse both report touch orientation in opposite
direction to the bcm5974 driver and what is written in
Documents/input/multi-touch-protocol.txt. This patch reverts the
direction, so that all in-kernel devices with this feature behave the
same way.

Since no known application has been utilizing this information yet, it
seems appropriate also for stable.

Cc: stable@kernel.org
Cc: Michael Poole <mdpoole@troilus.org>
Cc: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
 drivers/hid/hid-magicmouse.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 698e645..318cc40 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -258,7 +258,7 @@ static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tda
 		input_report_abs(input, ABS_MT_TRACKING_ID, id);
 		input_report_abs(input, ABS_MT_TOUCH_MAJOR, touch_major << 2);
 		input_report_abs(input, ABS_MT_TOUCH_MINOR, touch_minor << 2);
-		input_report_abs(input, ABS_MT_ORIENTATION, orientation);
+		input_report_abs(input, ABS_MT_ORIENTATION, -orientation);
 		input_report_abs(input, ABS_MT_POSITION_X, x);
 		input_report_abs(input, ABS_MT_POSITION_Y, y);
 
@@ -397,7 +397,7 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
 		input_set_abs_params(input, ABS_MT_TRACKING_ID, 0, 15, 0, 0);
 		input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, 255, 4, 0);
 		input_set_abs_params(input, ABS_MT_TOUCH_MINOR, 0, 255, 4, 0);
-		input_set_abs_params(input, ABS_MT_ORIENTATION, -32, 31, 1, 0);
+		input_set_abs_params(input, ABS_MT_ORIENTATION, -31, 32, 1, 0);
 
 		/* Note: Touch Y position from the device is inverted relative
 		 * to how pointer motion is reported (and relative to how USB
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: hid-magicmouse: Correct touch orientation direction
  2011-03-09 17:38 [PATCH] HID: hid-magicmouse: Correct touch orientation direction Henrik Rydberg
@ 2011-03-09 17:44 ` Chase Douglas
  2011-03-09 23:06   ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Chase Douglas @ 2011-03-09 17:44 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: Jiri Kosina, Dmitry Torokhov, linux-input, linux-kernel, stable,
	Michael Poole

On 03/09/2011 12:38 PM, Henrik Rydberg wrote:
> The magic trackpad and mouse both report touch orientation in opposite
> direction to the bcm5974 driver and what is written in
> Documents/input/multi-touch-protocol.txt. This patch reverts the
> direction, so that all in-kernel devices with this feature behave the
> same way.
> 
> Since no known application has been utilizing this information yet, it
> seems appropriate also for stable.
> 
> Cc: stable@kernel.org
> Cc: Michael Poole <mdpoole@troilus.org>
> Cc: Chase Douglas <chase.douglas@canonical.com>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>

Acked-by: Chase Douglas <chase.douglas@canonical.com>

Thanks for fixing this!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: hid-magicmouse: Correct touch orientation direction
  2011-03-09 17:44 ` Chase Douglas
@ 2011-03-09 23:06   ` Jiri Kosina
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2011-03-09 23:06 UTC (permalink / raw)
  To: Chase Douglas
  Cc: Henrik Rydberg, Dmitry Torokhov, linux-input, linux-kernel,
	stable, Michael Poole

On Wed, 9 Mar 2011, Chase Douglas wrote:

> > The magic trackpad and mouse both report touch orientation in opposite
> > direction to the bcm5974 driver and what is written in
> > Documents/input/multi-touch-protocol.txt. This patch reverts the
> > direction, so that all in-kernel devices with this feature behave the
> > same way.
> > 
> > Since no known application has been utilizing this information yet, it
> > seems appropriate also for stable.
> > 
> > Cc: stable@kernel.org
> > Cc: Michael Poole <mdpoole@troilus.org>
> > Cc: Chase Douglas <chase.douglas@canonical.com>
> > Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> 
> Acked-by: Chase Douglas <chase.douglas@canonical.com>

Makes sense. Applied, thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-09 23:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09 17:38 [PATCH] HID: hid-magicmouse: Correct touch orientation direction Henrik Rydberg
2011-03-09 17:44 ` Chase Douglas
2011-03-09 23:06   ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.