Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp238304pxb; Fri, 16 Apr 2021 04:34:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxawIKKgTYZwLIhrLEoGz02tNKLTa6kU4qUIDuAA2vqc3uMLE7koNI8qKSv99RAgwGZaBia X-Received: by 2002:a17:906:64f:: with SMTP id t15mr7682523ejb.411.1618572845204; Fri, 16 Apr 2021 04:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618572845; cv=none; d=google.com; s=arc-20160816; b=eeR3ZdsnoxXAsq+e7pR0AQ8/zZ5i80q66LNT8LiV4L7Lw2W0lf9TfiWx3edtnmiS5L SOUUwvjHIghQIO9/i7HJBgZFUyrwjfUw0RlUw0yh459Uwx+lmhGLTSUXkUO94Rf78WT3 pDIUHNfIfC1JjS1wWKNxANdjK8bgwOl2M9PNsfQxPZmhWU8SiRsxWTazUgwQcqkks6ob P4fBq5MSnL/Mxze/JcOSZbWHzqxUsJbe4IBMDzgOqJB3tWUzeG3KmZIde2Iu/OvNFs8o mom9hriA89svY3FH9U4D1PylIia0l/XVdRCA3Ktzx+xHZVCvKdur6aYDT7MvrkA3hsZv kWVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=QLznv+ygR8CoshQgaQUccGlPVXnAFeHemTBof14wFUc=; b=KIXgOov1is8CM13ieCMwS6+eB4fnavN/F1shd+d7h+vRDuQ8hqZ9rs9VU3tTEx9skK F/M3YIVvwBn4dkd3vW/12SV2i8o2N8LccvJ5jXY0mGEk6DUufHqPf4w8ZTSd22AuZpRE YN2D66AjDGOgkBVIiwXM7xpBo0eThx1AXssoSmQ2Avbj14Gj8Uc4Rb/y+jUwmg59FvvQ zdA8U8yKNeqK13BtXk7OplqcK/ePML8l10OoHeKjki7MYiuZokhrH6fZtdFwePYflllV KAVAHljHq4PBhL35XOyzq/pGWJnYSrCfRNScUqKJdo8XLp3iJCHDSYC+eGzNLyibRbsJ oMCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NE22h2CO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn42si4348926ejc.581.2021.04.16.04.33.26; Fri, 16 Apr 2021 04:34:05 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NE22h2CO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235269AbhDPLGI (ORCPT + 99 others); Fri, 16 Apr 2021 07:06:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57227 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235120AbhDPLGH (ORCPT ); Fri, 16 Apr 2021 07:06:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618571142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QLznv+ygR8CoshQgaQUccGlPVXnAFeHemTBof14wFUc=; b=NE22h2COleZwghf1oLAUfSbRTGS8quldWaE7m2VIQKBdXvYz8yjf+4Sh3k/vvov4QUysv3 45aGbj5PiLfSabGovpLWuqdwkET9MnGEb2HE3VnuBrLdri6xHwIb/XGa1qb97HnXOflpot xA7sa+3zQQGgrQKpn6sZJ46gAPUlH/U= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-501-nfAL1zBnPeC0LAb1NYpSoQ-1; Fri, 16 Apr 2021 07:05:41 -0400 X-MC-Unique: nfAL1zBnPeC0LAb1NYpSoQ-1 Received: by mail-ej1-f70.google.com with SMTP id re9-20020a170906d8c9b029037ca22d6744so1894762ejb.0 for ; Fri, 16 Apr 2021 04:05:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QLznv+ygR8CoshQgaQUccGlPVXnAFeHemTBof14wFUc=; b=lFm/dTcK/x74m+b4a75jiQ3PtCub/GNQjy0/Rdn6JLbFhczD5ua1wqX1+f90b5d0/6 M2dk/M9VRFegzLu8qdSKtfk+7KtgrrQcXiKloSPFEdaMKrbnJXOxWq/TLrIExRu1GTa4 5F4CeWeNfYbQeiwS/rrJO9Wb/Dbma2jPehs5Yci4FbQ8etf4bigwftZbHyHXeFGAJCCR UzhTta5TQA8LddstVNqiRqxPzdhWVFSM44moWPHem3w0zLlpmb4Vl0XAbcgLcHdjpTpj swBPv/T80g/BmK19LkchgazFCm7FRpF+RRQMQH/zSzEHZHQPx8Rtt2RFRbH8DPNSs8kl pOPg== X-Gm-Message-State: AOAM531VUjxjr4TObeVNXDQyhkf/sfVGsHiNwYl5g0g34VN0dzH5L6ip B5dt1nBOtMIhU6Bt/g2SUciJZGc7R10t9OrqWP1wQqDNx367YmcCK+mP2lb4nuN+URUn1rLXFju 96AQDiL1KiY1WHpC873RUoCAd2m5v X-Received: by 2002:a50:f19d:: with SMTP id x29mr9658430edl.102.1618571139830; Fri, 16 Apr 2021 04:05:39 -0700 (PDT) X-Received: by 2002:a50:f19d:: with SMTP id x29mr9658411edl.102.1618571139687; Fri, 16 Apr 2021 04:05:39 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id s20sm5013934edu.93.2021.04.16.04.05.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Apr 2021 04:05:39 -0700 (PDT) Subject: Re: [PATCH v2 resend 2/2] iio: documentation: Document accelerometer label use To: Bastien Nocera , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org, Dmitry Torokhov , Mark Pearson References: <20210405203933.17282-1-hdegoede@redhat.com> <20210405203933.17282-3-hdegoede@redhat.com> From: Hans de Goede Message-ID: <871895f8-b85e-e8b0-83f1-de91636ce572@redhat.com> Date: Fri, 16 Apr 2021 13:05:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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. 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_timestamp_cl >> ock >>  KernelVersion: 4.5 >>  Contact:       linux-iio@vger.kernel.org > >