From: Anssi Hannula <anssi.hannula@gmail.com>
To: Dmitry Torokhov <dtor@insightbb.com>
Cc: linux-input@atrey.karlin.mff.cuni.cz, Diogo Kastrup <dk@bighost.com.br>
Subject: [patch] hid: fix autocentering of PID devices
Date: Wed, 13 Jun 2007 15:00:17 +0300 [thread overview]
Message-ID: <466FDC51.5030703@gmail.com> (raw)
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
next reply other threads:[~2007-06-13 12:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 12:00 Anssi Hannula [this message]
2007-06-13 15:48 ` [patch] hid: fix autocentering of PID devices 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=466FDC51.5030703@gmail.com \
--to=anssi.hannula@gmail.com \
--cc=dk@bighost.com.br \
--cc=dtor@insightbb.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).