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@xxxxxxxxxx/ >> >> 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