From nobody Mon Sep 28 21:05:33 2026 Received: from mail-106113.protonmail.ch (mail-106113.protonmail.ch [79.135.106.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC08045FFC2 for ; Mon, 17 Aug 2026 17:09:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.113 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986556; cv=none; b=r59n201UzhGFUOeavjjO0Si9sQjhq+O7e5LIeJ/j9kUnictvj88phzPH/SLXqD+/PfSk6crg9gCF3D+vy1S/sHoTiEAbuJYHLQwGHtmIY8H1kXpeODMfFTzkwiJXJIUI9U82Hr94MAJfxrYPt6ARSHnZq2+quvFqk9yUbTB5Vqk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986556; c=relaxed/simple; bh=KGc+Z0F5Jfw8ScvcfiFrvk9HhEyYqd66fY0XDHsFkhw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XIwL21erDPryKE3lM+t7755Xnqd0SRPqnmryEaKfq1OWvEw4GD1+6gYZvnTDRVlHTCfqM4isc87wElKh4/mAAH9Oo/mdHYiBQCw9dU8CoFl3J/RMlF3/uyBLqVdhzNsk9by15EYDQIeK3x5IwdgUqxrWEo2U+k7Zqgqc6ljiSL4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=7/vwbhbO; arc=none smtp.client-ip=79.135.106.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="7/vwbhbO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1786986550; x=1787245750; bh=Mo3LpkcaoyYE6UusSztfOfDPcFiBUeHo7hDZGdqFz2E=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=7/vwbhbOsFV03mmCQf4/do8Du+vvXSO4Dp2MK772NmK1a5N6IaDwXA5nE7W2UB+5S VCdg4Dd1IYziQp0Wh0nJHNyejzhRALvBAIo2UZuK/zG6OZuldzf9uFbz9OoxittDqD DMcGvXUzsi244/Vn0gUlpKCgbujkgiIJP4yvzuTzKMrcDMlS/YYC39RAV2zp2P/JVD 4pmtYbkm6vz0uOenLAbgcFvYE9gLf5fDLefER98nUvUYARBer2B9WMIRN8XuqdfI8z FFgzFBqtARmFBSv5B/FjG2t2EFKJNGgvcWiFYTl298JR9ST4LrklHsBcXSv68axftd YsWvpQ4owpHEg== X-Pm-Submission-Id: 4hNznw4lbZz1DDs5 From: Esben Haabendal Date: Mon, 17 Aug 2026 19:08:50 +0200 Subject: [PATCH v5 1/8] dt-bindings: iio: light: ltr501: Sort compatible enum array Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-liteon-ltr329-v5-1-6f71ab2b0588@geanix.com> References: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> In-Reply-To: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Travkin , Maslov Dmitry , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Pan Chuang , Yangtao Li Cc: Esben Haabendal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786986543; l=936; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=KGc+Z0F5Jfw8ScvcfiFrvk9HhEyYqd66fY0XDHsFkhw=; b=SVOf7iYTOvPesirRVVo11h62eQNWaPxsQb5XkO7vygzMDxYlM/RUsq5LPNLDy1JmSwvwKAzgv pjJ0FRCxt1YAl2eDq75PCMnvBMF9bjpamLb3GqbXG618STbWR4Y37zI X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= Restore alphabetical sorting of the properties.compatible.enum array. Acked-by: Krzysztof Kozlowski Acked-by: Kuppuswamy Sathyanarayanan Signed-off-by: Esben Haabendal --- Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml= b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml index c8074f180a79..480523ca3750 100644 --- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml @@ -15,9 +15,9 @@ allOf: properties: compatible: enum: + - liteon,ltr301 - liteon,ltr501 - liteon,ltr559 - - liteon,ltr301 =20 reg: maxItems: 1 --=20 2.55.0 From nobody Mon Sep 28 21:05:33 2026 Received: from mail-244106.protonmail.ch (mail-244106.protonmail.ch [109.224.244.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DD91463B6C; Mon, 17 Aug 2026 17:09:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=109.224.244.106 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986561; cv=none; b=hRNN+M2Iu5tDeJfhHL6GXMhM5h3AAZgJ+sKpiF7IOiFMiiqIhUxvu6uU+5taeNaD849WggcNAzvf9zRy3MFDHXOawOByxpJdQqENb/TMkwqcNkx7wUBrM/P6wgVPFbZd5cpNM84VtSdGd6RvY3JCmgqfQl+HofubHNRT2EsdyOw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986561; c=relaxed/simple; bh=yRmQjSr/b1n+2ZKNAqLdatA7z7rC3bcwWePK4c5tw0I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hOBSFxDC7T02qJAZDzM/cDb66GkdDlNCgx4hNRxqTrIPMCnVv6NUFO/tNw94pfCFqhKSPszGbynUggmMl26s26bxdGDMDRlk/C4a/4MN0eF5+SHKZhkWZXGmYF5L0+VT5p1jWbb0kCVIc+Hbu8/FKaMD9hNizpp4pqMQNj0u/Fw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=2aFOtSc5; arc=none smtp.client-ip=109.224.244.106 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="2aFOtSc5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1786986552; x=1787245752; bh=soeIyYa5aMdUFjj2kbEEXj+tc74K06S6inGIFF/6l6Y=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=2aFOtSc5YMNiUt7wH6XfWAXafxQKOkS+phC17QZ9mPJXzPxT+o7190ynAJKHgcxDp VWLHMgRikQxZKLkxW/buVOs36yPqS/wkuzdD0GS8dqFbJDR931dwe+j/vLvZo7xbx8 Om3GFtK454CLegIFuI85bKEcDJQYWOGaeKDdUT3pGI2TJF83HdYk1SHJAJBkJLxIhw n395sEAL45mfdtbG60fnqFgJbGvRxFcKfUUl0MnYIti7SDuT/dIm8MqpQmj3j+vx44 QTLLW8DopfnWR4ccnCluqwEPSAVsFmB/Zezpe0BrhWQqe+JhF9P6lH2q468SBiP1zN pnAFkGX2i26dg== X-Pm-Submission-Id: 4hNzny3KVTz2Sd4C From: Esben Haabendal Date: Mon, 17 Aug 2026 19:08:51 +0200 Subject: [PATCH v5 2/8] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-liteon-ltr329-v5-2-6f71ab2b0588@geanix.com> References: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> In-Reply-To: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Travkin , Maslov Dmitry , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Pan Chuang , Yangtao Li Cc: Esben Haabendal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786986543; l=986; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=yRmQjSr/b1n+2ZKNAqLdatA7z7rC3bcwWePK4c5tw0I=; b=CHr3gyRlALmWbQgLFDT/zXS1SsNp77yU61LOnGxfTmcb+v35jGrYMX47q9zwG+2oQIOEW7oSA NnZB693In6XA4ALZyGl/YkyXmbRCv8wSVUpEC7ipe5qMb1Mk06Op3dU X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= When support for ltr303 was back in 2021, the bindings documentation was not updated accordingly. Fixes: 7d71d289e1ba ("iio: light: ltr501: Added ltr303 driver support") Acked-by: Krzysztof Kozlowski Acked-by: Kuppuswamy Sathyanarayanan Signed-off-by: Esben Haabendal --- Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml= b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml index 480523ca3750..6234e2eaec2e 100644 --- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml @@ -16,6 +16,7 @@ properties: compatible: enum: - liteon,ltr301 + - liteon,ltr303 - liteon,ltr501 - liteon,ltr559 =20 --=20 2.55.0 From nobody Mon Sep 28 21:05:34 2026 Received: from mail-43171.protonmail.ch (mail-43171.protonmail.ch [185.70.43.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B31624611C7; Mon, 17 Aug 2026 17:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986566; cv=none; b=GN1RMAaP0+SG/2KmrhafMJ80H1GWuAZrPzFihti8cMK4mufmqWZBgvS3KDJ3urOQRqAu446NX40furxQuyBgxpzuNl7PijCJ9wTkvQ+J+yMwQ+dDawoXABw5I0Gvo1tDkBjodr5+jhERsyMl02RY7qPuLPSD0L4tz5IGsdbruIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986566; c=relaxed/simple; bh=PuTIb/HEZgC6l6OXlGmoUtC0biKNrJnaiw8tuXLtSMk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cMwhntSOvE0ZIdhJ585SURkl+EuRry4lwjUiOnC0ccNsHPV3AidSuTT13dFJgDeMGH6SYoUYnckAXhIqIER0V+VHOvKH2B4JOF0rphj/2YhP86uJwZDmhNRSLgsWVjkZQJuTvZvoSX7RnVrhVWtW/ff5VH5e+zcrZb7/fjN34BE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=BQufvYEw; arc=none smtp.client-ip=185.70.43.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="BQufvYEw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1786986556; x=1787245756; bh=0DL6SYmMsTzpZ0aoIUNZ/PQEipTLLNLteJIMw/nMfTE=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=BQufvYEwNji1XYxW71kuBtKt5NR0D/pnODeLYmTi7+SqEaPthq9gzkhvs8OYj6kQq hQ4Xv+P9s+1TtMh8HQrwbKe9TU4cq5T8T7eWG618ggIONKY8+43s/noYeMjD1omQ2T BTL6WzKNqokkjeYaTa/SQ6EQQOzXg8T7ZjgK50SiPaKzlRavyhVLA98oawBM0EMNP1 8vfbNjES1SfF69XkZG/Rj6I4fhK7rY0EqsgBZyjR7BL/uA8RK3LL08vBYl/hTr8yni jNcf8BrV+D0bzC4G4izF0B3vBtlOzb0KWy5DewU6CMK8fsqyyawSANVVWR/pVNygHq yy8SrBKztuu1A== X-Pm-Submission-Id: 4hNzp04TJtz1DDWf From: Esben Haabendal Date: Mon, 17 Aug 2026 19:08:52 +0200 Subject: [PATCH v5 3/8] dt-bindings: iio: light: ltr501: Add ltr329 compatible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-liteon-ltr329-v5-3-6f71ab2b0588@geanix.com> References: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> In-Reply-To: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Travkin , Maslov Dmitry , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Pan Chuang , Yangtao Li Cc: Esben Haabendal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786986543; l=1480; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=PuTIb/HEZgC6l6OXlGmoUtC0biKNrJnaiw8tuXLtSMk=; b=lx861XqUGOYl3UBoLgDX+7yn3RBewikW5tcdg4TCu/TV6Dh9K9PsWymVEbwU/BjpAyra+QC5w 7XuxcZuCyaFAOqvir7mnI10Ou7YT/s+OdRa5pV4BPTRuX7SF9FTsTq/ X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= LTR-329ALS-01 is an ambient light sensor similar to LTR-303ALS-01, but without interrupt support. Acked-by: Krzysztof Kozlowski Acked-by: Kuppuswamy Sathyanarayanan Signed-off-by: Esben Haabendal --- .../devicetree/bindings/iio/light/liteon,ltr501.yaml | 17 +++++++++++++= +--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml= b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml index 6234e2eaec2e..73c32b33d886 100644 --- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml @@ -9,14 +9,12 @@ title: LiteON LTR501 I2C Proximity and Light sensor maintainers: - Nikita Travkin =20 -allOf: - - $ref: ../common.yaml# - properties: compatible: enum: - liteon,ltr301 - liteon,ltr303 + - liteon,ltr329 - liteon,ltr501 - liteon,ltr559 =20 @@ -37,6 +35,19 @@ required: - compatible - reg =20 +allOf: + - $ref: ../common.yaml# + + - if: + properties: + compatible: + contains: + enum: + - liteon,ltr329 + then: + properties: + interrupts: false + examples: - | #include --=20 2.55.0 From nobody Mon Sep 28 21:05:34 2026 Received: from mail-106111.protonmail.ch (mail-106111.protonmail.ch [79.135.106.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62C20463B93; Mon, 17 Aug 2026 17:09:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986565; cv=none; b=AtxOWBmm8RKdZGsLMFQxWfvLeZrNGNmiZOe81pxYCgmcJrDLiDbUkVBgYv/YzudMuctHHnd5NIPIEguo3bhc1UrXIP+j/xT3ibyenbEG+fahS8JbSnmoHCY8GoWLk4+PgP53fzFweF0FacH/sq/EU2Q9ZCOzqGrEvsNDHQEliBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986565; c=relaxed/simple; bh=Ae9uSKGvt4ASpB3ozg91XlOoBrfjq9M0C5Gnnoia4mY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tLGWiFuobTXb2DvVMHjpXLx6NDP8J1RAcZwvTZuhAkJGR83H3fwugWAu9vgOeSvrNVk7qk8jMrrKi9lKQYJH98i1OL7Tw/ovqSHwTipRpqM+pqQAEkzs/6NYuY+y3TRJEpvHeN11RxHo+DiX5peD76PzSZcAzTleHIedyB2wcX0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=eRfBYZMc; arc=none smtp.client-ip=79.135.106.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="eRfBYZMc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1786986556; x=1787245756; bh=NP4p0c/yQS0KodRIvOt6w1MZVmsKRmP0TxHhR6hhPtk=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=eRfBYZMcQqlxQA1P8K9N8JdxkYQKYrrRwRZcccS9Qa80IoqkY6uY1YqztinmrVqxX bMJ6O1vnjTRdJQ2Lk49iQqImwmNebmw5iQgenc7gFk18knH+6+Siv2rIOIwZOsilea uvge4LPPK8ScPdeYPoe62/YKnWuhLlK24dwwEAN3OkINjGH1dXhUE8c4FhwmPbVDT8 HPAXS1jqx0VnlKPISMbcc19FQ5XZwbhac0ivtZZuK/rZHNyQ7OzN4qlpk7nDkQZOrW b1WHEM2GfjS1WfRfTBdqJnBAEGAurFPO2LhmWn/lAZ6VoNHP9OpWkhFyUzG5/+ux/K UfpqCj3xw9Pqw== X-Pm-Submission-Id: 4hNzp34Lbyz1DDWl From: Esben Haabendal Date: Mon, 17 Aug 2026 19:08:53 +0200 Subject: [PATCH v5 4/8] iio: light: ltr501: Power down chip if request irq fails Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-liteon-ltr329-v5-4-6f71ab2b0588@geanix.com> References: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> In-Reply-To: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Travkin , Maslov Dmitry , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Pan Chuang , Yangtao Li Cc: Esben Haabendal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , stable@vger.kernel.org, Andy Shevchenko X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786986543; l=1025; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=Ae9uSKGvt4ASpB3ozg91XlOoBrfjq9M0C5Gnnoia4mY=; b=iHGZ7Lu1u8xFaQDIdK7JD1Hfgcc93iNLEq6gpUCd1nzwW7rPkMp/+eGIy1yKChtyPLnx6febR 3EXypfTyBThDWPyzEvyzu9P+1I3nnKmLFsDOTTBdPn3m/P1SKZvO88c X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= In case devm_request_threaded_irq() failed, we were leaving the chip powered instead of powering it down again. Power down the chip switching ALS and PS modes to standby. Fixes: 7ac702b3144b ("iio: ltr501: Add interrupt support") Cc: stable@vger.kernel.org Acked-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Signed-off-by: Esben Haabendal --- drivers/iio/light/ltr501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 7d045be78c6d..7746d374688f 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -1540,7 +1540,7 @@ static int ltr501_probe(struct i2c_client *client) if (ret) { dev_err(&client->dev, "request irq (%d) failed\n", client->irq); - return ret; + goto powerdown_on_error; } } else { indio_dev->info =3D data->chip_info->info_no_irq; --=20 2.55.0 From nobody Mon Sep 28 21:05:34 2026 Received: from mail-106112.protonmail.ch (mail-106112.protonmail.ch [79.135.106.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABBCD463B79 for ; Mon, 17 Aug 2026 17:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.112 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986578; cv=none; b=KmdR26HmzfFUhhsAFpm/J5B73tlfz3cFpXCR4xuqA4J1Q3xRPeotu6cLdDANTomhyxEC8f3aIp+P/1VyDGzHwX+c2hDNNX3qVZDSes6uYABTgOHQ9pHhpvapUk1vFbfbQNA/0JZOzXMI+2wVFeXodI1UaeLThrqf552TgaNEywA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986578; c=relaxed/simple; bh=UWbyqh4bpm8+cAfa9dXxHxfmaEfW1Oi+9XJLB0ISDPw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QJFa0QzJ/9HC7zX2tD3gyD5Mwj7kaW0fBQfFI9zLFFhaDvHUJ63wKu73qQ2RzCyoKpqWajmBwYwgQB3on5MSs13Pt1cFopzAe2NHeYD+Sd4HkYzcVlMHkTXoVBBbnHohHOgVDHikdaa2gECd5SNqFO98PS/IwC6WVLw4DpSkNNA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=1gXNcxwE; arc=none smtp.client-ip=79.135.106.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="1gXNcxwE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1786986558; x=1787245758; bh=dFbW9MGwom17L9c0xKlgzqzd0x2gE+0iK1G6X3CQ5mA=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=1gXNcxwEhXpFB5k7sVl0TxIzsc/sHz+dPugFhwcu8fyQKV21hbQBF+ceMQF5/uNws WC/lBRHUGgrg/voCjozbY2heHshtSZs6MYgeN8Zm76AhIrDAROeLQMZvCDZ1gS9Pn+ u0zobO2i2IV4Nken4fxKE1MOo3B8IyNMqScoUuIDv2btdU72HeFPQ6/oKFO6zSA9N2 IbEn6QCgYhDPkI1K16i+e6pV04PWzGkk/OM6xNhrXgNGijvDIWfTWHT8PwMLBHEBET Q4EzpAbU99LOiha579KdMC0eGJKHTNkBZMtS/WNEfb2yQ+5A6PIOue+j+fA88GQK5n NubyA6MqEeTfA== X-Pm-Submission-Id: 4hNzp53Hfqz1DFFP From: Esben Haabendal Date: Mon, 17 Aug 2026 19:08:54 +0200 Subject: [PATCH v5 5/8] iio: light: ltr501: Drop duplicated error message Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-liteon-ltr329-v5-5-6f71ab2b0588@geanix.com> References: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> In-Reply-To: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Travkin , Maslov Dmitry , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Pan Chuang , Yangtao Li Cc: Esben Haabendal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Andy Shevchenko X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786986543; l=970; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=UWbyqh4bpm8+cAfa9dXxHxfmaEfW1Oi+9XJLB0ISDPw=; b=y+IXytm5B9BehEeqlGSVdhNSM+oK67C7HNRzJd1FOMifhhmbnzaWyz7BIi853B6TutJPLskbB er2I6YbktCtCHPSiTHagnkK9YTy+N/w3zXhEaODah2famFyoIH4KMcq X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= The dev_err() message was causing duplicated error messages, as devm_request_threaded_irq() calls dev_err_probe() on failure. Acked-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Signed-off-by: Esben Haabendal --- drivers/iio/light/ltr501.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 7746d374688f..b36bd10a0262 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -1537,11 +1537,8 @@ static int ltr501_probe(struct i2c_client *client) IRQF_ONESHOT, "ltr501_thresh_event", indio_dev); - if (ret) { - dev_err(&client->dev, "request irq (%d) failed\n", - client->irq); + if (ret) goto powerdown_on_error; - } } else { indio_dev->info =3D data->chip_info->info_no_irq; } --=20 2.55.0 From nobody Mon Sep 28 21:05:34 2026 Received: from mail-43171.protonmail.ch (mail-43171.protonmail.ch [185.70.43.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CCF0466AF1 for ; Mon, 17 Aug 2026 17:09:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986588; cv=none; b=pfPwJ1mODMzbId8Tg+hGaRMC6cX5fBSUSFYdMbZJ9oygzXI310JZ0L51s3kPkCx0EOdn8f6bK1qnTgFLYpsZwq9/5xsNfAEXQcZg6Z3GaXSIGLUTuPcPRv3Z22ocYCLEDFFoHEcGmZ39W9KzVpgrPKZwQTaU018Hd3UWsR30DDA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986588; c=relaxed/simple; bh=05r0E2UencTylpGUfWAVrIUppX13gbc8uqKtxoN9aco=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FyLT94V8kPa4fZWm9uXjATkg0V0Ps18USiMVp/V3rmNQIk/aHLbqpY5kbcCpomOUQy9nBL9Q/IC/uTf+woMSvaGSF2UA7ic/C+vtdQeBOjH4chxfrFi6HY2r6dDOmfqBh8YvpXQ5J7zsKetPkZoj+psdw8fGGVcOtLZBoMRMUpE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=AOMmIFic; arc=none smtp.client-ip=185.70.43.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="AOMmIFic" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1786986563; x=1787245763; bh=zTG0glKZ4EdPd7ZawStj89BtMUj3NqUD1Toxdlh3S/Q=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=AOMmIFicuO+ptaCoKtJeTuZGAK5zWA+ooO87Jcerdvlyy6q4bTMvTjeJAR6QP5zqB LNTYq5dfFVarjJ/syr0FJ9yJJfdYcX/55GJbePSSGVG969wBlAcxfghBxRuolvFhTb 9gpgJlKWeQz/92uO/WcG7eckNVGLGz0u3o7xiWabimbXuvgUJzft2eiQdS+aI4Xkil FIMlXT+n7HJHm2w3eS9Hb9C7aMZ37DoFa327iSvBdTM8wWhCYQwPVrICH8JrcWUOdh J1YQ2DrV757r41a31N39tJXanNb+hEGRtpoB8kmTlbFSTr7Do5F4Cc+JveWiM5wA5k Fca238DhYlAeA== X-Pm-Submission-Id: 4hNzp70s60z2SchQ From: Esben Haabendal Date: Mon, 17 Aug 2026 19:08:55 +0200 Subject: [PATCH v5 6/8] iio: light: ltr501: Add ltr329 driver support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-liteon-ltr329-v5-6-6f71ab2b0588@geanix.com> References: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> In-Reply-To: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Travkin , Maslov Dmitry , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Pan Chuang , Yangtao Li Cc: Esben Haabendal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786986543; l=4503; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=05r0E2UencTylpGUfWAVrIUppX13gbc8uqKtxoN9aco=; b=4cVgkjuPOeoFmgU9Ge7BR4U2YkxM+DhxsDlJBz3Aa2buQ9oViAGXewBfURQqvfFyVrUyKZpkC YYRS4nf+VLRB6A8gtrTlwNJgPx9RSJSvZxZprfILnLkWszM3ssU2s6M X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= This adds support for the LTR-329ALS-01 chip, which is similar to LTR-303ALS-01, except for interrupt, which LTR-329ALS-01 chip does not have. Reviewed-by: Nuno S=C3=A1 Acked-by: Kuppuswamy Sathyanarayanan Signed-off-by: Esben Haabendal --- drivers/iio/light/ltr501.c | 47 ++++++++++++++++++++++++++++++++++++++++--= ---- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index b36bd10a0262..51ab387f24a3 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -9,6 +9,7 @@ * TODO: IR LED characteristics */ =20 +#include #include #include #include @@ -94,6 +95,7 @@ enum { ltr559, ltr301, ltr303, + ltr329, }; =20 struct ltr501_gain { @@ -140,6 +142,7 @@ struct ltr501_chip_info { u8 als_mode_active; u8 als_gain_mask; u8 als_gain_shift; + bool no_irq_support; struct iio_chan_spec const *channels; const int no_channels; const struct iio_info *info; @@ -178,6 +181,11 @@ static const struct ltr501_samp_table ltr501_ps_samp_t= able[] =3D { {500000, 2000000} }; =20 +static bool ltr501_has_irq_support(const struct ltr501_chip_info *info) +{ + return !info->no_irq_support; +} + static int ltr501_match_samp_freq(const struct ltr501_samp_table *tab, int len, int val, int val2) { @@ -821,6 +829,9 @@ static int __ltr501_write_raw(struct iio_dev *indio_dev, if (ret < 0) return ret; =20 + if (!ltr501_has_irq_support(info)) + return ret; + /* update persistence count when changing frequency */ ret =3D ltr501_write_intr_prst(data, chan->type, 0, data->als_period); @@ -840,6 +851,9 @@ static int __ltr501_write_raw(struct iio_dev *indio_dev, if (ret < 0) return ret; =20 + if (!ltr501_has_irq_support(info)) + return ret; + /* update persistence count when changing frequency */ ret =3D ltr501_write_intr_prst(data, chan->type, 0, data->ps_period); @@ -1257,6 +1271,18 @@ static const struct ltr501_chip_info ltr501_chip_inf= o_tbl[] =3D { .channels =3D ltr301_channels, .no_channels =3D ARRAY_SIZE(ltr301_channels), }, + [ltr329] =3D { + .partid =3D 0x0A, + .als_gain =3D ltr559_als_gain_tbl, + .als_gain_tbl_size =3D ARRAY_SIZE(ltr559_als_gain_tbl), + .als_mode_active =3D BIT(0), + .als_gain_mask =3D BIT(2) | BIT(3) | BIT(4), + .als_gain_shift =3D 2, + .no_irq_support =3D true, + .info_no_irq =3D <r301_info_no_irq, + .channels =3D ltr301_channels, + .no_channels =3D ARRAY_SIZE(ltr301_channels), + }, }; =20 static int ltr501_write_contr(struct ltr501_data *data, u8 als_val, u8 ps_= val) @@ -1369,13 +1395,15 @@ static int ltr501_init(struct ltr501_data *data) =20 data->ps_contr =3D status | LTR501_CONTR_ACTIVE; =20 - ret =3D ltr501_read_intr_prst(data, IIO_INTENSITY, &data->als_period); - if (ret < 0) - return ret; + if (ltr501_has_irq_support(data->chip_info)) { + ret =3D ltr501_read_intr_prst(data, IIO_INTENSITY, &data->als_period); + if (ret < 0) + return ret; =20 - ret =3D ltr501_read_intr_prst(data, IIO_PROXIMITY, &data->ps_period); - if (ret < 0) - return ret; + ret =3D ltr501_read_intr_prst(data, IIO_PROXIMITY, &data->ps_period); + if (ret < 0) + return ret; + } =20 return ltr501_write_contr(data, data->als_contr, data->ps_contr); } @@ -1530,6 +1558,11 @@ static int ltr501_probe(struct i2c_client *client) if (ret < 0) return ret; =20 + if (!ltr501_has_irq_support(data->chip_info) && client->irq > 0) { + client->irq =3D 0; + dev_warn(&client->dev, "chip doesn't support IRQ"); + } + if (client->irq > 0) { ret =3D devm_request_threaded_irq(&client->dev, client->irq, NULL, ltr501_interrupt_handler, @@ -1601,6 +1634,7 @@ static const struct i2c_device_id ltr501_id[] =3D { { .name =3D "ltr559", .driver_data =3D ltr559 }, { .name =3D "ltr301", .driver_data =3D ltr301 }, { .name =3D "ltr303", .driver_data =3D ltr303 }, + { .name =3D "ltr329", .driver_data =3D ltr329 }, { } }; MODULE_DEVICE_TABLE(i2c, ltr501_id); @@ -1610,6 +1644,7 @@ static const struct of_device_id ltr501_of_match[] = =3D { { .compatible =3D "liteon,ltr559", }, { .compatible =3D "liteon,ltr301", }, { .compatible =3D "liteon,ltr303", }, + { .compatible =3D "liteon,ltr329", }, { } }; MODULE_DEVICE_TABLE(of, ltr501_of_match); --=20 2.55.0 From nobody Mon Sep 28 21:05:34 2026 Received: from mail-244106.protonmail.ch (mail-244106.protonmail.ch [109.224.244.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D880E463B8D; Mon, 17 Aug 2026 17:09:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=109.224.244.106 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986582; cv=none; b=c4/ytblybNEj0uvFRwKTcn42FTyg8HyDsNyT8Er90oIxX6Iie7+vr+QP3JNpQMdIIOxZlR6Ml6p+bxZe9b7kmfnt8InUpt7C9bKlTwv7nahE8wkQJ9pihxcCWoTl4pLBuaOX8MtAkHRCMz41kTCZZEm82BI/BiLExZnzoP7+jJ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986582; c=relaxed/simple; bh=2vfBl9nHbr0SfKm0Xo3cnhWVmJNB9UljX67gOqtqHsE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Trtsv0CqLhXKzs/HOhjlh3RM19euqaEx/pDc7JeVNWPPSjsbAnB+NVugtE/fN+zcuUjJzQ6dC7/RlR48Ej14bFg2hCcF1wNBLf2VLwQ8E8kAN1bN+VHc5mckUWwVFSVDuXP7xmlpFUATVEYNW5WA62CE17es7We8ItrjJWTBOfs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=wiDnXDhb; arc=none smtp.client-ip=109.224.244.106 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="wiDnXDhb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1786986567; x=1787245767; bh=bavJViIYJIFOUAUUuYm14SbniokRCHshi2k7tcZDAqw=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=wiDnXDhbcG82fQSfhxA5hP4Dx/7RBI3dzFJ6lId1ByJZLotmTWPKFyhGUB2BczpWk KvJUtVaMJ1n65q5HyeXIpS6lGgLqe+FgwxNAb7FbplpsGP8lDhD7qSEAOkhESqXyih CYYk8Q9htfxmOEjz9J+qdbuNiAahaTtDNZLE2g9CBrRtSKj3yVoC//SXcBYW9uVPou Q6QouBvTFnuaRyfHaPcrmau4JyZsZKBaogszM80eJACxjQdiMgoj4B8yW8P/YoqYxg zxSKMuYuPxGyKy79ySZXXBbBNXzINAPYejvCvxz2utGL9FudgzUBRGFx7bRQ+QZ/rZ sIdDCgRmSuIPw== X-Pm-Submission-Id: 4hNzpD2v8Xz2SchF From: Esben Haabendal Date: Mon, 17 Aug 2026 19:08:56 +0200 Subject: [PATCH v5 7/8] iio: light: ltr501: Fix sorting order of device arrays Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-liteon-ltr329-v5-7-6f71ab2b0588@geanix.com> References: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> In-Reply-To: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Travkin , Maslov Dmitry , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Pan Chuang , Yangtao Li Cc: Esben Haabendal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Andy Shevchenko X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786986543; l=4335; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=2vfBl9nHbr0SfKm0Xo3cnhWVmJNB9UljX67gOqtqHsE=; b=WT0iYBsMyx3R/c/BKYaqXN3HEYEXqsfv0vYh49QUrwkQFWNeAkTQzzL2rHoAvL7eNVmUhrWKO 4Vf7d6ZhrQRCXa59PFfTaF4oMMtyS8ylMdKsJaQZiJKt5/W+mtwQJ0C X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= Using alphanumerical sort order for these should help reduce merge conflicts. The 0 assignment to the first entry is not needed, as the first entry will always be 0. The main thing is to keep the values here in sync with the elements in ltr501_chip_info_tbl[]. Acked-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Signed-off-by: Esben Haabendal --- drivers/iio/light/ltr501.c | 68 +++++++++++++++++++++++-------------------= ---- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 51ab387f24a3..d9b68da2452b 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -91,11 +91,11 @@ struct ltr501_samp_table { #define LTR501_RESERVED_GAIN -1 =20 enum { - ltr501 =3D 0, - ltr559, ltr301, ltr303, ltr329, + ltr501, + ltr559, }; =20 struct ltr501_gain { @@ -1219,34 +1219,6 @@ static const struct iio_info ltr301_info =3D { }; =20 static const struct ltr501_chip_info ltr501_chip_info_tbl[] =3D { - [ltr501] =3D { - .partid =3D 0x08, - .als_gain =3D ltr501_als_gain_tbl, - .als_gain_tbl_size =3D ARRAY_SIZE(ltr501_als_gain_tbl), - .ps_gain =3D ltr501_ps_gain_tbl, - .ps_gain_tbl_size =3D ARRAY_SIZE(ltr501_ps_gain_tbl), - .als_mode_active =3D BIT(0) | BIT(1), - .als_gain_mask =3D BIT(3), - .als_gain_shift =3D 3, - .info =3D <r501_info, - .info_no_irq =3D <r501_info_no_irq, - .channels =3D ltr501_channels, - .no_channels =3D ARRAY_SIZE(ltr501_channels), - }, - [ltr559] =3D { - .partid =3D 0x09, - .als_gain =3D ltr559_als_gain_tbl, - .als_gain_tbl_size =3D ARRAY_SIZE(ltr559_als_gain_tbl), - .ps_gain =3D ltr559_ps_gain_tbl, - .ps_gain_tbl_size =3D ARRAY_SIZE(ltr559_ps_gain_tbl), - .als_mode_active =3D BIT(0), - .als_gain_mask =3D BIT(2) | BIT(3) | BIT(4), - .als_gain_shift =3D 2, - .info =3D <r501_info, - .info_no_irq =3D <r501_info_no_irq, - .channels =3D ltr501_channels, - .no_channels =3D ARRAY_SIZE(ltr501_channels), - }, [ltr301] =3D { .partid =3D 0x08, .als_gain =3D ltr501_als_gain_tbl, @@ -1283,6 +1255,34 @@ static const struct ltr501_chip_info ltr501_chip_inf= o_tbl[] =3D { .channels =3D ltr301_channels, .no_channels =3D ARRAY_SIZE(ltr301_channels), }, + [ltr501] =3D { + .partid =3D 0x08, + .als_gain =3D ltr501_als_gain_tbl, + .als_gain_tbl_size =3D ARRAY_SIZE(ltr501_als_gain_tbl), + .ps_gain =3D ltr501_ps_gain_tbl, + .ps_gain_tbl_size =3D ARRAY_SIZE(ltr501_ps_gain_tbl), + .als_mode_active =3D BIT(0) | BIT(1), + .als_gain_mask =3D BIT(3), + .als_gain_shift =3D 3, + .info =3D <r501_info, + .info_no_irq =3D <r501_info_no_irq, + .channels =3D ltr501_channels, + .no_channels =3D ARRAY_SIZE(ltr501_channels), + }, + [ltr559] =3D { + .partid =3D 0x09, + .als_gain =3D ltr559_als_gain_tbl, + .als_gain_tbl_size =3D ARRAY_SIZE(ltr559_als_gain_tbl), + .ps_gain =3D ltr559_ps_gain_tbl, + .ps_gain_tbl_size =3D ARRAY_SIZE(ltr559_ps_gain_tbl), + .als_mode_active =3D BIT(0), + .als_gain_mask =3D BIT(2) | BIT(3) | BIT(4), + .als_gain_shift =3D 2, + .info =3D <r501_info, + .info_no_irq =3D <r501_info_no_irq, + .channels =3D ltr501_channels, + .no_channels =3D ARRAY_SIZE(ltr501_channels), + }, }; =20 static int ltr501_write_contr(struct ltr501_data *data, u8 als_val, u8 ps_= val) @@ -1630,21 +1630,21 @@ static const struct acpi_device_id ltr_acpi_match[]= =3D { MODULE_DEVICE_TABLE(acpi, ltr_acpi_match); =20 static const struct i2c_device_id ltr501_id[] =3D { - { .name =3D "ltr501", .driver_data =3D ltr501 }, - { .name =3D "ltr559", .driver_data =3D ltr559 }, { .name =3D "ltr301", .driver_data =3D ltr301 }, { .name =3D "ltr303", .driver_data =3D ltr303 }, { .name =3D "ltr329", .driver_data =3D ltr329 }, + { .name =3D "ltr501", .driver_data =3D ltr501 }, + { .name =3D "ltr559", .driver_data =3D ltr559 }, { } }; MODULE_DEVICE_TABLE(i2c, ltr501_id); =20 static const struct of_device_id ltr501_of_match[] =3D { - { .compatible =3D "liteon,ltr501", }, - { .compatible =3D "liteon,ltr559", }, { .compatible =3D "liteon,ltr301", }, { .compatible =3D "liteon,ltr303", }, { .compatible =3D "liteon,ltr329", }, + { .compatible =3D "liteon,ltr501", }, + { .compatible =3D "liteon,ltr559", }, { } }; MODULE_DEVICE_TABLE(of, ltr501_of_match); --=20 2.55.0 From nobody Mon Sep 28 21:05:34 2026 Received: from mail-106112.protonmail.ch (mail-106112.protonmail.ch [79.135.106.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8474E463B6A; Mon, 17 Aug 2026 17:09:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.112 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986584; cv=none; b=KhUw8gJuMO3GpcKa7Pcm4xpKLlhGa32n7ojgJTU+NfSjviiSj4vLAik8Yg2n+cumZOoAk/qhol0mgCrGFQe94CqPyziAP2ZOw/Jy11JBa1ql11dE1D5khmZJkB8DSiJPDacByVE38ghdVYw7WQQCazUHtYNLkpzgnhDEpJeZAVI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786986584; c=relaxed/simple; bh=1R5l13nGG6wWHikYX00pgeDaQL/koWmDsWy7xRip0mg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JM3tgeUcD5p/jp/rR2vYkjFsU017pbOYMjTQ1QhTtu23JulzhJ8xOJQrsNDee758eYlhyqpCTmqrJPVLwrrFI2WVIdODnTZcAEe8KFd8Nian6k47hANPvdFGoHgTToF/w2GF4ueynVzkGfdK4ELu4gfo+KiNp966/awJszom0Gg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=hq86TSva; arc=none smtp.client-ip=79.135.106.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="hq86TSva" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail; t=1786986568; x=1787245768; bh=YDw3oSWzWK2HKj3WDtK2LZKQG57DcwUjfSlLHo7+tI8=; h=From:Date:Subject:Message-Id:References:In-Reply-To:To:Cc:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=hq86TSvaSDn3h7sVZIz3+YLqGEiZlDB2iVUSxtBjhcZtc+zGicecg/C5GvRzlyJG1 f1/7lN5bSL230n6fVSNCtN+1ZxX/aFXFR0Vq83Hdz4mh51FeIw43FHr64ty4oogMxu 6QWN8TRKFLdds4wVYE//2tB7PqmoxNwLo5fAcIq7kXB7b/vDaUovMMsFZKJDUPKc30 xWzcvj6Li17J11BGblbFSR+3fh6VACnugCv1uKYO+p8ec/QrcZLkxZYcW5Wln3P/I4 XplqJ5dqeTxfhsUuI3Ku4xwC1YMVhFDaXMtt7JTMP0apLp3h1rkJG7pZoJxZfZu2Ug dWxCJm0qUr0OQ== X-Pm-Submission-Id: 4hNzpH1HGSz2Sd3d From: Esben Haabendal Date: Mon, 17 Aug 2026 19:08:57 +0200 Subject: [PATCH v5 8/8] dt-bindings: iio: light: ltr501: Make proximity-near-level conditional Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-liteon-ltr329-v5-8-6f71ab2b0588@geanix.com> References: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> In-Reply-To: <20260817-liteon-ltr329-v5-0-6f71ab2b0588@geanix.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nikita Travkin , Maslov Dmitry , Kuppuswamy Sathyanarayanan , Thomas Gleixner , Pan Chuang , Yangtao Li Cc: Esben Haabendal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786986543; l=1013; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=1R5l13nGG6wWHikYX00pgeDaQL/koWmDsWy7xRip0mg=; b=j8qhxhnD7DmoVLMc+1w+09j/Jua2MPzO2c0MX+idZCTpPCXoqEUYo3R+6715JkcG7DHrYA6JH meNiAWz7uu2D8S7FI2epGzQt4N2hvV/oEThWZQ6wjK4JMYLmBXtLIwb X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= The proxmity-near-level attribute is only supported by ltr501 and ltr559 chips. Signed-off-by: Esben Haabendal --- .../devicetree/bindings/iio/light/liteon,ltr501.yaml | 12 ++++++++= ++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml= b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml index 73c32b33d886..20abd7da080d 100644 --- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml @@ -48,6 +48,18 @@ allOf: properties: interrupts: false =20 + - if: + properties: + compatible: + contains: + enum: + - liteon,ltr301 + - liteon,ltr303 + - liteon,ltr329 + then: + properties: + proximity-near-level: false + examples: - | #include --=20 2.55.0