Skip to content

Commit

Permalink
iio: documentation: Document proximity sensor label use
Browse files Browse the repository at this point in the history
Add an entry to Documentation/ABI/testing/sysfs-bus-iio for
the new device 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 there 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.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mark Pearson <mpearson@lenovo.com>
Cc: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210215191003.698888-1-hdegoede@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Hans de Goede authored and Jonathan Cameron committed Mar 11, 2021
1 parent 3a826f7 commit 6505dfa
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-iio
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,45 @@ Description:
Description of the physical chip / device for device X.
Typically a part number.

What: /sys/bus/iio/devices/iio:deviceX/label
KernelVersion: 5.8
Contact: linux-iio@vger.kernel.org
Description:
Optional symbolic label for a device.
This is useful for userspace to be able to better identify an
individual device.

The contents of the label are free-form, but there are some
standardized uses:

For proximity sensors which give the proximity (of a person) to
a certain wlan or wwan antenna the following standardized labels
are used:

* "proximity-wifi"
* "proximity-lte"
* "proximity-wifi-lte"
* "proximity-wifi-left"
* "proximity-wifi-right"

These are used to indicate to userspace that these proximity
sensors may be used to tune transmit power to ensure that
Specific Absorption Rate (SAR) limits are honored.
The "-left" and "-right" labels are for devices with multiple
antennas.

In some laptops/tablets the standardized proximity sensor labels
instead indicate proximity to a specific part of the device:

* "proximity-palmrest" indicates proximity to the keyboard's palmrest
* "proximity-palmrest-left" indicates proximity to the left part of the palmrest
* "proximity-palmrest-right" indicates proximity to the right part of the palmrest
* "proximity-lap" indicates the device is being used on someone's lap

Note "proximity-lap" is special in that its value may be
calculated by firmware from other sensor readings, rather then
being a raw sensor reading.

What: /sys/bus/iio/devices/iio:deviceX/current_timestamp_clock
KernelVersion: 4.5
Contact: linux-iio@vger.kernel.org
Expand Down

0 comments on commit 6505dfa

Please sign in to comment.