From patchwork Mon Dec 11 02:51:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Moreau X-Patchwork-Id: 10104113 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 14367602B3 for ; Mon, 11 Dec 2017 02:51:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBEC52911F for ; Mon, 11 Dec 2017 02:51:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E064A29123; Mon, 11 Dec 2017 02:51:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82A302911F for ; Mon, 11 Dec 2017 02:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752066AbdLKCvx (ORCPT ); Sun, 10 Dec 2017 21:51:53 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:36737 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751640AbdLKCvw (ORCPT ); Sun, 10 Dec 2017 21:51:52 -0500 Received: by mail-it0-f65.google.com with SMTP id d16so12526089itj.1 for ; Sun, 10 Dec 2017 18:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=SQz0z5YD37eNI4iFmzKn750LvvPjnI+0/PF4TyQPo2s=; b=s3f2T8/YNlbwwopYXVMXtgLzutX8NruJp1pp90TrpMeEPo7nrc5qJWw0gXbp9Z8/Pr ooX+JMKMGJQSEZ1ONI2+d3npty/xKcEgs3F6/yZLZw1FA6Iz4Tm6BQ1wq0C5HjXECAH/ RNpoBnZPwG9Ob/8oS6NuBr05OJgIkb1HsKRH7ZTUlu8k/rdCs2RcgWzItfUVRMJQJU3L 5c1AM77OeatieWlGOHwJ3xGXTOTBqaCLUAE6m59PaN0ZM9XjKD7bZ/x03DbZUuRc4sV5 tMGXLJAqLpw3555nMan2F+9pa3WhxM6M51YPQd8FdUyzAeXSXFt51DWo8YRNTchc2XHl t3Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SQz0z5YD37eNI4iFmzKn750LvvPjnI+0/PF4TyQPo2s=; b=iz0Lp/+3EwrYyaa0NN00KPBln8+JqfuTA0Od3nOebvapGBwEw2WypnL6IiPAIml7+r Y7zbQ2QGzr6Z4WnnaCm7iBr9QGcXg+Gl0owAjUwD0uUi/+mHGX3+Jp6B73XAWfu+q6/I 85f7ogrOBSWGCj2E9095yAngiyZwDXzLZS2ZspjcDMjNLqnGM0gTRiXpJE9xqsAE8SRD RNsr9R7E9KncRUnvv5Wbmi9hvmyH62zppod77NmHJ1dXTUh4Fl7xo99vDMeScK34Dfk9 nEbMrNBRn4Hv6x1uRhAzOxSLgG09CM1GMUT/KfibxG8F7/zWkGzrn+kTJTo76rmOCWcl nYJA== X-Gm-Message-State: AKGB3mIATqX1LXv+hLvDr6H+Yd1qqKePLHhMx+0t5+JtcgEW8HU0+DV8 0D30rK0/wyQYPnCAbbfW9NAJ4Q== X-Google-Smtp-Source: AGs4zMa8OP5s+t/BOUbv9wxZOoRysMgVJWLoXC7pjI21s+lr9eaFtRLXjaMOmi94kvwnookxwLgp3w== X-Received: by 10.36.121.150 with SMTP id z144mr16910729itc.140.1512960711669; Sun, 10 Dec 2017 18:51:51 -0800 (PST) Received: from localhost.localdomain (c-71-229-200-231.hsd1.co.comcast.net. [71.229.200.231]) by smtp.gmail.com with ESMTPSA id x72sm3276990ite.43.2017.12.10.18.51.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Dec 2017 18:51:51 -0800 (PST) From: Scott Moreau To: linux-input@vger.kernel.org Cc: Scott Moreau Subject: [PATCH] HID: sony: Fix up nyko core controller Date: Sun, 10 Dec 2017 19:51:48 -0700 Message-Id: <1512960708-23379-1-git-send-email-oreaus@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. --- drivers/hid/hid-sony.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index b9dc3ac..e703024 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,12 @@ 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_NO_OUTPUT_REPORTS_ON_INTR_EP; + hdev->quirks |= HID_QUIRK_SKIP_OUTPUT_REPORT_ID; + sc->defer_initialization = 1; + + 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