From patchwork Fri Aug 16 19:00:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Armstrong Skomra X-Patchwork-Id: 11098123 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 F1C8018EC for ; Fri, 16 Aug 2019 19:01:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E174C28992 for ; Fri, 16 Aug 2019 19:01:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5DED28995; Fri, 16 Aug 2019 19:01:03 +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 782E828965 for ; Fri, 16 Aug 2019 19:01:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727490AbfHPTBD (ORCPT ); Fri, 16 Aug 2019 15:01:03 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40207 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727067AbfHPTBC (ORCPT ); Fri, 16 Aug 2019 15:01:02 -0400 Received: by mail-pf1-f195.google.com with SMTP id w16so3564381pfn.7; Fri, 16 Aug 2019 12:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ITQoihrqDF1S08U7GMyYDnl7GPbMNGI14Dk5cFsRq68=; b=eXAIKwG5SMxJqKuvyODp+0u8MLoSXqouFCunlZzl4d4MHTMqC5eXRPlTleRrc1s/KV cTM3rlAOaCl/D5G1DKG/nvkGDwQ4xmgLe3Tl/4NVmBSSqzochTH5NeNfdR78bLBKKpbp YwF+IYYmh+NhWWmc+TD7EzcKOwBje15UIK9BMYzZ3Pc+Ef6Ii2DGdDphVmAq95qrulLn DBmk/+6RTWFhsK9HzaFVicRdmuwJ/IBqTY+HR48yYeNou+1uoLFvg8BZPEPhlLFBmjuq LWNpdbpI88wAgTG6cgZ2e5JiFpBORVgnRoGuQGUS7FrQ62X4dlutUM8LxYUkeT0yn3qy aJzQ== 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=ITQoihrqDF1S08U7GMyYDnl7GPbMNGI14Dk5cFsRq68=; b=O0iEmTW9Cg7jXhuXliP+35qgaEODPofiwN5WinAZm50648vs4dH36zdCViEwzCa47M cCH4brAQvQWpLAaL+lWAAfmbbi+enVIJTYzkmqAEFiEehu5mEMJxp4yGn5l90amg/nWa FrgfIa1OFAyc6uPBYL1CgTX2HoFsziCY5LATjTuCO/DfA8LfLgIAN/tyMeB8jGRx72PS YdO/4o53rqdUS3UIngZAEMzFG16zQ+owmU9AA407Eek9SUk70d2xK4sNI1Ij8+dQvuLW Aua2XXL87Y7aO69LQNuUGSYF8DFAyP2iTyfvNCg1IS+orZwqw9ozlmwATPOj10OY970n XxeA== X-Gm-Message-State: APjAAAWbABICOswoVlUfJv8iM66g5ZLzxs6w0IsLVJGi8P7t1BtZdH7Y 7vW2xH/YpDuNRkOJuHlDYXrJk0Az X-Google-Smtp-Source: APXvYqwNJ/AgoLJQSxTWNBDU7xQALURvsduKVHz5vIsas2CpTwmbiGQCmbf+pvAitgd1i8gT/UsPMQ== X-Received: by 2002:a65:5a44:: with SMTP id z4mr9088279pgs.41.1565982061461; Fri, 16 Aug 2019 12:01:01 -0700 (PDT) Received: from west.Home ([97.115.133.135]) by smtp.googlemail.com with ESMTPSA id b126sm6334071pfa.177.2019.08.16.12.01.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Aug 2019 12:01:00 -0700 (PDT) From: Aaron Armstrong Skomra X-Google-Original-From: Aaron Armstrong Skomra To: linux-input@vger.kernel.org, jikos@kernel.org, benjamin.tissoires@redhat.com, ping.cheng@wacom.com, jason.gerecke@wacom.com Cc: Aaron Armstrong Skomra , "# v4 . 3+" Subject: [PATCH] HID: wacom: correct misreported EKR ring values Date: Fri, 16 Aug 2019 12:00:54 -0700 Message-Id: <1565982054-29236-1-git-send-email-aaron.skomra@wacom.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 The EKR ring claims a range of 0 to 71 but actually reports values 1 to 72. The ring is used in relative mode so this change should not affect users. Signed-off-by: Aaron Armstrong Skomra Fixes: 72b236d60218f ("HID: wacom: Add support for Express Key Remote.") Cc: # v4.3+ Reviewed-by: Ping Cheng Reviewed-by: Jason Gerecke --- drivers/hid/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index abc17f2c8ef0..e314a7564236 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -1098,7 +1098,7 @@ static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len) input_report_key(input, BTN_BASE2, (data[11] & 0x02)); if (data[12] & 0x80) - input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f)); + input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f) - 1); else input_report_abs(input, ABS_WHEEL, 0);