From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD4AEC433E6 for ; Mon, 8 Feb 2021 13:52:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 664A964E7B for ; Mon, 8 Feb 2021 13:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbhBHNwF (ORCPT ); Mon, 8 Feb 2021 08:52:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55411 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230328AbhBHNv5 (ORCPT ); Mon, 8 Feb 2021 08:51:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612792230; 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=yNPIoHnBY6HXYG4ADh2fKWto5IZcYeENv/QQ0n/pnTw=; b=jNQykoMH1r3kpnscS6Aw3RtULfHHHxtKigiNoRb7arOeF5p7LRfrTaUICNDTSMAN400rPl VkuauhAr/XnuP21Trqio9nhrMXc5PiUrh2H3gkPJQJaNHWOsnB9QLLKw1p04XP4psjulrk Gwqn2qaeMgKVdc9DtIMEjWQ59+7Dhw4= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-602-zo5KC00ZPSSK-aaf69gm5w-1; Mon, 08 Feb 2021 08:50:29 -0500 X-MC-Unique: zo5KC00ZPSSK-aaf69gm5w-1 Received: by mail-ed1-f70.google.com with SMTP id bo11so13325309edb.0 for ; Mon, 08 Feb 2021 05:50:29 -0800 (PST) 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=yNPIoHnBY6HXYG4ADh2fKWto5IZcYeENv/QQ0n/pnTw=; b=NcyVuc8sLU1PARJzpMnvrz2NdOtE1YE7uDXNT+3fuq+8DLmV15JKQQAs3YxumKWl/8 kgcNGJl7Z3VwU/fhVj96/o1MbebD8UYOHZ2UnLZ4iCe3PmnkApRkePAcqIGZsrI8g1e4 v8x46OTBaGNSMHdbZp186dNw3T40Di2s7vkvfc9vOrcH/FVtwe+aE7yB7Rt81a3qGDHE BZz22VB+9pxQtQuEEZ4XweOvarV+BQiJGX6lumEAvwD/SjRYe9F+2/kl5uu1fgkDRzpq OEEl9nNwhpC3ho1+tJl58GtMVJPLyvNpQ+dIdgTrY+j3PPCM4o+XV9K5A755nWivNTAs VV/Q== X-Gm-Message-State: AOAM531WhGb62udN93JyH7p7TtBlEUITSxwWJ9flEXfZb938H8zi4839 B2vBDdnze71kilkMs9bE6T2mfCjtFUaGmmojj4y6PiftT4abhge5RLOEQgiF9Jc8Y1EnSCNTJ20 O2SkbGYooTbkdIXaSx9OwI4k= X-Received: by 2002:a17:907:1b1f:: with SMTP id mp31mr16542672ejc.348.1612792227660; Mon, 08 Feb 2021 05:50:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzwM5czmo7ikJRAMH4nPm9ToFKx6w5odzT7x9ljUza982b0mGEdgSWzmvem5f3LTvyI41EzA== X-Received: by 2002:a17:907:1b1f:: with SMTP id mp31mr16542630ejc.348.1612792227266; Mon, 08 Feb 2021 05:50:27 -0800 (PST) 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 f6sm5400461edm.15.2021.02.08.05.50.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Feb 2021 05:50:26 -0800 (PST) Subject: Re: [PATCH 1/2] iio: documentation: Document proximity sensor label use To: Bastien Nocera , Jonathan Cameron Cc: linux-input@vger.kernel.org, Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, Dmitry Torokhov , Mark Pearson References: <20210207123720.8357-1-hdegoede@redhat.com> <2b7a0374f4af5e2113c1d209246b506d7f42ae29.camel@hadess.net> From: Hans de Goede Message-ID: <676c9b71-ffc6-343e-f4ef-b0ec73fdb906@redhat.com> Date: Mon, 8 Feb 2021 14:50:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <2b7a0374f4af5e2113c1d209246b506d7f42ae29.camel@hadess.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Hi, On 2/8/21 2:40 PM, Bastien Nocera wrote: > On Sun, 2021-02-07 at 13:37 +0100, Hans de Goede wrote: >> Add an entry to Documentation/ABI/testing/sysfs-bus-iio for >> the new device and channel label sysfs-attribute support. >> >> And document the standardized labels which may be used with proximity >> sensors to hint userspace about the intended use of the sensor. >> >> Using labels to differentiate between the multiple proximity sensors >> which a modern laptop/tablet may have was discussed in this thread: >> https://lore.kernel.org/linux-iio/9f9b0ff6-3bf1-63c4-eb36-901cecd7c4d9@redhat.com/ >> >> As mentioned the "proximity-wifi*" labels are already being used in >> this manner on some chromebooks, see e.g.: >> arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi >> arch/arm64/boot/dts/qcom/sc7180-trogdor-lte-sku.dtsi >> >> And the "proximity-palmrest" and "proximity-lap" labels are intended >> to be used with the lap and palmrest sensors found in recent Lenovo >> ThinkPad models. > > Both patches in the series look fine to me. Thank you for checking. > Is IIO the interface you plan on using to implement the lap detection > for the thinkpad_acpi driver? ATM both the lap detection and the palmrest proximity detection are already available using thinkpad_acpi specific sysfs attributes: [hans@x1 linux]$ cat /sys/bus/platform/devices/thinkpad_acpi/dytc_lapmode 0 [hans@x1 linux]$ cat /sys/bus/platform/devices/thinkpad_acpi/palmsensor 1 Which I think you are already aware of ? These will not be going anywhere since dropping these would be a userspace ABI break. With that said, yes the plan is to extend the thinkpad_acpi driver to also report lap / palmrest proximity through IIO using these labels. With the idea being that if other drivers / vendor firmwares also will export similar readings that those will then also use IIO with these labels for this, so that there is one unified / driver independent interface which userspace can use to get these readings. > If so, don't forget to set the "nearlevel" property as well. Ack, I'll make sure that you are on the Cc when the patches for this get posted. Regards, Hans