From patchwork Wed Dec 13 02:21:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Moreau X-Patchwork-Id: 10108841 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 E098960327 for ; Wed, 13 Dec 2017 02:22:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC74528CAA for ; Wed, 13 Dec 2017 02:22:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C11BC290D1; Wed, 13 Dec 2017 02:22:07 +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 641F828CAA for ; Wed, 13 Dec 2017 02:22:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437AbdLMCWF (ORCPT ); Tue, 12 Dec 2017 21:22:05 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:36428 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752354AbdLMCWD (ORCPT ); Tue, 12 Dec 2017 21:22:03 -0500 Received: by mail-it0-f66.google.com with SMTP id d16so1901549itj.1 for ; Tue, 12 Dec 2017 18:22:02 -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=fmH1iOKUoeVIXvILFEahEg5egio/dAkPCJjo3wEzxuDCMibFERTDa01GkSAgVtULS4 HzisKL4mki759xFS/o2etF9PMkKw4tnA9EMVRiVK3izTZoBkn0CGPBEsAZ4QaWFzZf6f MfjoLyHyQW+O0REezXtxEkUmAxsEbuQ7USSFzjLFA86b/czqow9x1/n12s5qVokUGSe8 Hh1C/pJuZlo2MvqGVkZT0acwDYg7q1nHl2dLgMuX+egvarUFd8zZ/LJbcwTt6uW2no7z 7Wmq/nWtaEQnCrB/bttSvnn/+ChqCh05CaPcTyyvhCNAoyT34x0iI6Yg3hh30/vCa2t5 i84Q== 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=ZD2t7pf4/HZlEykeQH2xeZW/ea+k0yzNTftcOi2LQz7hSE+aqfUDi3BxVKKZXYHvH6 qZmeJ2Hem8kl9udZJO0AwUBN0HA/lq5BQBuDv0KJicGpcZzeNLUri1W2LKHcGVLumwaH b8voPp3v/x/GLZyqg73cPtofm82jb47cjmzikGyIcDQgF8RvjtVbnNAhw04CdOXozB3t N4G67CHrkjpfeb6Xmc37t/Ss37Q4w7l/aNDj6f4Sb5CkdE/ZaeXpCn/21f0MxO4PfXqM 5r4OVXPbU1I89K8F6ziISp/TlFLhc/2b8u7vhb6Oe2bSKPwCf+MVm7pZuBlTsIvK7hAK /N/w== X-Gm-Message-State: AKGB3mLTewsqUilEI2nj9Vp4Bh1sMoZicozF5Dt0PMzjYbCLR3hioaYb 7/1Kuiiz5Zdbjzjo2urmBR5x9A== X-Google-Smtp-Source: ACJfBoseq4MR8E67y5P6Zo5rlJ9GQ/rZ7LRRjJGgbUu5uGy9wHKHkdwaGHz9quUvxYjj9lCUIzOc9A== X-Received: by 10.36.246.8 with SMTP id u8mr1106980ith.2.1513131722281; Tue, 12 Dec 2017 18:22:02 -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 g130sm281806ioe.78.2017.12.12.18.22.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Dec 2017 18:22:01 -0800 (PST) From: Scott Moreau To: linux-input@vger.kernel.org Cc: Scott Moreau Subject: [PATCH v2] HID: sony: Fix up nyko core controller Date: Tue, 12 Dec 2017 19:21:54 -0700 Message-Id: <1513131714-10907-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