mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Biju Das <biju.das.jz@bp.renesas.com>,
	"biju.das.au" <biju.das.au@gmail.com>,
	 Geert Uytterhoeven <geert+renesas@glider.be>,
	Mark Brown <broonie@kernel.org>,
	"magnus.damm" <magnus.damm@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	 "linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v4 3/9] reset: rzg2l-usbphy-ctrl: Add RZ/G3L support
Date: Thu, 06 Aug 2026 09:56:29 +0200	[thread overview]
Message-ID: <5e6e2e4e0f188377e63ac9d02b60aeb08cc29bb7.camel@pengutronix.de> (raw)
In-Reply-To: <TY3PR01MB11346A7ED25E81534A144B22F86D32@TY3PR01MB11346.jpnprd01.prod.outlook.com>

On Mi, 2026-08-05 at 10:26 +0000, Biju Das wrote:
> Hi Philipp Zabel,
> 
> > -----Original Message-----
> > From: Biju <biju.das.au@gmail.com>
> > Sent: 09 July 2026 09:31
> > Subject: [PATCH v4 3/9] reset: rzg2l-usbphy-ctrl: Add RZ/G3L support
> > 
> > From: Biju Das <biju.das.jz@bp.renesas.com>
> > 
> > Add the renesas,r9a08g046-usbphy-ctrl compatible string to the OF match table for the RZ/G3L (r9a08g046)
> > SoC, using a dedicated rzg3l_info struct with pwrrdy set, similar to RZ/G3S.
> > 
> > The RZ/G3L SoC has 2 OTG controllers compared to one on RZ/G3S, so it uses a separate rzg3l-vbus-
> > regulator driver to handle the additional VBUSEN control for port 2. The regulator_driver_name field is
> > used as the platform device name passed to platform_device_alloc(), and must exactly match the name the
> > corresponding regulator driver registers via its id_table for platform bus matching to succeed.
> > 
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v3->v4:
> >  * Updated the commit description.
> >  * Migrated to id_table match using driver_name and reduced the length
> >    < 24.
> > v2->v3:
> >  * No change.
> > v1->v2:
> >  * No change.
> > ---
> >  drivers/reset/reset-rzg2l-usbphy-ctrl.c | 14 ++++++++++++--
> >  1 file changed, 12 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> > index 84e745e49240..0803195080bd 100644
> > --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> > +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> > @@ -42,6 +42,7 @@ struct rzg2l_usbphy_ctrl_priv {  };
> > 
> >  struct rzg2l_usbphy_ctrl_info {
> > +	const char *regulator_driver_name;
> >  	bool pwrrdy;
> >  };
> > 
> > @@ -110,15 +111,24 @@ static void rzg2l_usbphy_ctrl_init(struct rzg2l_usbphy_ctrl_priv *priv)
> >  	spin_unlock_irqrestore(&priv->lock, flags);  }
> > 
> > -static const struct rzg2l_usbphy_ctrl_info rzg2l_info = {};
> > +static const struct rzg2l_usbphy_ctrl_info rzg2l_info = {
> > +	.regulator_driver_name = "rzg2l-vbus-regulator", };
> > 
> >  static const struct rzg2l_usbphy_ctrl_info rzg3s_info = {
> > +	.regulator_driver_name = "rzg2l-vbus-regulator",
> > +	.pwrrdy = true,
> > +};
> > +
> > +static const struct rzg2l_usbphy_ctrl_info rzg3l_info = {
> > +	.regulator_driver_name = "rzg3l-vbus-regulator",
> >  	.pwrrdy = true,
> >  };
> > 
> >  static const struct of_device_id rzg2l_usbphy_ctrl_match_table[] = {
> >  	{ .compatible = "renesas,rzg2l-usbphy-ctrl", .data = &rzg2l_info },
> >  	{ .compatible = "renesas,r9a08g045-usbphy-ctrl", .data = &rzg3s_info },
> > +	{ .compatible = "renesas,r9a08g046-usbphy-ctrl", .data = &rzg3l_info
> > +},
> >  	{ /* Sentinel */ }
> >  };
> >  MODULE_DEVICE_TABLE(of, rzg2l_usbphy_ctrl_match_table); @@ -245,7 +255,7 @@ static int
> > rzg2l_usbphy_ctrl_probe(struct platform_device *pdev)
> >  	if (error)
> >  		goto err_pm_runtime_put;
> > 
> > -	vdev = platform_device_alloc("rzg2l-usb-vbus-regulator", pdev->id);
> > +	vdev = platform_device_alloc(info->regulator_driver_name, pdev->id);
> 
> Please let me know, should I send a patch to increase the length from 24->32 [1]
> So that there won't be any backward compatibility issues.
> 
> [1] https://elixir.bootlin.com/linux/v7.1.2/source/include/linux/mod_devicetable.h#L604

I'm not sure.

PLATFORM_NAME_SIZE was last extended in commit 655862865c97
("mod_devicetable: Enlarge the maximum platform_device_id name
length"), but only very conservatively. Whether it is relevant that
platform_device_id fits into 32-byte cache line size of some
architectures, I can't say. The _NAME_SIZEs of other buses (aux, i2c,
spi, ...) already vary between 20 and 40 chars.

You could either try that, or you could prepend a single patch that
does the "rzg2l-usb-vbus-regulator" -> "rzg2l-vbus-regulator" rename in
both regulator and reset drivers and that could be merged into both
trees.


regards
Philipp

  reply	other threads:[~2026-08-06  7:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  8:30 [PATCH v4 0/9] Add RZ/G3L USB2.0 host support Biju
2026-07-09  8:30 ` [PATCH v4 1/9] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3L support Biju
2026-07-09  8:30 ` [PATCH v4 2/9] reset: rzg2l-usbphy-ctrl: Introduce info struct for match data Biju
2026-07-09  8:30 ` [PATCH v4 3/9] reset: rzg2l-usbphy-ctrl: Add RZ/G3L support Biju
2026-07-23  9:18   ` Philipp Zabel
2026-07-23  9:29     ` Biju Das
2026-08-05 10:26   ` Biju Das
2026-08-06  7:56     ` Philipp Zabel [this message]
2026-08-06  9:45       ` Biju Das
2026-07-09  8:30 ` [PATCH v4 4/9] regulator: renesas-usb-vbus-regulator: Add RZ/G3L VBUS regulator support Biju
2026-07-10 17:03   ` Mark Brown
2026-07-09  8:30 ` [PATCH v4 5/9] dt-bindings: phy: renesas,usb2-phy: Document RZ/G3L PHY bindings Biju
2026-07-09  8:30 ` [PATCH v4 6/9] phy: renesas: phy-rcar-gen3-usb2: Add RZ/G3L support Biju
2026-07-09  8:31 ` [PATCH v4 7/9] phy: renesas: phy-rcar-gen3-usb2: Fix devm action registration for disabled VBUS regulator Biju
2026-07-09  8:31 ` [PATCH v4 8/9] arm64: dts: renesas: r9a08g046: Add USB2.0 device nodes Biju
2026-07-09  8:31 ` [PATCH v4 9/9] arm64: dts: renesas: r9a08g046l48-smarc: Add USB2.0 support Biju
2026-07-22 19:15 ` [PATCH v4 0/9] Add RZ/G3L USB2.0 host support Biju Das
2026-07-24 15:26   ` Biju Das

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=5e6e2e4e0f188377e63ac9d02b60aeb08cc29bb7.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.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

all inboxes | Powered by JetHome®