From patchwork Sun Dec 30 10:56:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongye Yuan X-Patchwork-Id: 10745069 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BB1C13BF for ; Sun, 30 Dec 2018 10:56:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0465289DD for ; Sun, 30 Dec 2018 10:56:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E40EC28B37; Sun, 30 Dec 2018 10:56:35 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 8B479289DD for ; Sun, 30 Dec 2018 10:56:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726096AbeL3K4f (ORCPT ); Sun, 30 Dec 2018 05:56:35 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:46036 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbeL3K4f (ORCPT ); Sun, 30 Dec 2018 05:56:35 -0500 Received: by mail-pg1-f194.google.com with SMTP id y4so11759868pgc.12 for ; Sun, 30 Dec 2018 02:56:34 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=B3vjStx8qxnDg47E1s3AR+1snOw9dt/MjJAduxwZngI=; b=GWGAn0D4CjPhHSDki4r1kpZkarjw2/MZHzoNBskdMBxbTfM5KDizkLM5D5d5weBX9S 7CeYG72KGTBVSMM3/Ew2eDaVnerFPQmBdEz59+7Ad8RPRwxJaPs6udOAOJLKVc81JG18 LHYO3ZgzgYTx6/K6eSKA+eJ2U2Ae7f+rf81YaC+kURAahXMoRcUNuRo3HlW0Y1Bw8wtr v9y/jQobphOw+FdVd1sw1ZrF1GefS1x1TB5XxGMYaKoaNpR7uLAyVxyl+hpi6/XY8Qmr jlLlRoj5RI2P7NE9mB9c0g6MXLmE4Bn2mPglvRqCs/A/UKcMD+HFwKid0Vj9owkqTTJt TiCQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=B3vjStx8qxnDg47E1s3AR+1snOw9dt/MjJAduxwZngI=; b=m6n1Jkj1xhQCrQg0NtDA9vwhgs14lrqMF2DsNiP3mwsGY8BZLHTKoSTlm6viu/uXG+ +UTW6ysOPbohF8ea9itl2OTicghswX/PphbF6ajHAoRmvm6cMfXL83u3eKoV/8PX7xrX TKeTuEqH1mmvj8+DkQ4x4zTGDiEZpGfywAGTw7Xqyl19F8i2gIg9ngEgQt0tHyOgjjFo HPY8U3Y2jUpplcwwSeWkwjlxCI32WCyAIDyDeKRVVpi74foGCERGn7BDgnzszEzp4BdJ Xco8b2ZewpU8/EMQn/ldOMkegwUlR3xjdpsVA+oyBEBkbhM8QcwZgu+cjm+WtLex3eiJ OT3g== X-Gm-Message-State: AJcUukdT5B0XuvYz3oIGMuSzk2ZSCWxlcFQiLUCeJ7yORu7v2EZRFvmQ 0rIEisQ3ZHxt6eS2ANY8M5jdZrvIJnQ= X-Google-Smtp-Source: ALg8bN55SJImdKK9u9pPzIkF8cBIGoqCbmX3SAYbKiEJGkgywRBds8ggHf0hefoKy0ORBgzt6iCXBg== X-Received: by 2002:a63:2643:: with SMTP id m64mr31622374pgm.35.1546167393785; Sun, 30 Dec 2018 02:56:33 -0800 (PST) Received: from localhost (104.224.165.23.16clouds.com. [104.224.165.23]) by smtp.gmail.com with ESMTPSA id d13sm57542077pfd.58.2018.12.30.02.56.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Dec 2018 02:56:32 -0800 (PST) From: Hongye Yuan To: linux-input@vger.kernel.org Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, rydberg@bitmath.org, roderick.colenbrander@sony.com, ao2@ao2.it, outmatch@gmail.com Subject: [PATCH v3 2/2] HID: sony: Fix SHANWAN PS3 GamePad rumbling on USB again Date: Sun, 30 Dec 2018 18:56:18 +0800 Message-Id: <20181230105618.11867-3-outmatch@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181230105618.11867-1-outmatch@gmail.com> References: <20181230105618.11867-1-outmatch@gmail.com> MIME-Version: 1.0 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 SHANWAN DS3 clone gamepad requires HID Output Reports via Interrupt EP. Signed-off-by: Hongye Yuan --- drivers/hid/hid-sony.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index fc82f02bae75..26fae90b931a 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -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)