Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 4/9] ARM: tegra: lg-x3: Add light sensor node
Date: Sun, 04 Oct 2026 15:53:37 +0000	[thread overview]
Message-ID: <20261004155338.547C01F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261004154456.145362-5-clamor95@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] arm: dt: incorrect interrupt trigger polarity for APDS9900 sensor
--

commit 9cb1ebe47a901b15c3fac941849ede08f1799d2f
Author: Svyatoslav Ryhel <clamor95@gmail.com>

ARM: tegra: lg-x3: Add light sensor node

This commit adds the device tree node for the Avago APDS9900 ambient
light and proximity sensor to the tegra30-lg-x3 dtsi file.

> diff --git a/arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi b/arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi
> index d5365253c740b..4cd2bbc94f9d7 100644
> --- a/arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi
> +++ b/arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi
[ ... ]
> @@ -1106,6 +1106,19 @@ nfc@28 {
>  			firmware-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
>  		};
>  
> +		light-sensor@39 {
> +			compatible = "avago,apds9900";
> +			reg = <0x39>;
> +
> +			interrupt-parent = <&gpio>;
> +			interrupts = <TEGRA_GPIO(K, 2) IRQ_TYPE_EDGE_RISING>;

[Severity: Low]
Is IRQ_TYPE_EDGE_RISING the correct interrupt polarity for this sensor?

The device tree describes the APDS9900 interrupt as IRQ_TYPE_EDGE_RISING, but
the APDS9900 has an active-low open-drain interrupt pin, meaning it asserts
via a falling edge or low level. This appears to be a mismatch between the DT
hardware description and physical hardware.

While the Linux tsl2772 driver currently hardcodes IRQF_TRIGGER_FALLING
(masking the issue in Linux), could this latent hardware description bug break
interrupt handling for any OS or future driver refactoring that relies on the
DT-provided flags? Booting an OS that relies on the DT interrupt trigger flags
will configure the GPIO interrupt for a rising edge, which will fail to
trigger when the sensor pulls the line low.

> +
> +			vdd-supply = <&vdd_3v0_proxi>;
> +			vddio-supply = <&vdd_1v8_sen>;
> +
> +			led-max-microamp = <100000>;
> +		};
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261004154456.145362-1-clamor95@gmail.com?part=4

  reply	other threads:[~2026-10-04 15:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-04 15:44 [PATCH v2 0/9] ARM: tegra: lg-x3: Add newly supported devices and fixes Svyatoslav Ryhel
2026-10-04 15:44 ` [PATCH v2 1/9] ARM: tegra: lg-x3: Adjust WiFi node Svyatoslav Ryhel
2026-10-04 15:44 ` [PATCH v2 2/9] ARM: tegra: lg-x3: Remove pinctrl-* properties duplication Svyatoslav Ryhel
2026-10-04 15:44 ` [PATCH v2 3/9] ARM: tegra: lg-x3: Lower supported suspend mode Svyatoslav Ryhel
2026-10-04 15:44 ` [PATCH v2 4/9] ARM: tegra: lg-x3: Add light sensor node Svyatoslav Ryhel
2026-10-04 15:53   ` sashiko-bot [this message]
2026-10-04 15:44 ` [PATCH v2 5/9] ARM: tegra: lg-x3: Add flash LEDs controller node Svyatoslav Ryhel
2026-10-04 15:56   ` sashiko-bot
2026-10-04 15:44 ` [PATCH v2 6/9] ARM: tegra: lg-x3: Add haptic engine node Svyatoslav Ryhel
2026-10-04 15:44 ` [PATCH v2 7/9] ARM: tegra: lg-x3: Add backlight LED controller node Svyatoslav Ryhel
2026-10-04 15:57   ` sashiko-bot
2026-10-04 15:44 ` [PATCH v2 8/9] ARM: tegra: lg-x3: Update USB configuration Svyatoslav Ryhel
2026-10-04 15:44 ` [PATCH v2 9/9] ARM: tegra: p895: Update power LED trigger Svyatoslav Ryhel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261004155338.547C01F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox