linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] hid: fix autocentering of PID devices
@ 2007-06-13 12:00 Anssi Hannula
  2007-06-13 15:48 ` Jiri Kosina
  0 siblings, 1 reply; 11+ messages in thread
From: Anssi Hannula @ 2007-06-13 12:00 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, Diogo Kastrup

From: Diogo Kastrup <dk@bighost.com.br>

When setting the autocentering of PID devices, PID_DIRECTION_ENABLE is 
not being explicitely set to 1. This results in autocentering working 
only on the vertical axis when this field is preset to 0. This seems to 
happen since 2.6.21.

Fix that by setting it explicitely to 1 when preparing the set_effect 
report for autocentering spring effect.

Signed-off-by: Diogo Kastrup <dk@bighost.com.br>
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>

---

--- linux/drivers/hid/usbhid/hid-pidff.bkp	2007-06-12 20:39:23.000000000 
-0300
+++ linux/drivers/hid/usbhid/hid-pidff.c	2007-06-12 19:19:57.000000000 -0300
@@ -738,6 +738,7 @@
  	pidff->set_effect[PID_TRIGGER_BUTTON].value[0] = 0;
  	pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = 0;
  	pidff_set(&pidff->set_effect[PID_GAIN], magnitude);
+	pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1;
  	pidff->set_effect[PID_START_DELAY].value[0] = 0;

  	usbhid_submit_report(pidff->hid, pidff->reports[PID_SET_EFFECT],

-- 
Anssi Hannula

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

end of thread, other threads:[~2007-06-21  8:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-13 12:00 [patch] hid: fix autocentering of PID devices Anssi Hannula
2007-06-13 15:48 ` Jiri Kosina
2007-06-13 21:08   ` Anssi Hannula
2007-06-13 21:42     ` Jiri Kosina
2007-06-13 21:52       ` Anssi Hannula
2007-06-13 22:20         ` Diogo Kastrup
2007-06-18 15:43         ` Jiri Kosina
2007-06-20 17:37           ` Anssi Hannula
2007-06-20 22:53             ` Jiri Kosina
2007-06-21  6:45               ` Anssi Hannula
2007-06-21  8:44                 ` Jiri Kosina

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).