From patchwork Thu Aug 30 21:56:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Cutts X-Patchwork-Id: 10582941 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 B49E95A4 for ; Thu, 30 Aug 2018 21:56:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A48E32BE32 for ; Thu, 30 Aug 2018 21:56:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98DEC2C24B; Thu, 30 Aug 2018 21:56:56 +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,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 438202BE32 for ; Thu, 30 Aug 2018 21:56:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbeHaCAp (ORCPT ); Thu, 30 Aug 2018 22:00:45 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36480 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727981AbeHaCAo (ORCPT ); Thu, 30 Aug 2018 22:00:44 -0400 Received: by mail-pg1-f196.google.com with SMTP id d1-v6so4484256pgo.3 for ; Thu, 30 Aug 2018 14:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bNkXjyd/TJwjJQq5sEuLkOphZyxbub4Zs7WyVtO+UM0=; b=OO2p7d+CZgD4xu58qnmC/I+WtDMVinCv2sRX+QxYmOggLJ6HEFrSO5eq3Xwd8yOO3I 2YD0a33Qp016oqh0a0lciOhz2xY9q7NxcgvCrMbbaVJJineVysS91WrHY84ZLuoZyNMd okn84jvHPZ4wzARZvMvhFwOwkyIgsDQHf/sKs= 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=bNkXjyd/TJwjJQq5sEuLkOphZyxbub4Zs7WyVtO+UM0=; b=L2a8Amp5oDM7fYstAx6qPz4BhohMs/pwggQelgakRGbuTAhFTNZUv6VvUgZrpxDIYD 02EGZ8PFuUKznxIaMRYLhd4VFzqAvJOk2cOZf8Fh53Wo/nngJ7WG7G6X+mIuGEQyhLMm 88mbN2+73WpSr8d1J+1hJYYcF+5BbFgTN0A/KGjL2XJSpDpMttdFwFXh2J7lI8BGwGNy Lu18IbVXaZM5B9KJnEiuRwJz0fT/2jAr9I0WLEr9UtcjRRk/7VmyMmELPeB0DqTj+LHn tdDYBbAjCGMrBodMie31mPKUW+tzAv/fu0TOPFbjmXDqPuAziOqkwNuEtmWyvfHCEg/6 u8AA== X-Gm-Message-State: APzg51AEWgMlBuRyVKc2OZWiH653VF5Y7SxNDb8wcugL/UbD8GMsWWb4 46IDw0UHAni/z/wp76AePlC2+FWrYuI= X-Google-Smtp-Source: ANB0VdbNkl8lbvHPMvyngVgpXh3ZSQLD2vCCYre8H6NFVp07Ua62TVik9DMEPfWU76DNHJGykuMSzA== X-Received: by 2002:a63:f501:: with SMTP id w1-v6mr6830908pgh.446.1535666188590; Thu, 30 Aug 2018 14:56:28 -0700 (PDT) Received: from kolhar.mtv.corp.google.com ([2620:15c:202:201:356a:9de2:526a:5bc]) by smtp.gmail.com with ESMTPSA id h132-v6sm13516828pfc.100.2018.08.30.14.56.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 14:56:28 -0700 (PDT) From: Harry Cutts To: linux-input , LKML Cc: Jiri Kosina , Dmitry Torokhov , Benjamin Tissoires , Harry Cutts , linux-doc@vger.kernel.org, Jonathan Corbet Subject: [PATCH v2 1/5] Add the `REL_WHEEL_HI_RES` event code Date: Thu, 30 Aug 2018 14:56:18 -0700 Message-Id: <20180830215622.47550-2-hcutts@chromium.org> X-Mailer: git-send-email 2.19.0.rc0.228.g281dcd1b4d0-goog In-Reply-To: <20180830215622.47550-1-hcutts@chromium.org> References: <20180830215622.47550-1-hcutts@chromium.org> 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 This event code represents scroll reports from high-resolution wheels, and will be used by future patches in this series. See the linux-input "Reporting high-resolution scroll events" thread [0] for more details. [0]: https://www.spinics.net/lists/linux-input/msg57380.html Signed-off-by: Harry Cutts Acked-by: Dmitry Torokhov --- Changes in v2: None Documentation/input/event-codes.rst | 11 ++++++++++- include/uapi/linux/input-event-codes.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst index a8c0873beb95..cef220c176a4 100644 --- a/Documentation/input/event-codes.rst +++ b/Documentation/input/event-codes.rst @@ -190,7 +190,16 @@ A few EV_REL codes have special meanings: * REL_WHEEL, REL_HWHEEL: - These codes are used for vertical and horizontal scroll wheels, - respectively. + respectively. The value is the number of "notches" moved on the wheel, the + physical size of which varies by device. For high-resolution wheels (which + report multiple events for each notch of movement, or do not have notches) + this may be an approximation based on the high-resolution scroll events. + +* REL_WHEEL_HI_RES: + + - If a vertical scroll wheel supports high-resolution scrolling, this code + will be emitted in addition to REL_WHEEL. The value is the (approximate) + distance travelled by the user's finger, in microns. EV_ABS ------ diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 53fbae27b280..dad8d3890a3a 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -708,6 +708,7 @@ #define REL_DIAL 0x07 #define REL_WHEEL 0x08 #define REL_MISC 0x09 +#define REL_WHEEL_HI_RES 0x0a #define REL_MAX 0x0f #define REL_CNT (REL_MAX+1)