diff -Nru iio-sensor-proxy-2.8/debian/changelog iio-sensor-proxy-2.8/debian/changelog --- iio-sensor-proxy-2.8/debian/changelog 2021-04-27 17:28:32.000000000 +0800 +++ iio-sensor-proxy-2.8/debian/changelog 2022-04-01 10:35:41.000000000 +0800 @@ -1,3 +1,11 @@ +iio-sensor-proxy (2.8-1ubuntu2) focal; urgency=medium + + * d/p/0003-prefer-buffer-driver-to-polling-driver.patch: + Prefer buffer driver to polling driver for ALS + (LP: #1963628) + + -- Yao Wei (魏銘廷) Fri, 01 Apr 2022 10:35:41 +0800 + iio-sensor-proxy (2.8-1ubuntu1) focal; urgency=medium * Support polling for sensor using raw value (LP: #1926280) diff -Nru iio-sensor-proxy-2.8/debian/patches/0003-prefer-buffer-driver-to-polling-driver.patch iio-sensor-proxy-2.8/debian/patches/0003-prefer-buffer-driver-to-polling-driver.patch --- iio-sensor-proxy-2.8/debian/patches/0003-prefer-buffer-driver-to-polling-driver.patch 1970-01-01 08:00:00.000000000 +0800 +++ iio-sensor-proxy-2.8/debian/patches/0003-prefer-buffer-driver-to-polling-driver.patch 2022-04-01 10:33:20.000000000 +0800 @@ -0,0 +1,33 @@ +From 716ee37d514db965f9e10b070a3a2ce1c7629e76 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Tue, 15 Mar 2022 10:57:26 +0100 +Subject: [PATCH] main: Prefer buffer driver to polling driver +Origin: upstream, https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/355 + +In c7fb43e0, we added a buffer driver for ambient light sensors, but we +added it to the list of drivers in a way that would favour polling +drivers. Since we started using IIO_SENSOR_PROXY_TYPE to tag devices, +and as those can support multiple drivers, we need to prefer the buffer +driver as it's the one that doesn't require constant monitoring. + +This also fixes operations on some Dell laptops where the polling driver +is completely broken. + +See https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/352 + +--- + src/iio-sensor-proxy.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/iio-sensor-proxy.c ++++ b/src/iio-sensor-proxy.c +@@ -58,8 +58,8 @@ + &iio_buffer_accel, + &iio_poll_accel, + &input_accel, +- &iio_poll_light, + &iio_buffer_light, ++ &iio_poll_light, + &hwmon_light, + &fake_compass, + &fake_light, diff -Nru iio-sensor-proxy-2.8/debian/patches/series iio-sensor-proxy-2.8/debian/patches/series --- iio-sensor-proxy-2.8/debian/patches/series 2021-04-27 17:28:32.000000000 +0800 +++ iio-sensor-proxy-2.8/debian/patches/series 2022-04-01 10:33:08.000000000 +0800 @@ -1,2 +1,3 @@ 0001-light-Support-sensors-using-raw-values-as-well.patch 0001-drivers-Support-multi-function-sensors.patch +0003-prefer-buffer-driver-to-polling-driver.patch