Patch "HID:hid-lg4ff: Switch autocentering off when strength is set to zero." has been added to the 3.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    HID:hid-lg4ff: Switch autocentering off when strength is set to zero.

to the 3.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hid-hid-lg4ff-switch-autocentering-off-when-strength-is-set-to-zero.patch
and it can be found in the queue-3.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From d2c02da549b468bbb28e67d269bd3c9e10683ff5 Mon Sep 17 00:00:00 2001
From: Simon Wood <simon@xxxxxxxxxxxxx>
Date: Wed, 6 Nov 2013 12:30:41 -0700
Subject: HID:hid-lg4ff: Switch autocentering off when strength is set to zero.

From: Simon Wood <simon@xxxxxxxxxxxxx>

commit d2c02da549b468bbb28e67d269bd3c9e10683ff5 upstream.

When the autocenter is set to zero, this patch issues a command to
totally disable the autocenter - this results in less resistance
in the wheel.

Reported-by: Elias Vanderstuyft <elias.vds@xxxxxxxxx>
Signed-off-by: Simon Wood <simon@xxxxxxxxxxxxx>
Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/hid/hid-lg4ff.c |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -220,6 +220,20 @@ static void hid_lg4ff_set_autocenter_def
 	__s32 *value = report->field[0]->value;
 	__u32 expand_a, expand_b;
 
+	/* De-activate Auto-Center */
+	if (magnitude == 0) {
+		value[0] = 0xf5;
+		value[1] = 0x00;
+		value[2] = 0x00;
+		value[3] = 0x00;
+		value[4] = 0x00;
+		value[5] = 0x00;
+		value[6] = 0x00;
+
+		hid_hw_request(hid, report, HID_REQ_SET_REPORT);
+		return;
+	}
+
 	if (magnitude <= 0xaaaa) {
 		expand_a = 0x0c * magnitude;
 		expand_b = 0x80 * magnitude;
@@ -236,6 +250,17 @@ static void hid_lg4ff_set_autocenter_def
 	value[5] = 0x00;
 	value[6] = 0x00;
 
+	hid_hw_request(hid, report, HID_REQ_SET_REPORT);
+
+	/* Activate Auto-Center */
+	value[0] = 0x14;
+	value[1] = 0x00;
+	value[2] = 0x00;
+	value[3] = 0x00;
+	value[4] = 0x00;
+	value[5] = 0x00;
+	value[6] = 0x00;
+
 	hid_hw_request(hid, report, HID_REQ_SET_REPORT);
 }
 


Patches currently in stable-queue which might be from simon@xxxxxxxxxxxxx are

queue-3.12/hid-hid-lg4ff-scale-autocentering-force-properly-on-logitech-wheel.patch
queue-3.12/hid-hid-lg4ff-initialize-device-properties-before-we-touch-autocentering.patch
queue-3.12/hid-hid-lg4ff-switch-autocentering-off-when-strength-is-set-to-zero.patch
queue-3.12/hid-lg-fix-reportdescriptor-for-logitech-formula-vibration.patch
queue-3.12/hid-logitech-lg2ff-add-ids-for-formula-vibration-feedback-wheel.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]