From nobody Sat Jul 25 17:35:03 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 E00FB424D41 for ; Wed, 15 Jul 2026 12:27:46 +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=1784118468; cv=none; b=obTNTXJAHEIEl5phENSA1+ms4PFkGLyquXvZ2fAow74Wy4lfWLWr47T/fh7Vd+YFJB5EaH3jTGL06US9kU6wRo05vaCQHGkI1sWK2VEGdKJq8paLnVkxKXG5IMu4DV8kL+InufttNfmv1ypUDv8w22P7G30FgIOAfnob4WLkjbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784118468; c=relaxed/simple; bh=ptiLm+CNIzLah7x8+408IhZd1o2PQjYIBj4oQIDGZjk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rGN90hYCu58u/3U81o/KRNhUT0CUu5oKdxrD736NcKdxbOvAb7x5CmgNHXQk5+S/JNfmhiADXNTishT4AK0kpGp7o5XyHkAsE3T9taFBBJGWsdBtwLVP9o7MM9WHn05w5YbyatwhYdu6VjXC10TAV1NA0HRAdRT7pk/5jzZU3Is= 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=YkRNQIY9; 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="YkRNQIY9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail3; t=1784118464; x=1784377664; 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=YkRNQIY92kyjBcMCcut38dbE07qJmnxLK0U6+cMcQe7H97BddPATO0R8BngMOz9ux HZsjoL6MZfrwyeijziw2FS+6W/aF1enrCspYWFmK7ssmW/6iJpbah+Lj19nON8/OAs GSGV6zcpy57i7vhO6Yxf0IfAq5KzLS9bwQQ3HnWGihs7VliHKTjAynOSEjzZ8cKpj+ AFlIaJIE4vd3whLADq/W2eYCu6nyYopDv4SKGUw0fmfN4TsETDKS5vMehQaQyuNozK xebtQsQgBKnaZqmPrlKk10xjPdzNFXd2ieIpiUTQnFbajUeIvPrSw36VYQ6Ln+48UW js86WwzmZpCfQ== X-Pm-Submission-Id: 4h0b6R2r5hz2ScN7 From: Esben Haabendal Date: Wed, 15 Jul 2026 14:27:23 +0200 Subject: [PATCH v2 1/4] 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-v2-1-d18af55edab5@geanix.com> References: <20260715-liteon-ltr329-v2-0-d18af55edab5@geanix.com> In-Reply-To: <20260715-liteon-ltr329-v2-0-d18af55edab5@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: 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=1784118460; l=832; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=ptiLm+CNIzLah7x8+408IhZd1o2PQjYIBj4oQIDGZjk=; b=kgB8THF+7DbpOaHarimiW9EuYmwIJirucsg75le9fihKuA7JH+ltRXmozNqSwgDhiWJFbzzAU 3FL9GNiz0PNCvDBT81DB4tQ/d9KtrzT6LQIVe5znwFwx9z+knzEe3l0 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 Acked-by: Krzysztof Kozlowski --- 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 17:35:03 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 2714D44CACB for ; Wed, 15 Jul 2026 12:27:48 +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=1784118469; cv=none; b=q4BrT23MHKSFv0smrwviuCmk8HGFyiOwmsRBIpYbS4jhNg0qEfn8nE2uIHd/72zDY73jCmWlHJm0alUk3qH1TzYtSNPXrcJd+rXvO51OOK8S2JQ8aGs6fldnSnx2SQwQIlA3P3gAC0OfWBZk8CePsKu204Yps0+kr3gcEoYCaWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784118469; c=relaxed/simple; bh=feUXKoU1OigzdRs8cwri1uskaBwwc5Ly4ocsOXChL5o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XIAuZAUmnhghY9vCSjGtNUWlqGeNrmP3oHky+3bBXY9zu1kJ+s2eiXKn6HVj/IPXr6jfNkzBi/DCsT2y16TWWwtSqcyXU0ZN6udiYI4HJK4s61ZjFDaOByj373oLw5gK+kgnGMAV8OAcGdjUUc38EoHLyVS2NyvWkzg6yYVWROc= 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=nrlkSyR3; 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="nrlkSyR3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail3; t=1784118466; x=1784377666; 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=nrlkSyR3MmAtiRjE7CsMMFVNP7PqWDOVv4Q7kpsjlWOXcd+syS//G9KXwZ6r8R/dy LeI5RmU04Z3ctcPqjYp5g3zfzL7V79KyqyfpQKOyD/CtIz5AcQmDMwoG8UThNSE0lU Fox+QlwREx/GyczZK3WHi0f1W1aPOKI4qTg+SBZPuQ8NYAoyh7Nhr0uGbG1EF7P4Bl jm2sQVN8jKryI0rW/AO4HxjeQD72PndKSPHvrJm4MvoKWdsml25s1aVmkz8IfIKia9 Uz3IF/JU0bvC3DhPK4bM030CIHkUC16zA1+c+Lba2VNNoyvj9EDqkRtsdLi4HhoAxn demaK/+nkVBEQ== X-Pm-Submission-Id: 4h0b6S2cHDz2ScPt From: Esben Haabendal Date: Wed, 15 Jul 2026 14:27:24 +0200 Subject: [PATCH v2 2/4] 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-v2-2-d18af55edab5@geanix.com> References: <20260715-liteon-ltr329-v2-0-d18af55edab5@geanix.com> In-Reply-To: <20260715-liteon-ltr329-v2-0-d18af55edab5@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: 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=1784118460; l=759; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=feUXKoU1OigzdRs8cwri1uskaBwwc5Ly4ocsOXChL5o=; b=wedCmlErWr1AkJe8tLTJC9tpIeCI5a4Bd/HFakaOgBgGjaCvbGyjK5iQqr+CzVg3pYkmGSGi7 nrwskutSM47C0ume0qZXsTxcX/TG8EFeJ5B5FntX8FEpOeeJxEy+z+i 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 17:35:03 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 6D16B44C67C for ; Wed, 15 Jul 2026 12:27:50 +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=1784118474; cv=none; b=gIF6/HWaawhRnvVkPhM4py9wbxRIpf7v9o7ae039adzGeYg+afGDM5PQkwDTTpo4q73BMshmfc1vDPV96Fl3QzivleWDrESOL+HzoQkKVr0EDqMT8ruySgChNZJzrucVL3D9a1RzxM6qBaFEj3AKNH2L1NtoQrctv5A+l9sFMrs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784118474; c=relaxed/simple; bh=I2dTWPh9xBkWUYpYwY6PQ5wKCWiaOxS0O3qMw30nS0E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mTP3Pn0RJj7z6Ltw6NI5iifm2jfwYUI8dYtpgWab7xGV1fNOQyFvAtbOx+W5f/K/+NReZsjySWLHlqx6AMRirWgOMEw6obBQ8OwJjEyVzpHC+HAHstFeD8hr1luBiVj5WY6BVIAOv7NUeN/BIajzvpE7aFfpcWL65bDd6CQmZps= 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=VvBPt6QS; 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="VvBPt6QS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail3; t=1784118468; x=1784377668; bh=sXxGmRC61CGzQK8oDsrX4kPLE28/Z0F2WvjySiARWJQ=; 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=VvBPt6QS5m/DYfX+yhUXdOH3Zn+cG2zQl0alwDGO5S2lEN1n/xdTo7VickL136RgG aqYhLt4KXbQG330lg3cX50+lDDLWA0ODRnUBZct+wqI7wIiwnwGqHuF47l/AXgAl4K Qxzpxe64akm7Ol/XfztSQNeXZsYjMsNQr0uIsprkMKFBBnum9d3JhCb4yD+/dPgD6j BbdMjBN8NPTPijg+NEjZCQRCZpkoNcxX3Jo/thdSwnUvihPHl4K4Vrzmm/RpeupCAr l5D0hJ05eSeqwpaKPSPK+q4ErW47oM44kDWibvpE7qixayJ7Ld9/3sWUqIWSeq+VlM FYn8v5gR11SiA== X-Pm-Submission-Id: 4h0b6V3NCLz2ScN7 From: Esben Haabendal Date: Wed, 15 Jul 2026 14:27:25 +0200 Subject: [PATCH v2 3/4] 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-v2-3-d18af55edab5@geanix.com> References: <20260715-liteon-ltr329-v2-0-d18af55edab5@geanix.com> In-Reply-To: <20260715-liteon-ltr329-v2-0-d18af55edab5@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: 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=1784118460; l=3444; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=I2dTWPh9xBkWUYpYwY6PQ5wKCWiaOxS0O3qMw30nS0E=; b=BCCJqpXvaamY19jLEczP5QzkIkrFCDB/vobC7M7Tl2QBkoZsXmnRK+i3nD+m9xYsm6BLegKAY SggG+sss7UlD4S8LSbAnx/O1xFD/DJkXDP7VdqoYSTS6noHD0FQpIup 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 Reviewed-by: Nuno S=C3=A1 --- drivers/iio/light/ltr501.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 7d045be78c6d..379e57ac5f5b 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -15,6 +15,7 @@ #include #include #include +#include // for ARRAY_SIZE =20 #include #include @@ -94,6 +95,7 @@ enum { ltr559, ltr301, ltr303, + ltr329, }; =20 struct ltr501_gain { @@ -178,6 +180,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 +435,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 +476,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 +1270,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 +1556,12 @@ 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"); + ret =3D -EINVAL; + goto powerdown_on_error; + } + ret =3D devm_request_threaded_irq(&client->dev, client->irq, NULL, ltr501_interrupt_handler, IRQF_TRIGGER_FALLING | @@ -1604,6 +1635,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 +1645,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 Sat Jul 25 17:35:03 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 774F047798B; Wed, 15 Jul 2026 12:27:51 +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=1784118474; cv=none; b=s5tnqhwd0atayhIgKME1Pp9HZof1tQtTH+hqbXSfYjAzyXWgBt+8RYTwe9H55EPLsePOWlDRRn+JovfrzLK48q9YewtJwBcyQjqKuLv5z+hV6PoWImEdf8hTz5Xmmouqgy1W3SaRZbPRjKbCBWGPDqBpBMjCSJN4CiTJqnfeBaY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784118474; c=relaxed/simple; bh=dm9nW2iDC7Blmz0joKHenTSW6fNAAaYJo3/DVFapXIM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pkqQmjUHAVxzfahePtPXI+wwugwQspZBD6aAX/TEhqBzj0Qr3aHTmNTGjHEePSyyH4Q3gGUKb46nIcPE8eWNoMBHyB3EbMauqB97x6tPMuYqXlb3z+xEHYEjs8mCvPeYzKil+XbytWOvrQoKIGh0+wfLA180QAD8GTgjGff6Qfc= 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=eWjIJNJ4; 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="eWjIJNJ4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geanix.com; s=protonmail3; t=1784118469; x=1784377669; bh=4txtrKsUBGLy0L51a+7SG+rC6dcravOeIwVdezpahkc=; 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=eWjIJNJ4p+ARsZSDSHgfm40F5QxSLm6tJ0+ImSUc3HKeC9TCwFSgEMYgW1815akil KML0ia1Ob0JHtwxJg311BQ3+4UD67amiE4OxTysmaYhweLs5Q0I7AzsF4vjp4oTlCN 1QyiatlJQm+QEuRtM2OKWyrbUcd/rw0QeUmwksTHYyznMEcmf4O5Hf2NO4aGPSY5qH tOseTPqteCeaOHee+eAMg2gaPNobxGysM8OZ0C78Irb+aUbDNoOtPOSsXD+BRNY4Qh PTiOURVjMHmDX7iL7We932SWXqo9Y9P8MmZHw2JoRGnMJwNWonRyG5+s8nCUwy0q5Q M0H1Hq2WoxlPg== X-Pm-Submission-Id: 4h0b6X0DNxz1DFDy From: Esben Haabendal Date: Wed, 15 Jul 2026 14:27:26 +0200 Subject: [PATCH v2 4/4] 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: <20260715-liteon-ltr329-v2-4-d18af55edab5@geanix.com> References: <20260715-liteon-ltr329-v2-0-d18af55edab5@geanix.com> In-Reply-To: <20260715-liteon-ltr329-v2-0-d18af55edab5@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: 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=1784118460; l=718; i=esben@geanix.com; s=20240523; h=from:subject:message-id; bh=dm9nW2iDC7Blmz0joKHenTSW6fNAAaYJo3/DVFapXIM=; b=T/VRQqT4oI8j04k00nlKb0rWxgksPtiTaFn4spKAZbU2YUgcxIfXMB5Ua2gu/qqy40cDwvXQQ lSiho35B4YQBzkpgzC1KdKdp0J58q4C4bEZII/l311sY1X9gUVR8Ngs X-Developer-Key: i=esben@geanix.com; a=ed25519; pk=PbXoezm+CERhtgVeF/QAgXtEzSkDIahcWfC7RIXNdEk= In case request irq failed, we were leaving the chip powered instead of powering it down again. 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 379e57ac5f5b..9d4de798e5ab 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -1571,7 +1571,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