This is a note to let you know that I've just added the patch titled HID:hid-lg4ff: Scale autocentering force properly on Logitech wheel 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-scale-autocentering-force-properly-on-logitech-wheel.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 f8c231569a7a455dfa1907294a46ba52b3aa8859 Mon Sep 17 00:00:00 2001 From: Simon Wood <simon@xxxxxxxxxxxxx> Date: Wed, 6 Nov 2013 12:30:40 -0700 Subject: HID:hid-lg4ff: Scale autocentering force properly on Logitech wheel From: Simon Wood <simon@xxxxxxxxxxxxx> commit f8c231569a7a455dfa1907294a46ba52b3aa8859 upstream. Adjust the scaling and lineartity to match that of the Windows driver (from MOMO testing). 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 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) --- a/drivers/hid/hid-lg4ff.c +++ b/drivers/hid/hid-lg4ff.c @@ -218,12 +218,21 @@ static void hid_lg4ff_set_autocenter_def struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; struct hid_report *report = list_entry(report_list->next, struct hid_report, list); __s32 *value = report->field[0]->value; + __u32 expand_a, expand_b; + + if (magnitude <= 0xaaaa) { + expand_a = 0x0c * magnitude; + expand_b = 0x80 * magnitude; + } else { + expand_a = (0x0c * 0xaaaa) + 0x06 * (magnitude - 0xaaaa); + expand_b = (0x80 * 0xaaaa) + 0xff * (magnitude - 0xaaaa); + } value[0] = 0xfe; value[1] = 0x0d; - value[2] = magnitude >> 13; - value[3] = magnitude >> 13; - value[4] = magnitude >> 8; + value[2] = expand_a / 0xaaaa; + value[3] = expand_a / 0xaaaa; + value[4] = expand_b / 0xaaaa; value[5] = 0x00; value[6] = 0x00; 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