From nobody Sat Jul 25 18:08:48 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 191C73644A4; Wed, 15 Jul 2026 08:23:56 +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=1784103839; cv=none; b=nDy4CpPLBCOpd8KNHXkDcDupNTpq+qaYDR0NeAllxyJOQivJCbxUIgL9k5Cs/+ov2VQNH4/FiLjMt7FV9Y1PUe7PtceaCZ9ljIAym/SOjhbvgNu4aF0WqO1jYewXH/2Bj48AOgSm9KNPDhzA4B1tZtwv9BTkh9W/coav24nFgfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784103839; c=relaxed/simple; bh=ptiLm+CNIzLah7x8+408IhZd1o2PQjYIBj4oQIDGZjk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RrTFW18xIub2K6p/WbJzVNBcDeBi5T6OEBLN9PYQQ15yHc9AwVFo1lvc5HdmxZLsDolN4YprS4kuPHiFDTPnw7GUFUTcZbPQYm05FnRgbSAZBftrzi2447F7XjWg44v0PP+9dxxuHeUNJF6PX938hKge/Ql+V0qUzawSkJ23ukk= 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=ApxJG099; 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="ApxJG099" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail3; t=1784103832; x=1784363032; bh=RIOQ5ssVhDJTh9QFgn+Z93atKpzQKchC8CMgcI3Y4aw=; 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=ApxJG099PjrTcPDO8Hpnv4iZr6dV+hM+jVoHrLiRsPK2GWp0sgjofdIZXnsN0ndK+ n4hKpvzp2+G0WME2q+NH+H4mtKwkHNepb8CyfGx55OncHmbXrXP0rDaAd3uQut/CYW gQtncNdPV5WiG5OLAMquvu35T+Ceayv1H4ttGqcvEjVJnMnW+vwXORmLKQBNbGkYMp fjLjDfNz7trGE4y8RSMiqg73PhZ+B7yLMVlosImmnHE4tN7OT9bqdzhkRC4yU5lLRv +YE/cb8uIn9Aq9CnI3o21EIKL3ZP519vJXGKLo48UWRmpKSSlbW6yTgb80uWvjbl04 ta5b0s+xIJ/Mg== X-Pm-Submission-Id: 4h0Tj30JDPz2ScqT From: Esben Haabendal Date: Wed, 15 Jul 2026 10:23:48 +0200 Subject: [PATCH 1/3] 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: <20260715-liteon-ltr329-v1-1-31f027051594@geanix.com> References: <20260715-liteon-ltr329-v1-0-31f027051594@geanix.com> In-Reply-To: <20260715-liteon-ltr329-v1-0-31f027051594@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 Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Esben Haabendal , Jonathan Cameron X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784103828; l=832; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=ptiLm+CNIzLah7x8+408IhZd1o2PQjYIBj4oQIDGZjk=; b=U4lutJHRFAErP2cjsFTVXVXBnQSKPFnhMVU9lxOuFyvs7uPARZOD5Dy9eJH1VpXhqK9WGgVyt r0hPbO23jSRBjhZw+12wZYKHhVXzUGorny3yj/G7lngpgppwyE+Lxue 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") 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 c8074f180a79..ab9bb68dd736 100644 --- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml @@ -18,6 +18,7 @@ properties: - liteon,ltr501 - liteon,ltr559 - liteon,ltr301 + - liteon,ltr303 =20 reg: maxItems: 1 --=20 2.55.0 From nobody Sat Jul 25 18:08:48 2026 Received: from mail-43172.protonmail.ch (mail-43172.protonmail.ch [185.70.43.172]) (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 A1C8E3CBE7C; Wed, 15 Jul 2026 08:24:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784103845; cv=none; b=D69FbC4KDe5FT4+P9EP9QdlMuNHlybbRVl4NTUBygDtwZ1Q1A3OvAPgjXBJi7H73bn3VwJyNNlOhOp8GQ9+wEHLuD9x0LRb9Qw1wx+4TGrmRfd3Ts1u302ZAN1udvOm3sta0E8SgifohYglZdj+E2ZG9pO83GQVmu0eP3zMIFPo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784103845; c=relaxed/simple; bh=feUXKoU1OigzdRs8cwri1uskaBwwc5Ly4ocsOXChL5o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jfH7BkhyiaH+RUCXKEye6MeORSYvu+BVEjsDzDWc7h2PQ8aznCfTkgU4vugqx7uxA5eMxZ1Wa2loDmxm40+caaNbxfVr717YWWy3yZTlZPf8E0KKFDxkRyGHsDDWcOIrblfjWNdNYxyCBrJwB1ikHYymw/ahJlDyGA3UoTiLMEg= 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=WxoMRVMe; arc=none smtp.client-ip=185.70.43.172 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="WxoMRVMe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail3; t=1784103833; x=1784363033; bh=5B+E/oOoq7h8vHYA+0lGPxncQ4PnLMN7/YIu4Ypf8mc=; 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=WxoMRVMefz6EEe5jU5AcVZy1XIwrc6CxfGLIUfeiRRBxm0EOTHZ1bRIPtXOaJbAc2 47INkihSsASRI1mV/3Gowiipr+f/Yke2tYWTBSYpFHccn1JRdBC0PEtYx8T3gJd3l/ Uxk2G/kti7gUjd7RkWQH6YbRQ7bhOnIyc9vQsb+/vpsNmkOkvK4VIAzD8/JzvEKfpk eC3aHgaSzP3hrnLkyYBLHKxPFqr2G8YFfAtE9wx8XWTx60WgP7VwZfu6i8QYd0K6Pg mA8+Cod3adu3NV+ClA+PVWEPllIpZwMpk6wcCubw4dOq5svlv4/6aSSXC3JEyTmuQf 9++tzyKwLjqGw== X-Pm-Submission-Id: 4h0Tj45ZJCz2ScPw From: Esben Haabendal Date: Wed, 15 Jul 2026 10:23:49 +0200 Subject: [PATCH 2/3] 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: <20260715-liteon-ltr329-v1-2-31f027051594@geanix.com> References: <20260715-liteon-ltr329-v1-0-31f027051594@geanix.com> In-Reply-To: <20260715-liteon-ltr329-v1-0-31f027051594@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 Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Esben Haabendal , Jonathan Cameron X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784103828; l=759; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=feUXKoU1OigzdRs8cwri1uskaBwwc5Ly4ocsOXChL5o=; b=JJLR2vWI6lCKKiFAprlkqVa+T6yWuUsJgkVWJltq6apORLXnU4dYAHxt+vjCWLfkD3ACqd6oH LlB88Ka7trNDS2AY6d801jhIXs4A3UUXrgWp2oBlHtkyaduYOlUrlNN 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. 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 ab9bb68dd736..76e81eba7ea4 100644 --- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml @@ -19,6 +19,7 @@ properties: - liteon,ltr559 - liteon,ltr301 - liteon,ltr303 + - liteon,ltr329 =20 reg: maxItems: 1 --=20 2.55.0 From nobody Sat Jul 25 18:08:48 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 670EE9460; Wed, 15 Jul 2026 08:23:58 +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=1784103840; cv=none; b=ny+Q8yhkymW7nOM67XEBknEYQ5ba+hAP7zdGymgVhJOlMwuxpGtMNCdv+bVFfi9SkgXY4wriRzzl0UOZ6ZINhQBcavn/65ZTw7lYAttB8mxpJqB0UXuQeh2sa8M+Q7ssksObEbt9qSWq5HDkTPcgXN+UOXapGZybwsgBHorfVSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784103840; c=relaxed/simple; bh=VZ/rT6r/lbKkXhS2ooZqBH0gKlX7C3aAwmM1S4fC78s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=haFsE1d/hj24EMwGZVJxMYVnjjcPF+LTE0e1tDN+pLgU92+5+Gp+KKjWc86Aw4C4MtgrUm7N83tJaO2WJzHEhw1O63UMvBa2s5IvbtWlZ7Vzd4XXe/f74AMT6jM7fbrx//7ovAXa1hqWWorEW8zcQEh97YvDpYNkb10U8l3nD84= 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=WZmI6P0v; 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="WZmI6P0v" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail3; t=1784103836; x=1784363036; bh=Tfqh/xGkyiil1OQKiZ8iknxMpLG97l2M1+3idrkjWAo=; 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=WZmI6P0vTbFD+85YSBygIQUCeuE8VxP4nKao5AXvUNWRvUuVgxLvm25YETT4PldvL WZ33SGJMuJTONmNv4KNP/idkJCpJVp8pWPG/6fECEc6RqWXkf6vUbK/qhcrrt0Gp74 l4b5KJpJ1lwm2nzMMTqseCp9mBrn1j5mcWMBB9EXhLhhk2CkImd2dhCxN2VGlCadp8 SGfb4Wo5rBuiYs2Hie6/mxapnwc00a5pIsqLj/4Gd3X3SleyIZHMxGX6ypD0BhB2mz yJvJMxeB0x0cqcTqoeXo/u09Q5MCU+UkaiVBb7Rw1Hrt1qlBNaZOBoea4Gt0lVJChl wyL2aXOWILI0w== X-Pm-Submission-Id: 4h0Tj62y2Hz2Sd33 From: Esben Haabendal Date: Wed, 15 Jul 2026 10:23:50 +0200 Subject: [PATCH 3/3] 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: <20260715-liteon-ltr329-v1-3-31f027051594@geanix.com> References: <20260715-liteon-ltr329-v1-0-31f027051594@geanix.com> In-Reply-To: <20260715-liteon-ltr329-v1-0-31f027051594@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 Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Esben Haabendal , Jonathan Cameron X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784103828; l=3185; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=VZ/rT6r/lbKkXhS2ooZqBH0gKlX7C3aAwmM1S4fC78s=; b=rHXq3SFZW0uf49XCE2q9x19rpExrMzDpKiNJQPzk1g8q2GRBD+EPU2Vq0eIkC/OyBOF5E4pMv ggQjTpbWAAPCSyvlsgxf9PrbAejrcf4NoCefJQkzZvthJ2lXG8/6eaN 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. Signed-off-by: Esben Haabendal --- drivers/iio/light/ltr501.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 7d045be78c6d..815b67a10837 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -94,6 +94,7 @@ enum { ltr559, ltr301, ltr303, + ltr329, }; =20 struct ltr501_gain { @@ -178,6 +179,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 *chip_inf= o) +{ + return chip_info->info !=3D chip_info->info_no_irq; +} + static int ltr501_match_samp_freq(const struct ltr501_samp_table *tab, int len, int val, int val2) { @@ -428,6 +434,9 @@ static int ltr501_read_intr_prst(const struct ltr501_da= ta *data, { int ret, samp_period, prst; =20 + if (!ltr501_has_irq_support(data->chip_info)) + return 0; + switch (type) { case IIO_INTENSITY: ret =3D regmap_field_read(data->reg_als_prst, &prst); @@ -466,6 +475,9 @@ static int ltr501_write_intr_prst(struct ltr501_data *d= ata, int ret, samp_period, new_val; unsigned long period; =20 + if (!ltr501_has_irq_support(data->chip_info)) + return 0; + if (val < 0 || val2 < 0) return -EINVAL; =20 @@ -1257,6 +1269,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, + .info =3D <r301_info_no_irq, + .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) @@ -1531,6 +1555,11 @@ static int ltr501_probe(struct i2c_client *client) return ret; =20 if (client->irq > 0) { + if (!ltr501_has_irq_support(data->chip_info)) { + dev_err(&client->dev, "chip does not support irq\n"); + return -EINVAL; + } + ret =3D devm_request_threaded_irq(&client->dev, client->irq, NULL, ltr501_interrupt_handler, IRQF_TRIGGER_FALLING | @@ -1604,6 +1633,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); @@ -1613,6 +1643,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