linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] HID: sony: Fix up nyko core controller
@ 2018-01-10 18:46 Scott Moreau
  0 siblings, 0 replies; only message in thread
From: Scott Moreau @ 2018-01-10 18:46 UTC (permalink / raw)
  To: linux-input; +Cc: Scott Moreau

This fixes missing d-pad axis broken since e19a267b99. The axis mapping for
the nyko controller has the d-pad as axis 0x39 instead of d-pad as buttons.
This is handled by the default hid mapping so we return 0 in sony_mapping.
This controller also has no accelerometer so avoid initializing it with
a condition in sony_input_configured() to setup these controllers.

Signed-off-by: Scott Moreau <oreaus@gmail.com>
---

Changed in v3:

- Added signoff

 drivers/hid/hid-sony.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index b9dc3ac..1be0a35 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1225,6 +1225,9 @@ static int sony_mapping(struct hid_device *hdev, struct hid_input *hi,
 	if (sc->quirks & NAVIGATION_CONTROLLER)
 		return navigation_mapping(hdev, hi, field, usage, bit, max);
 
+	if (sc->quirks & SINO_LITE_CONTROLLER)
+		return 0;
+
 	if (sc->quirks & SIXAXIS_CONTROLLER)
 		return sixaxis_mapping(hdev, hi, field, usage, bit, max);
 
@@ -2566,6 +2569,10 @@ static int sony_input_configured(struct hid_device *hdev,
 		}
 
 		sony_init_output_report(sc, sixaxis_send_output_report);
+	} else if (sc->quirks & SINO_LITE_CONTROLLER) {
+		hdev->quirks |= HID_QUIRK_SKIP_OUTPUT_REPORT_ID;
+
+		sony_init_output_report(sc, sixaxis_send_output_report);
 	} else if (sc->quirks & SIXAXIS_CONTROLLER_USB) {
 		/*
 		 * The Sony Sixaxis does not handle HID Output Reports on the
-- 
2.7.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-10 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10 18:46 [PATCH v3] HID: sony: Fix up nyko core controller Scott Moreau

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