linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Bastien Nocera <hadess@hadess.net>, Jonathan Cameron <jic23@kernel.org>
Cc: linux-input@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Mark Pearson <mpearson@lenovo.com>
Subject: Re: [PATCH 1/2] iio: documentation: Document proximity sensor label use
Date: Mon, 8 Feb 2021 14:50:26 +0100	[thread overview]
Message-ID: <676c9b71-ffc6-343e-f4ef-b0ec73fdb906@redhat.com> (raw)
In-Reply-To: <2b7a0374f4af5e2113c1d209246b506d7f42ae29.camel@hadess.net>

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


  reply	other threads:[~2021-02-08 13:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 12:37 [PATCH 1/2] iio: documentation: Document proximity sensor label use Hans de Goede
2021-02-07 12:37 ` [PATCH 2/2] iio: documentation: Document accelerometer " Hans de Goede
2021-02-08 13:40 ` [PATCH 1/2] iio: documentation: Document proximity sensor " Bastien Nocera
2021-02-08 13:50   ` Hans de Goede [this message]
2021-02-08 14:16     ` Bastien Nocera
2021-02-08 14:17       ` Hans de Goede
2021-02-12 18:46 ` Jonathan Cameron
2021-02-12 18:58   ` Hans de Goede
2021-02-15 12:39     ` Jonathan Cameron
2021-02-15 12:55       ` Hans de Goede
2021-02-15 14:12         ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=676c9b71-ffc6-343e-f4ef-b0ec73fdb906@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hadess@hadess.net \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mpearson@lenovo.com \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).