]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.13
authorSasha Levin <sashal@kernel.org>
Mon, 10 Mar 2025 12:51:50 +0000 (08:51 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 10 Mar 2025 12:51:50 +0000 (08:51 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.13/dt-bindings-iio-dac-adi-axi-adc-fix-ad7606-pwm-names.patch [new file with mode: 0644]
queue-6.13/iio-adc-ad7606-fix-wrong-scale-available.patch [new file with mode: 0644]
queue-6.13/iio-hid-sensor-prox-split-difference-from-multiple-c.patch [new file with mode: 0644]
queue-6.13/kbuild-hdrcheck-fix-cross-build-with-clang.patch [new file with mode: 0644]
queue-6.13/series

diff --git a/queue-6.13/dt-bindings-iio-dac-adi-axi-adc-fix-ad7606-pwm-names.patch b/queue-6.13/dt-bindings-iio-dac-adi-axi-adc-fix-ad7606-pwm-names.patch
new file mode 100644 (file)
index 0000000..df5e425
--- /dev/null
@@ -0,0 +1,43 @@
+From 0950a1d8d9a2626dc4768a41539afbf82e58ce12 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 29 Jan 2025 12:03:02 +0100
+Subject: dt-bindings: iio: dac: adi-axi-adc: fix ad7606 pwm-names
+
+From: Angelo Dureghello <adureghello@baylibre.com>
+
+[ Upstream commit 02ccd7e5d81af4ae20852fc1ad67e7d943fa5778 ]
+
+Fix make dt_binding_check warning:
+
+DTC [C] Documentation/devicetree/bindings/iio/adc/adi,axi-adc.example.dtb
+.../adc/adi,axi-adc.example.dtb: adc@0: pwm-names: ['convst1'] is too short
+    from schema $id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#
+
+Add "minItems" to pwm-names, it allows to use one single pwm when
+connected to both adc conversion inputs.
+
+Fixes: 7c2357b10490 ("dt-bindings: iio: adc: ad7606: Add iio backend bindings")
+Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
+Acked-by: Rob Herring (Arm) <robh@kernel.org>
+Link: https://patch.msgid.link/20250129-wip-bl-ad7606_add_backend_sw_mode-v3-1-c3aec77c0ab7@baylibre.com
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
+index ab5881d0d017f..52d3f1ce33678 100644
+--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
++++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
+@@ -146,6 +146,7 @@ properties:
+     maxItems: 2
+   pwm-names:
++    minItems: 1
+     items:
+       - const: convst1
+       - const: convst2
+-- 
+2.39.5
+
diff --git a/queue-6.13/iio-adc-ad7606-fix-wrong-scale-available.patch b/queue-6.13/iio-adc-ad7606-fix-wrong-scale-available.patch
new file mode 100644 (file)
index 0000000..96f7d8f
--- /dev/null
@@ -0,0 +1,49 @@
+From 36e5091b94c4985bb2639ba47a0ac905fed56f6c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 29 Jan 2025 12:03:04 +0100
+Subject: iio: adc: ad7606: fix wrong scale available
+
+From: Angelo Dureghello <adureghello@baylibre.com>
+
+[ Upstream commit bead181694df16de464ca2392d0cec2cf15fb978 ]
+
+Fix wrong scale available list since only one value is returned:
+
+...
+iio:device1: ad7606b (buffer capable)
+    8 channels found:
+           voltage0:  (input, index: 0, format: le:S16/16>>0)
+           2 channel-specific attributes found:
+                 attr  0: scale value: 0.305176
+                 attr  1: scale_available value: 0.076293
+Fix as:
+           voltage0:  (input, index: 0, format: le:S16/16>>0)
+           2 channel-specific attributes found:
+                 attr  0: scale value: 0.305176
+                 attr  1: scale_available value: 0.076293 0.152588 0.305176
+
+Fixes: 97c6d857041d ("iio: adc: ad7606: rework scale-available to be static")
+Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
+Link: https://patch.msgid.link/20250129-wip-bl-ad7606_add_backend_sw_mode-v3-3-c3aec77c0ab7@baylibre.com
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/iio/adc/ad7606.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
+index e35d55d03d86a..b60be98f877d6 100644
+--- a/drivers/iio/adc/ad7606.c
++++ b/drivers/iio/adc/ad7606.c
+@@ -1039,7 +1039,7 @@ static int ad7606_read_avail(struct iio_dev *indio_dev,
+               cs = &st->chan_scales[ch];
+               *vals = (int *)cs->scale_avail;
+-              *length = cs->num_scales;
++              *length = cs->num_scales * 2;
+               *type = IIO_VAL_INT_PLUS_MICRO;
+               return IIO_AVAIL_LIST;
+-- 
+2.39.5
+
diff --git a/queue-6.13/iio-hid-sensor-prox-split-difference-from-multiple-c.patch b/queue-6.13/iio-hid-sensor-prox-split-difference-from-multiple-c.patch
new file mode 100644 (file)
index 0000000..c24c756
--- /dev/null
@@ -0,0 +1,63 @@
+From 1b844924f5d4a5d7814c9f2fada77416ba9afa91 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 16 Dec 2024 10:05:53 +0000
+Subject: iio: hid-sensor-prox: Split difference from multiple channels
+
+From: Ricardo Ribalda <ribalda@chromium.org>
+
+[ Upstream commit 4eba4d92906c3814ca3ec65c16af27c46c12342e ]
+
+When the driver was originally created, it was decided that
+sampling_frequency and hysteresis would be shared_per_type instead
+of shared_by_all (even though it is internally shared by all). Eg:
+in_proximity_raw
+in_proximity_sampling_frequency
+
+When we introduced support for more channels, we continued with
+shared_by_type which. Eg:
+in_proximity0_raw
+in_proximity1_raw
+in_proximity_sampling_frequency
+in_attention_raw
+in_attention_sampling_frequency
+
+Ideally we should change to shared_by_all, but it is not an option,
+because the current naming has been a stablished ABI by now. Luckily we
+can use separate instead. That will be more consistent:
+in_proximity0_raw
+in_proximity0_sampling_frequency
+in_proximity1_raw
+in_proximity1_sampling_frequency
+in_attention_raw
+in_attention_sampling_frequency
+
+Fixes: 596ef5cf654b ("iio: hid-sensor-prox: Add support for more channels")
+Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
+Link: https://patch.msgid.link/20241216-fix-hid-sensor-v2-1-ff8c1959ec4a@chromium.org
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/iio/light/hid-sensor-prox.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
+index c83acbd782759..71dcef3fbe57d 100644
+--- a/drivers/iio/light/hid-sensor-prox.c
++++ b/drivers/iio/light/hid-sensor-prox.c
+@@ -49,9 +49,10 @@ static const u32 prox_sensitivity_addresses[] = {
+ #define PROX_CHANNEL(_is_proximity, _channel) \
+       {\
+               .type = _is_proximity ? IIO_PROXIMITY : IIO_ATTENTION,\
+-              .info_mask_separate = _is_proximity ? BIT(IIO_CHAN_INFO_RAW) :\
+-                                    BIT(IIO_CHAN_INFO_PROCESSED),\
+-              .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |\
++              .info_mask_separate = \
++              (_is_proximity ? BIT(IIO_CHAN_INFO_RAW) :\
++                              BIT(IIO_CHAN_INFO_PROCESSED)) |\
++              BIT(IIO_CHAN_INFO_OFFSET) |\
+               BIT(IIO_CHAN_INFO_SCALE) |\
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |\
+               BIT(IIO_CHAN_INFO_HYSTERESIS),\
+-- 
+2.39.5
+
diff --git a/queue-6.13/kbuild-hdrcheck-fix-cross-build-with-clang.patch b/queue-6.13/kbuild-hdrcheck-fix-cross-build-with-clang.patch
new file mode 100644 (file)
index 0000000..2cfb907
--- /dev/null
@@ -0,0 +1,45 @@
+From cda071091162437b5180e2e0e5c4a8fad66dd1ec Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 25 Feb 2025 11:00:31 +0100
+Subject: kbuild: hdrcheck: fix cross build with clang
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+[ Upstream commit 02e9a22ceef0227175e391902d8760425fa072c6 ]
+
+The headercheck tries to call clang with a mix of compiler arguments
+that don't include the target architecture. When building e.g. x86
+headers on arm64, this produces a warning like
+
+   clang: warning: unknown platform, assuming -mfloat-abi=soft
+
+Add in the KBUILD_CPPFLAGS, which contain the target, in order to make it
+build properly.
+
+See also 1b71c2fb04e7 ("kbuild: userprogs: fix bitsize and target
+detection on clang").
+
+Reviewed-by: Nathan Chancellor <nathan@kernel.org>
+Fixes: feb843a469fb ("kbuild: add $(CLANG_FLAGS) to KBUILD_CPPFLAGS")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ usr/include/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/include/Makefile b/usr/include/Makefile
+index 6c6de1b1622b1..e3d6b03527fec 100644
+--- a/usr/include/Makefile
++++ b/usr/include/Makefile
+@@ -10,7 +10,7 @@ UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration
+ # In theory, we do not care -m32 or -m64 for header compile tests.
+ # It is here just because CONFIG_CC_CAN_LINK is tested with -m32 or -m64.
+-UAPI_CFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
++UAPI_CFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
+ # USERCFLAGS might contain sysroot location for CC.
+ UAPI_CFLAGS += $(USERCFLAGS)
+-- 
+2.39.5
+
index eca98d7fd1a9760b0f85a87a2753ff147a2a569a..f40be21998043b36b6fa9e7c018af6bd6dd96f6c 100644 (file)
@@ -196,3 +196,7 @@ iio-adc-ad7192-fix-channel-select.patch
 iio-adc-at91-sama5d2_adc-fix-sama7g5-realbits-value.patch
 mm-hugetlb-add-huge-page-size-param-to-huge_ptep_get_and_clear.patch
 arm64-hugetlb-fix-huge_ptep_get_and_clear-for-non-present-ptes.patch
+iio-hid-sensor-prox-split-difference-from-multiple-c.patch
+dt-bindings-iio-dac-adi-axi-adc-fix-ad7606-pwm-names.patch
+iio-adc-ad7606-fix-wrong-scale-available.patch
+kbuild-hdrcheck-fix-cross-build-with-clang.patch