From patchwork Wed Dec 13 00:54:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Moreau X-Patchwork-Id: 10108557 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 EADE860327 for ; Wed, 13 Dec 2017 00:54:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4A3128CB7 for ; Wed, 13 Dec 2017 00:54:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C782628CCD; Wed, 13 Dec 2017 00:54:18 +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 6052528CB7 for ; Wed, 13 Dec 2017 00:54:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752857AbdLMAyR (ORCPT ); Tue, 12 Dec 2017 19:54:17 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:40616 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752848AbdLMAyQ (ORCPT ); Tue, 12 Dec 2017 19:54:16 -0500 Received: by mail-io0-f194.google.com with SMTP id v186so1045213iod.7 for ; Tue, 12 Dec 2017 16:54:16 -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=jE0Esie+gMELgHCktvZIqWTpM/NbXlMtmf/AemI+7Nc=; b=Axbk0cEMKmheKq1Xd6h9UH7CtHEIqwoKCvzxXNpq9EN0Hhs+oBwmN0NYQZ68gROe6a VC+KdFdS8Uf6QV9dkSTVlhx3qlhbQU3v+8BAd81UAMzC6JDYJD7EZozegZK1oliB3F6E Gb28chaft1aAH/GHewoNayqyl9o8jWorM0aYqJfKtPvHnWAbDtD5jY8wZ0Xnqfr3+I9x Ei01l5FEDAfau5ScCCohzxX4J6YeAbqz1gLqFnyTq+UHAY4rpNU9yItvi6tc3d1kpwLR yInCroEq9mQtSFJrElg+buHAH5RI170LseqXXoS9LaqbAe1usDY/Z3PHT3gZPT8Tftkk 3HyQ== 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=jE0Esie+gMELgHCktvZIqWTpM/NbXlMtmf/AemI+7Nc=; b=EgchKLWx9gy6EPfnC0/SnJ68YO2y32AgviFO4d72L1ReWyQKMeqnPBfRDaUdFnR5BL +RUOAqLFUo505tRRt7v6onH2Gi35B35B+7KMPjrsSmVmcazL2cYtkLelu4StNaTBipyf hT8IP2o02G6qxxWao1hHXjXcOBtR+7Mcfaun8mUNenK379QUgR7Zqnsxycz9DTXJB0q5 YMc85xKJ8A5kRZLVZVguXOCFbvbPx+tMIWh7zN7jGdGudCXlkApo8AHaMAMofNMDpjzl nXX+YhkUGJX+yzEm8CO37VRnQGH0WZIwieAdm8ID4cQhn49c46okK2LD3UFYYVJFqkVV Ablw== X-Gm-Message-State: AKGB3mKGMKaMXVmAfRpRdxx6K5X5XDGMr/ikWKdDDXshFbUuxCoF14FM NU7YmEqwOhWCnvtBQ8Dr/oL+Bw== X-Google-Smtp-Source: ACJfBosekObiWFZe1FD4zCsXPfOB/P+/6kBt/LxZCBM7dgS8BVZtLYdojGbBANeDmRdTaQPWguQV9A== X-Received: by 10.107.17.149 with SMTP id 21mr948113ior.203.1513126456042; Tue, 12 Dec 2017 16:54:16 -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 72sm3508281itg.0.2017.12.12.16.54.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Dec 2017 16:54:15 -0800 (PST) From: Scott Moreau To: linux-input@vger.kernel.org Cc: Scott Moreau Subject: [PATCH] HID: sony: Fix up nyko core controller Date: Tue, 12 Dec 2017 17:54:04 -0700 Message-Id: <1513126444-7675-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. Acked-by: Roderick Colenbrander --- 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