From patchwork Fri Mar 24 22:17:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roderick Colenbrander X-Patchwork-Id: 9644103 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 227AA602C9 for ; Fri, 24 Mar 2017 22:18:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1468E23E64 for ; Fri, 24 Mar 2017 22:18:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0986525D99; Fri, 24 Mar 2017 22:18:02 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 B8AD023E64 for ; Fri, 24 Mar 2017 22:18:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754994AbdCXWSB (ORCPT ); Fri, 24 Mar 2017 18:18:01 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:36231 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754936AbdCXWSB (ORCPT ); Fri, 24 Mar 2017 18:18:01 -0400 Received: by mail-it0-f47.google.com with SMTP id w124so22701102itb.1 for ; Fri, 24 Mar 2017 15:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaikai-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=m6Mi8amNwb1hzqbPsDI4kFE4UHnoeoqWMNG4k2djunM=; b=x9/qoN3bFqVq/7hVDBK4BD7w9feDVCPm9L+fp5z5IXPIusHf1fjYvncum9uYnWkjUH U74Gh0/TyASc/59BeDQFxE/svIfdSUOU5GFWlE4Wp/Ahn8+1J0mRJkmpbksaZiRdsZ0s oDD9AkIVNNZQwS1dybcQKsveQXL9zZFpOyc7ry18AFnZoL23G1IIYZFAA0AlP+KHn9dH /UsPMQO37vILeM0k5kP9b5pnuEvlqbf3/F0du6VxW1fvBfngHHhaHnpvJJnOOqxnoKLS StFrMtw8T4YgMgIXWC0ptvFl6OCQz7poe+bqb0XXQDVLLVMBVqP0fxAjkWkNwTjHRBY2 6ZBQ== 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; bh=m6Mi8amNwb1hzqbPsDI4kFE4UHnoeoqWMNG4k2djunM=; b=aFuH4d2UCl704ZFdbTTKCqm6ehjWSA8uQEs61aYovu6Wj6xAVuJgTtK5dkwylLMtFN LeLDeMPBJia4U/ya7BUCBABOlTLBS6ZvFK5kPG79NPWfYlRc+ZzKfpRW9fmHx0hSF5bH BTIkJsk9ZNnxQAdyFPa3v+EqtTgHg7UgTzrt7eUiHEJkE53cQoLuK7k/3So3AVfE1+7z prJPId4Jed71P/HT+sDW8oHqYmsBWiGP/39DD/T7LjWi74Y6rvAjzO7eU6NsGMPvCcIO z3sIIs6B29hqZmie+1ol6njgDijQOjgMZQjZbQBZ7P9wP8ojEZxbM7kBO0AtF+tbyFmH DtrQ== X-Gm-Message-State: AFeK/H3ZY5yBTr733RETq/FY3bf3N6NLcKN82WJgktR+Xs1C1JMRgrbpsR6y9qkHT/kzC2uL X-Received: by 10.107.59.86 with SMTP id i83mr10091670ioa.197.1490393879527; Fri, 24 Mar 2017 15:17:59 -0700 (PDT) Received: from roderick.ad.gaikai.biz ([100.42.98.197]) by smtp.gmail.com with ESMTPSA id m100sm1842120iod.14.2017.03.24.15.17.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 15:17:59 -0700 (PDT) From: Roderick Colenbrander To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Jiri Kosina , Benjamin Tissoires , Simon Wood , Frank Praznik , Tim Bird , Roderick Colenbrander Subject: [PATCH 4/6] HID: sony: Set proper bit flags on DS4 output report Date: Fri, 24 Mar 2017 15:17:48 -0700 Message-Id: <20170324221750.19543-5-roderick@gaikai.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170324221750.19543-1-roderick@gaikai.com> References: <20170324221750.19543-1-roderick@gaikai.com> 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 From: Roderick Colenbrander Only set bit flags for the portions of the DS4 output report for which we have data. Signed-off-by: Roderick Colenbrander --- drivers/hid/hid-sony.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 1149757..2429c0e 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -1998,13 +1998,13 @@ static void dualshock4_send_output_report(struct sony_sc *sc) if (sc->quirks & (DUALSHOCK4_CONTROLLER_USB | DUALSHOCK4_DONGLE)) { memset(buf, 0, DS4_OUTPUT_REPORT_0x05_SIZE); buf[0] = 0x05; - buf[1] = 0xFF; + buf[1] = 0x07; /* blink + LEDs + motor */ offset = 4; } else { memset(buf, 0, DS4_OUTPUT_REPORT_0x11_SIZE); buf[0] = 0x11; buf[1] = 0xC0; /* HID + CRC */ - buf[3] = 0x0F; + buf[3] = 0x07; /* blink + LEDs + motor */ offset = 6; }