From: sashiko-bot@kernel.org
To: "Alexandre MINETTE via B4 Relay"
<devnull+contact.alex-min.fr@kernel.org>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 5/6] extcon: qcom-spmi-misc: match PM8xxx USB ID platform device
Date: Tue, 09 Jun 2026 11:03:41 +0000 [thread overview]
Message-ID: <20260609110342.2C8111F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260609-mainline-send-v1-sending-v4-5-83768fbf404d@alex-min.fr>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The probe function silently squashes -EPROBE_DEFER and other error codes from platform_get_irq_byname_optional(), permanently breaking device initialization.
--
commit 1e93c1501595aa2edcd9a08fd1d48d4373aaf0ca
Author: Alexandre MINETTE <contact@alex-min.fr>
extcon: qcom-spmi-misc: match PM8xxx USB ID platform device
The PM8xxx MFD registers the PM8921 USB ID detector as a platform device
named "qcom-pm8xxx-usb-id". This commit adds a platform device ID so the
existing extcon driver can bind to this device.
> diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c
> index afaba5685c3dc..e16c109b553e2 100644
> --- a/drivers/extcon/extcon-qcom-spmi-misc.c
> +++ b/drivers/extcon/extcon-qcom-spmi-misc.c
[ ... ]
> @@ -204,8 +204,15 @@ static const struct of_device_id qcom_usb_extcon_dt_match[] = {
> };
> MODULE_DEVICE_TABLE(of, qcom_usb_extcon_dt_match);
>
> +static const struct platform_device_id qcom_usb_extcon_id[] = {
> + { "qcom-pm8xxx-usb-id" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(platform, qcom_usb_extcon_id);
> +
> static struct platform_driver qcom_usb_extcon_driver = {
> .probe = qcom_usb_extcon_probe,
[Severity: High]
This is a pre-existing issue, but does qcom_usb_extcon_probe() mishandle
deferred probing?
Looking at qcom_usb_extcon_probe(), if platform_get_irq_byname_optional()
returns -EPROBE_DEFER for the IRQs:
drivers/extcon/extcon-qcom-spmi-misc.c:qcom_usb_extcon_probe() {
...
info->id_irq = platform_get_irq_byname_optional(pdev, "usb_id");
if (info->id_irq > 0) {
...
info->vbus_irq = platform_get_irq_byname_optional(pdev, "usb_vbus");
if (info->vbus_irq > 0) {
...
if (info->id_irq < 0 && info->vbus_irq < 0) {
dev_err(dev, "ID and VBUS IRQ not found\n");
return -EINVAL;
}
...
}
If both IRQs defer, the code falls through and returns -EINVAL instead of
propagating -EPROBE_DEFER, which could permanently prevent the device from
initializing.
Additionally, if one IRQ defers while the other is found, the driver simply
skips requesting it. Could this cause the probe to succeed in a degraded
state without the deferred IRQ?
> + .id_table = qcom_usb_extcon_id,
> .driver = {
> .name = "extcon-pm8941-misc",
> .pm = &qcom_usb_extcon_pm_ops,
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260609-mainline-send-v1-sending-v4-0-83768fbf404d@alex-min.fr?part=5
next prev parent reply other threads:[~2026-06-09 11:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 8:13 [PATCH v4 0/6] Add Samsung Galaxy S4 support Alexandre MINETTE via B4 Relay
2026-06-09 8:13 ` Alexandre MINETTE
2026-06-09 8:13 ` [PATCH v4 1/6] dt-bindings: arm: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
2026-06-09 8:13 ` Alexandre MINETTE
2026-06-09 8:13 ` [PATCH v4 2/6] pinctrl: qcom: Register functions before enabling pinctrl Alexandre MINETTE via B4 Relay
2026-06-09 8:13 ` Alexandre MINETTE
2026-06-09 10:27 ` sashiko-bot
2026-06-09 8:13 ` [PATCH v4 3/6] ARM: dts: qcom: apq8064: Fix USB controller clocks Alexandre MINETTE via B4 Relay
2026-06-09 8:13 ` Alexandre MINETTE
2026-06-09 10:39 ` sashiko-bot
2026-06-09 8:13 ` [PATCH v4 4/6] mfd: qcom-pm8xxx: register PM8921 USB ID extcon Alexandre MINETTE via B4 Relay
2026-06-09 8:13 ` Alexandre MINETTE
2026-06-09 10:52 ` sashiko-bot
2026-06-09 8:13 ` [PATCH v4 5/6] extcon: qcom-spmi-misc: match PM8xxx USB ID platform device Alexandre MINETTE via B4 Relay
2026-06-09 8:13 ` Alexandre MINETTE
2026-06-09 11:03 ` sashiko-bot [this message]
2026-06-09 8:13 ` [PATCH v4 6/6] ARM: dts: qcom: Add Samsung Galaxy S4 Alexandre MINETTE via B4 Relay
2026-06-09 8:13 ` Alexandre MINETTE
2026-06-09 16:42 ` David Heidelberg
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=20260609110342.2C8111F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+contact.alex-min.fr@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.