From patchwork Wed Oct 11 20:43:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 10000637 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 EC57A6037F for ; Wed, 11 Oct 2017 20:43:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D521428B66 for ; Wed, 11 Oct 2017 20:43:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C87D928B6B; Wed, 11 Oct 2017 20:43: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_SIGNED, 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 C44C928B66 for ; Wed, 11 Oct 2017 20:43:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752230AbdJKUnF (ORCPT ); Wed, 11 Oct 2017 16:43:05 -0400 Received: from mailrelay4-2.pub.mailoutpod1-cph3.one.com ([46.30.212.3]:35596 "EHLO mailrelay4-2.pub.mailoutpod1-cph3.one.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbdJKUnE (ORCPT ); Wed, 11 Oct 2017 16:43:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bitmath.org; s=20140924; h=from:subject:date:message-id:to:cc:mime-version:content-type:in-reply-to: references; bh=vh9/d5YE35y/6+aEtKoXOcEflEpCwZAFU9Pv3mpmWA4=; b=uq1VZYwNVxcktyKGKmcTA/CMkpYtTDXGALU2dglZw1JNIE8WL9plY2tqedlUUzOGRNz+e52IY1J5R qej+jhtmidLAvI5k29bz3ZTtd7qmcvUZvJdUmzcqmlW3fA6bXeCFlTuhDaayHSBtzuUjPlQxCAy3N5 5a+T3wE4ARYwG1/A= X-HalOne-Cookie: 0a13430c4fbe55c8e661e9734860a5b2838c040f X-HalOne-ID: c52d151e-aec4-11e7-8320-b82a72cffc46 Received: from bitmath.org (unknown [79.136.64.238]) by smtpfilter4.public.one.com (Halon) with ESMTPSA id c52d151e-aec4-11e7-8320-b82a72cffc46; Wed, 11 Oct 2017 20:43:00 +0000 (UTC) Received: by bitmath.org (sSMTP sendmail emulation); Wed, 11 Oct 2017 22:43:24 +0200 Date: Wed, 11 Oct 2017 22:43:24 +0200 From: Henrik Rydberg To: Benjamin Tissoires Cc: Jiri Kosina , Dmitry Torokhov , Wei-Ning Huang , LKML , Linux Input , Peter Hutterer Subject: Re: [PATCH v4] HID: hid-multitouch: support fine-grain orientation reporting Message-ID: <20171011204324.GA24245@mars.bitmath.org> References: <20171010041631.22093-1-wnhuang@google.com> <20171010065740.GA22909@mars.bitmath.org> <20171011085451.GG865@mail.corp.redhat.com> <20171011135324.GI865@mail.corp.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171011135324.GI865@mail.corp.redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) 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 > > > , but I'd go for fixing the documentation. And re-reading it, it's not > > > clear that the doc tells us to have [0,90]. It mentions negative values > > > and out of ranges too, so we might just as well simply clarify that we > > > rather have [-90,90], with 0 being "north". > > > > ... I'd like the documentation fix to go in together in one go with this > > patch if possible. > > > > Sounds like a plan. How about this patch? Henrik --- From b14f92066dfab3f8a255ec7b5a30cb1a864dc62f Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Wed, 11 Oct 2017 22:41:39 +0200 Subject: [PATCH] Input: docs - clarify the usage of ABS_MT_ORIENTATION As more drivers start to support touch orientation, clarify how the value range should be set to match the expected behavior in userland. Signed-off-by: Henrik Rydberg --- Documentation/input/multi-touch-protocol.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Documentation/input/multi-touch-protocol.rst b/Documentation/input/multi-touch-protocol.rst index 8035868..a0c5c03 100644 --- a/Documentation/input/multi-touch-protocol.rst +++ b/Documentation/input/multi-touch-protocol.rst @@ -269,15 +269,17 @@ ABS_MT_ORIENTATION The orientation of the touching ellipse. The value should describe a signed quarter of a revolution clockwise around the touch center. The signed value range is arbitrary, but zero should be returned for an ellipse aligned with - the Y axis of the surface, a negative value when the ellipse is turned to - the left, and a positive value when the ellipse is turned to the - right. When completely aligned with the X axis, the range max should be - returned. + the Y axis of the surface (north). A negative value should be returned when + the ellipse is turned to the left (west), with the smallest value reported + when aligned with the negative X axis. The largest value should be returned + when aligned with the positive X axis. + + The value range should be specified as [-range_max, range_max]. Touch ellipsis are symmetrical by default. For devices capable of true 360 - degree orientation, the reported orientation must exceed the range max to + degree orientation, the reported orientation will exceed range_max, in order to indicate more than a quarter of a revolution. For an upside-down finger, - range max * 2 should be returned. + +- 2 * range_max should be returned. Orientation can be omitted if the touch area is circular, or if the information is not available in the kernel driver. Partial orientation