Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp276474pxb; Fri, 16 Apr 2021 05:32:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1tnRiTlpD7vPC2STXTT3I5rcleaPfoFFxeRLydO9q9HYReRZCDDp6nEEQtR87o6yvlOdz X-Received: by 2002:aa7:c351:: with SMTP id j17mr10035558edr.199.1618576336293; Fri, 16 Apr 2021 05:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618576336; cv=none; d=google.com; s=arc-20160816; b=mgQ54tSXFzXLqKozlLpI6UYaliBvFBsFMYOj/Ib2CDhQI2lMLsampvJVNQfFU8HjJ/ em1ffMfYUS8ZnIsYc4ZWqMSycWP4srWqMC3Ul8TEOWxYFd21HjIlAKSPfBCVmUsSWxEt kANuckXoUALaLNs5pbVJnYc8R7rSHjLcGPnZKtWxba43E66BG/h9zOLhaUlthnM0XoAY 66J5Ue3jpTX5o8lbtvM88JDaiAeISsKwguLDQC8FTVSdnme/kaJHyq+Uw3u+nSc2caLO 5PneXDog5u75lDBF2Z8C3+bx5sfDVCBb3vJ0vyjyXfoRPn5ZVXL3VPz325LYyxoTBD5t 0TLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=aPljJ5+PAUcXi86NVgFePGZBr9kfQ5rXdAEaF/0VXUU=; b=l0aTQGHHvRv+EF7Qls0rFsQF+1fMn5dratImmBJ5lO3YD0JDDhea99QB2Ss9g0PM83 zUrkZiiKBY6M6WSzmyFyDZF7Z4ObkfQxMiBdoQVsn8Bib47JEoMezRJFgKGzRq6cy+KS uqX9abKKsHedDS0jY8QSobbzEdZFcrf/HamwGvVP/tICcTYrxH7C8JGRKM1dw7RRPhUc vWWbB3jjcTboQRzihUQ82QW8ZO2pMA8wd7+33CmFhEmLNt1QzqtLKGujVnyxbDr9j0lI IuHMyVNU2iYXewnfE5Eo0WXRkkm8+CFKHFAVsvm1XYStXbXON5z9crGH0OGTfNzhCFJY Ze8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si1944149edq.13.2021.04.16.05.31.40; Fri, 16 Apr 2021 05:32:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240498AbhDPLWQ (ORCPT + 99 others); Fri, 16 Apr 2021 07:22:16 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:33909 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240464AbhDPLWP (ORCPT ); Fri, 16 Apr 2021 07:22:15 -0400 X-Originating-IP: 78.199.60.242 Received: from [192.168.1.150] (unknown [78.199.60.242]) (Authenticated sender: hadess@hadess.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 410F51BF203; Fri, 16 Apr 2021 11:21:48 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2 resend 2/2] iio: documentation: Document accelerometer label use From: Bastien Nocera To: Hans de Goede , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org, Dmitry Torokhov , Mark Pearson Date: Fri, 16 Apr 2021 13:21:47 +0200 In-Reply-To: <871895f8-b85e-e8b0-83f1-de91636ce572@redhat.com> References: <20210405203933.17282-1-hdegoede@redhat.com> <20210405203933.17282-3-hdegoede@redhat.com> <871895f8-b85e-e8b0-83f1-de91636ce572@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.0 (3.40.0-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Fri, 2021-04-16 at 13:05 +0200, Hans de Goede wrote: > Hi, > > On 4/16/21 12:56 PM, Bastien Nocera wrote: > > On Mon, 2021-04-05 at 22:39 +0200, Hans de Goede wrote: > > > Some 2-in-1 laptops / convertibles with 360° (yoga-style) hinges, > > > have 2 accelerometers, 1 in their base and 1 in their display. > > > > > > In many cases the kernel can detect the location of each > > > accelerometer > > > based on e.g. information from the ACPI tables. > > > > > > It is important for userspace to know the location of the 2 > > > accelerometers. > > > Rather then adding a new sysfs-attribute for this we can relay > > > this > > > information to userspace by using standardized label strings for > > > this. > > > This mirrors how this is done for proximity sensors. > > > > > > This commit documents 2 new standardized label strings for this > > > purpose: > > > "accel-base" > > > "accel-display" > > > > If we have a combined proximity and accelerometer sensor (which > > wouldn't be unheard off with sensor hubs being used), how are > > multiple > > labels, say "proximity-wifi" and "accel-base" documented? > > Sensor hubs typically use one iio device per sensor, see e.g. > how HID-sensors work. And if a device which does not use separate > iio-devices per sensor shows up then the plan is to use per > channel-labels which are already supported by iio. OK. > > Regards, > > Hans > > > > > > Note the "base" and "display" suffixes were chosen to match the > > > values > > > used for the systemd/udev hwdb.d/60-sensor.hwdb file's > > > ACCEL_LOCATION > > > property. > > > > > > Cc: Dmitry Torokhov > > > Cc: Mark Pearson > > > Cc: Bastien Nocera > > > Signed-off-by: Hans de Goede > > > --- > > >  Documentation/ABI/testing/sysfs-bus-iio | 7 +++++++ > > >  1 file changed, 7 insertions(+) > > > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio > > > b/Documentation/ABI/testing/sysfs-bus-iio > > > index 7379e40d862d..b7529bca83f5 100644 > > > --- a/Documentation/ABI/testing/sysfs-bus-iio > > > +++ b/Documentation/ABI/testing/sysfs-bus-iio > > > @@ -72,6 +72,13 @@ Description: > > >                 calculated by firmware from other sensor > > > readings, > > > rather then > > >                 being a raw sensor reading. > > >   > > > +               For accelerometers used in 2-in-1s with 360° > > > (yoga- > > > style) hinges, > > > +               which have an accelerometer in both their base > > > and > > > their display, > > > +               the following standardized labels are used: > > > + > > > +               * "accel-base" > > > +               * "accel-display" > > > + > > >  What:          /sys/bus/iio/devices/iio:deviceX/current_timestam > > > p_cl > > > ock > > >  KernelVersion: 4.5 > > >  Contact:       linux-iio@vger.kernel.org > > > > >