Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1846422yba; Fri, 10 May 2019 01:58:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3G9ZNi31n8Qfu5d2DduML3yFWWWe+XJeMN0UbdFib56xUTXk9jMyp4ez70MFC1TzQb2S/ X-Received: by 2002:a17:902:a614:: with SMTP id u20mr11452062plq.117.1557478712210; Fri, 10 May 2019 01:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557478712; cv=none; d=google.com; s=arc-20160816; b=zS4MBNiLmXeu+Okd8TB3U8XDXP+36eKYfgkRrshXFacdpwwE1bV9zko930LUuArNJd K5RpTf6Top/AX0NtYXT4HV6iPevu6RLq6/cE7lCNWZeYlr5frowXtu4K1vRCQ9sa6Ec6 LWo4zl9ibc1/5mOkIdc5gz6VtUjWLblh2k4FOXks3byKLWFOkSiT2fp8R527PnvVaypU b3bHJFHLkd5xM2eDD2aUCE/KoirnA6dZFOttyH6+qY0C+8u6ZNPa7ch5w+fZm+iYB3hD Fr7f75jwM5Kuk/zTZwfkhp8xV4CCX9vNyH3Lii4TNUzb93mbTPdjTLBUEkdphSBhebGN zMnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=8hrC8srL0rFAZXt0PLaLKItDWyu4zcf+ayyDaZsQRHE=; b=RRhv6QRiOH8mSX06ItBdyv3wcK7HMe1mhk85PdbOgDoY89hQ0bDJAIAcIpzzJpzLMc jdw/vNPuJt9wzwC4/hMa5f1vPThaw+FrH7gNVpx46bEO6HpnLq8pwxT/at2Ao6tor0ZF 9cKxj0bRKQ8Gvu2MHyQYDnxbNgoGcYCCu9VcnglBSZsueXq/VHVgiYfSZo8C4MJqAsZu eNmlAP7mBJiTgHG6JTHoPujBq0QEU0OwL5TOl7Mclv/04d7+XGQU940t0LqjancxAOMs BH0siObSLOo9tz7SZpQzN/5beQ0UhXpSA4S5X89rKOZDS+gTMfv3TTsco2zK1gDeUM3x btgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si6427424pgc.310.2019.05.10.01.58.14; Fri, 10 May 2019 01:58:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727136AbfEJI5S (ORCPT + 99 others); Fri, 10 May 2019 04:57:18 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:34299 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbfEJI5S (ORCPT ); Fri, 10 May 2019 04:57:18 -0400 X-Originating-IP: 83.155.44.161 Received: from classic (mon69-7-83-155-44-161.fbx.proxad.net [83.155.44.161]) (Authenticated sender: hadess@hadess.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id B557724000E; Fri, 10 May 2019 08:57:08 +0000 (UTC) Message-ID: Subject: Re: [RFC v2] iio: input-bridge: optionally bridge iio acceleometers to create a /dev/input interface From: Bastien Nocera To: Roderick Colenbrander , Jonathan Cameron Cc: "H. Nikolaus Schaller" , Dmitry Torokhov , Eric Piel , linux-input , letux-kernel@openphoenux.org, kernel@pyra-handheld.com, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , lkml , linux-iio@vger.kernel.org Date: Fri, 10 May 2019 10:57:07 +0200 In-Reply-To: References: <195994ebff28de22eae872df134d086c761b83b8.1554026986.git.hns@goldelico.com> <20190407133037.0ad98897@archlinux> <20190414124029.1f1f6084@archlinux> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.1 (3.32.1-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2019-04-14 at 09:26 -0700, Roderick Colenbrander wrote: > > We at the time were one of the first to expose acceleration and gyro > data through /dev/input for DualShock 4 as supported by hid-sony. We > report acceleration in 'g' and angular velocity in 'degree / s'. We > set the resolution to respectively '1 g' and '1 degree / s'. The range > we set to the range of the device e.g. for DS4 -4g to +4g for > acceleration. I need to check though what coordinate system we use, > but I think it is right handed (gyro counter clockwise relative to > acceleration axes). How do you export the gyro information through the input device? FWIW, we needed to do extra work in iio-sensor-proxy so that the accelerometer in the Sixaxis/DS4 joypads (and uDraw tablet) didn't appear as though they were accelerometer for the system: https://github.com/hadess/iio-sensor-proxy/commit/401d59e54b3123860180d4401e09df8a1e1bc6c3 > The two other drivers using INPUT_PROC_ACCELEROMETER are hid-wacom and > hid-udraw-ps3 Wacom. Both seem to report resolution in 'g' as well. I wrote hid-udraw-ps3, and it's reporting accelerometer data through input because the rest of the driver is input, and it didn't make much sense to use another subsystem for just that small portion of the events the device sends out.