U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Carlo Caione <ccaione@baylibre.com>
To: Julien Stephan <jstephan@baylibre.com>
Cc: GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,
	 u-boot@lists.u-boot-project.org,
	Jaehoon Chung <jh80.chung@samsung.com>,
	 Peng Fan <peng.fan@nxp.com>, Ryder Lee <ryder.lee@mediatek.com>,
	 Weijie Gao <weijie.gao@mediatek.com>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Igor Belwon <igor.belwon@mentallysanemainliners.org>,
	David Lechner <dlechner@baylibre.com>,
	 Tom Rini <trini@konsulko.com>,
	Marek Vasut <marek.vasut+usb@mailbox.org>,
	 Alexey Charkov <alchark@flipper.net>,
	Macpaul Lin <Macpaul.Lin@mediatek.com>,
	 Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	 Julien Masson <jmasson@baylibre.com>
Subject: Re: [PATCH 1/4] power: pmic: mtk-pwrap: honor fallback compatible strings
Date: Fri, 30 Oct 2026 14:30:21 +0100	[thread overview]
Message-ID: <auSbsOGZKLsteUCL@macbook.homenet.telecomitalia.it> (raw)
In-Reply-To: <179335677538.4117849.292438249217980426.b4-review@b4>

On Fri, Oct 30, 2026 at 11:39:35 +0100, Julien Stephan wrote:

[...]
> >  	while (of_match->compatible) {
> > -		if (!strcmp(of_match->compatible, pmic_name)) {
> > +		if (ofnode_device_is_compatible(pmic_node, of_match->compatible)) {
> >  			*slave = (struct pwrap_slv_type *)of_match->data;
> 
> Hi Carlo,
> 
> With this change, the pmic_name lookup at the top of the function can be
> dropped:
> 
>   pmic_name = ofnode_get_property(pmic_node, "compatible", NULL);
>   if (!pmic_name) {
>         log_err("%s: missing compatible property\n", __func__);
>         return -EINVAL;
>   }
> 
> pmic_name is now only used to check that the compatible property exists,
> and ofnode_device_is_compatible() already handles that case: it returns
> false and we end up returning -ENOENT. The pmic_name declaration can be
> dropped as well.

uh, indeed, missed it.
 
> Also the "REVISIT" comment above the mediatek,mt6366 compatible entry in
> mtk_pmic_ids can be reworded: this patch fixes half of the issue (the
> limitation of ofnode_get_property())

yes, let me fix both in V2.

Thanks,

--
Carlo Caione

  reply	other threads:[~2026-10-30 13:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 19:38 [PATCH 0/4] Enable USB host support on the Genio 510 and 700 EVKs Carlo Caione
2026-10-29 19:38 ` [PATCH 1/4] power: pmic: mtk-pwrap: honor fallback compatible strings Carlo Caione
2026-10-30 10:39   ` Julien Stephan
2026-10-30 13:30     ` Carlo Caione [this message]
2026-10-29 19:39 ` [PATCH 2/4] usb: onboard-hub: add TI TUSB8020B power and reset support Carlo Caione
2026-10-29 19:39 ` [PATCH 3/4] arm: dts: mediatek: configure Genio 510 and 700 USB-C hosts Carlo Caione
2026-10-29 19:39 ` [PATCH 4/4] configs: mt8188: enable USB host support Carlo Caione
2026-10-30 10:39   ` Julien Stephan

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=auSbsOGZKLsteUCL@macbook.homenet.telecomitalia.it \
    --to=ccaione@baylibre.com \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=Macpaul.Lin@mediatek.com \
    --cc=alchark@flipper.net \
    --cc=chunfeng.yun@mediatek.com \
    --cc=dlechner@baylibre.com \
    --cc=igor.belwon@mentallysanemainliners.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jh80.chung@samsung.com \
    --cc=jmasson@baylibre.com \
    --cc=jstephan@baylibre.com \
    --cc=marek.vasut+usb@mailbox.org \
    --cc=peng.fan@nxp.com \
    --cc=quentin.schulz@cherry.de \
    --cc=ryder.lee@mediatek.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=weijie.gao@mediatek.com \
    /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