提交 d03213f1 编写于 作者: H Hongye Yuan 提交者: Benjamin Tissoires

HID: sony: Fix SHANWAN PS3 GamePad rumble and led settings support

Rumble support on SHANWAN PS3 gamepad is not working when a user
program has asked it to. If a HID Output Reports is sent via Control
Channel then it will be discard by gamepad, thus rumble motor and led
settings in Output Report are ignored.

This patch therefore sends HID Output Report via Interrupt Channel to
SHANWAN gamepad instead of Control Channel, fixing rumble motor and
led settings.
Signed-off-by: NHongye Yuan <outmatch@gmail.com>
Reviewed-by: NBastien Nocera <hadess@hadess.net>
Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
上级 69481059
......@@ -2100,9 +2100,14 @@ static void sixaxis_send_output_report(struct sony_sc *sc)
}
}
hid_hw_raw_request(sc->hdev, report->report_id, (u8 *)report,
sizeof(struct sixaxis_output_report),
HID_OUTPUT_REPORT, HID_REQ_SET_REPORT);
/* SHANWAN controllers require output reports via intr channel */
if (sc->quirks & SHANWAN_GAMEPAD)
hid_hw_output_report(sc->hdev, (u8 *)report,
sizeof(struct sixaxis_output_report));
else
hid_hw_raw_request(sc->hdev, report->report_id, (u8 *)report,
sizeof(struct sixaxis_output_report),
HID_OUTPUT_REPORT, HID_REQ_SET_REPORT);
}
static void dualshock4_send_output_report(struct sony_sc *sc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册