From: sashiko-bot@kernel.org
To: erebion <erebion@erebion.eu>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 08/12] arm64: dts: qcom: sm6350-lena: Enable PMK8350
Date: Sun, 01 Nov 2026 23:42:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-192765@kernel.org> (raw)
In-Reply-To: <20261102-pdx213-upstream-3-v3-8-cdc3be96d257@erebion.eu>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] arm64: dts: qcom: sm6350-lena: duplicate qcom-pon device from pmk8350.dtsi
--
commit ab0852d01a0d63b999b8519d90b2ed3ef4a0420c
Author: erebion <erebion@erebion.eu>
arm64: dts: qcom: sm6350-lena: Enable PMK8350
This commit includes pmk8350.dtsi and configures and enables the PMK8350 ADC,
thermal monitor, and RTC nodes on the Sony Xperia 10 III.
> diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> index 61e191133cb4f..246a290e44f77 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> @@ -8,7 +8,11 @@
> #define PM7250B_SID 2
> #define PM7250B_SID1 3
>
> +/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */
> +#define PMK8350_SID 6
> +
> #include <dt-bindings/firmware/qcom,scm.h>
> +#include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
> #include <dt-bindings/leds/common.h>
> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> @@ -16,6 +20,7 @@
> #include "pm6150l.dtsi"
> #include "pm6350.dtsi"
> #include "pm7250b.dtsi"
> +#include "pmk8350.dtsi"
[Severity: Medium]
Does including pmk8350.dtsi alongside pm6350.dtsi without disabling or
deleting pmk8350_pon cause a probe conflict between two active qcom-pon
instances?
In arch/arm64/boot/dts/qcom/pm6350.dtsi, pm6350_pon is already enabled as the
primary PON device hosting reboot modes, pm6350_pwrkey, and pm6350_resin:
arch/arm64/boot/dts/qcom/pm6350.dtsi:
pm6350_pon: pon@800 {
compatible = "qcom,pm8998-pon";
reg = <0x800>;
mode-bootloader = <0x2>;
mode-recovery = <0x1>;
In arch/arm64/boot/dts/qcom/pmk8350.dtsi, pmk8350_pon (and a root
/reboot-mode nvmem-reboot-mode node) is also enabled by default:
arch/arm64/boot/dts/qcom/pmk8350.dtsi:
pmk8350_pon: pon@1300 {
compatible = "qcom,pmk8350-pon";
reg = <0x1300>, <0x800>;
reg-names = "hlos", "pbs";
Both qcom,pm8998-pon and qcom,pmk8350-pon match qcom_pon_id_table with
reason_shift = GEN2_REASON_SHIFT in drivers/power/reset/qcom-pon.c:
qcom_pon_probe() {
...
if (reason_shift != NO_REASON_SHIFT) {
pon->reboot_mode.dev = &pdev->dev;
pon->reason_shift = reason_shift;
pon->reboot_mode.write = qcom_pon_reboot_mode_write;
error = devm_reboot_mode_register(&pdev->dev, &pon->reboot_mode);
if (error) {
dev_err(&pdev->dev, "can't register reboot mode\n");
return error;
}
}
platform_set_drvdata(pdev, pon);
return devm_of_platform_populate(&pdev->dev);
}
In drivers/power/reset/reboot-mode.c, devm_reboot_mode_register() ->
reboot_mode_register() -> reboot_mode_create_device() registers a sysfs class
device named after reboot->dev->driver->name ("qcom-pon"):
reboot_mode_create_device() {
...
priv->reboot_mode_device = device_create(&reboot_mode_class, NULL, 0,
(void *)priv, "%s",
reboot->dev->driver->name);
...
}
reboot_mode_register() {
...
ret = reboot_mode_create_device(reboot);
if (ret)
goto error;
return 0;
error:
kfree(info);
reboot_mode_unregister(reboot);
return ret;
}
When the second qcom-pon instance probes, device_create() fails with -EEXIST
and triggers a sysfs duplicate filename warning, and the error path in
reboot_mode_register() calls reboot_mode_unregister(), which looks up
"qcom-pon" by driver name via class_find_device(), unregisters the first
instance's sysfs device, and leaks the struct device reference returned by
class_find_device(). In addition, if pmk8350_pon probes before pm6350_pon,
qcom_pon_probe() for pm6350_pon returns an error before reaching
devm_of_platform_populate(), preventing pm6350_pwrkey and pm6350_resin from
being populated.
Should pmk8350_pon (and the root /reboot-mode node from pmk8350.dtsi) be
disabled or deleted in sm6350-sony-xperia-lena-pdx213.dts?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102-pdx213-upstream-3-v3-0-cdc3be96d257@erebion.eu?part=8
next prev parent reply other threads:[~2026-11-01 23:42 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 23:32 [PATCH v3 00/12] Enable more nodes for the Xperia 10 III erebion
2026-11-01 23:32 ` [PATCH v3 01/12] arm64: dts: qcom: sm6350-lena: Add flash LED erebion
2026-11-01 23:38 ` sashiko-bot
2026-11-02 8:47 ` erebion
2026-11-01 23:32 ` [PATCH v3 02/12] arm64: dts: qcom: sm6350-lena: rename touch-en-regulator erebion
2026-11-01 23:38 ` sashiko-bot
2026-11-02 8:36 ` erebion
2026-11-02 11:57 ` Konrad Dybcio
2026-11-01 23:32 ` [PATCH v3 03/12] arm64: dts: qcom: sm6350-lena: Add qcom,rmtfs-mem node erebion
2026-11-02 11:58 ` Konrad Dybcio
2026-11-01 23:32 ` [PATCH v3 04/12] arm64: dts: qcom: sm6350-lena: Enable ADSP, CDSP, IPA & MPSS erebion
2026-11-01 23:41 ` sashiko-bot
2026-11-02 1:23 ` erebion
2026-11-02 11:59 ` Konrad Dybcio
2026-11-01 23:32 ` [PATCH v3 05/12] arm64: dts: qcom: sm6350-lena: Enable Bluetooth erebion
2026-11-01 23:45 ` sashiko-bot
2026-11-02 0:41 ` erebion
2026-11-01 23:32 ` [PATCH v3 06/12] arm64: dts: qcom: sm6350-lena: Enable wifi erebion
2026-11-01 23:32 ` [PATCH v3 07/12] arm64: dts: qcom: sm6350-lena: Enable PM7250B erebion
2026-11-02 11:59 ` Konrad Dybcio
2026-11-01 23:32 ` [PATCH v3 08/12] arm64: dts: qcom: sm6350-lena: Enable PMK8350 erebion
2026-11-01 23:42 ` sashiko-bot [this message]
2026-11-02 11:08 ` erebion
2026-11-01 23:32 ` [PATCH v3 09/12] arm64: dts: qcom: sm6350-lena: Add PMK8350 thermals erebion
2026-11-01 23:32 ` [PATCH v3 10/12] arm64: dts: qcom: sm6350-lena: Add PM7250B thermals erebion
2026-11-01 23:44 ` sashiko-bot
2026-11-02 0:05 ` erebion
2026-11-01 23:32 ` [PATCH v3 11/12] arm64: dts: qcom: sm6350-lena: Add PM6150L thermals erebion
2026-11-01 23:44 ` sashiko-bot
2026-11-02 0:35 ` erebion
2026-11-02 1:33 ` erebion
2026-11-02 12:20 ` erebion
2026-11-01 23:32 ` [PATCH v3 12/12] arm64: dts: qcom: sm6350-lena: enable remaining i2c busses erebion
2026-11-01 23:48 ` sashiko-bot
2026-11-02 11:24 ` erebion
2026-11-02 12:00 ` Konrad Dybcio
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=sashiko-outbox-192765@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=erebion@erebion.eu \
--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