[PATCH] dts: adjust proximity near level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adjust the proximity-near-level by one to account for an error in
calibration using iio-sensor-proxy, which interpreted the
in_proximity_nearlevel attribute slightly differently than specified in
the kernel documentation.

Signed-off-by: Philipp Jungkamp <p.jungkamp@xxxxxxx>
---
Hello,

Most userspace programs seem to use the in_proximity_nearlevel sysfs attribute
implicitly through the iio-sensor-proxy dbus daemon. But the proximity sensor
near level detection does not adhere to the kernel documentation for the sysfs
attribute. This is, next to some techical defficulties in iio-sensor-proxy, the
reason that I proposed to fix the near level criterion there.
See: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/364

It has been pointed out that devices with a DT calibrated against
iio-sensor-proxy will see a slight change in the interpretation of the near
level criterion.

I want this more or less serious patch to be a heads up for the users and
implementors of the iio proximity sensors on linux.

Regards,
Philipp Jungkamp

 arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts  | 2 +-
 arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi | 2 +-
 arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts  | 2 +-
 arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts
index 2b3d437a642a..31426cf055b4 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dts
@@ -23,5 +23,5 @@ &bq25895 {
 };

 &proximity {
-	proximity-near-level = <50>;
+	proximity-near-level = <51>;
 };
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi
index 7fd0176e4bd3..12ccc20afc8a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dtsi
@@ -45,5 +45,5 @@ &magnetometer {
 };

 &proximity {
-	proximity-near-level = <10>;
+	proximity-near-level = <11>;
 };
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts
index 97577c0a7715..fab872ecbf1c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dts
@@ -23,5 +23,5 @@ &lcd_panel {
 };

 &proximity {
-	proximity-near-level = <5>;
+	proximity-near-level = <6>;
 };
diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
index 97262b8519b3..19173d9efa22 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
@@ -156,7 +156,7 @@ magnetometer@12 {
 	light-sensor@23 {
 		compatible = "liteon,ltr559";
 		reg = <0x23>;
-		proximity-near-level = <75>;
+		proximity-near-level = <76>;

 		interrupt-parent = <&tlmm>;
 		interrupts = <115 IRQ_TYPE_EDGE_FALLING>;
--
2.41.0




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux