From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de,
magnus.damm@gmail.com, yoshihiro.shimoda.uh@renesas.com,
biju.das.jz@bp.renesas.com, linux-phy@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-renesas-soc@vger.kernel.org,
John Madieu <john.madieu.xa@bp.renesas.com>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH v4 1/8] soc: renesas: rz-sysc: Add syscon/regmap support
Date: Fri, 8 Aug 2025 13:32:03 +0300 [thread overview]
Message-ID: <cbdfa6fd-e65b-45d7-a21f-3bfdd46af332@tuxon.dev> (raw)
In-Reply-To: <CAMuHMdUsFFd+orb17oQqoEidzYWMRjPoqMyzpgrdnicc=MRSYQ@mail.gmail.com>
Hi, Geert,
On 08.08.2025 12:29, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Fri, 8 Aug 2025 at 08:18, Claudiu <claudiu.beznea@tuxon.dev> wrote:
>> From: John Madieu <john.madieu.xa@bp.renesas.com>
>>
>> The RZ/G3E system controller has various registers that control or report
>> some properties specific to individual IPs. The regmap is registered as a
>> syscon device to allow these IP drivers to access the registers through the
>> regmap API.
>>
>> As other RZ SoCs might have custom read/write callbacks or max-offsets,
>> register a custom regmap configuration.
>>
>> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
>> [claudiu.beznea:
>> - do not check the match->data validity in rz_sysc_probe() as it is
>> always valid
>> - dinamically allocate regmap_cfg]
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>> ---
>>
>> Changes in v4:
>> - adjusted the patch description by dropping "add" from
>> "add register a custom regmap configuration"
>> - updated the list of changes from Claudiu Beznea
>> - dynamically allocate the regmap_config as proposed at [2]
>> - this patch is needed for proper function of USB (as proposed in this
>> series) that being the reason it is introduced here, as well
>>
>> [2] https://lore.kernel.org/all/CAMuHMdVyf3Xtpw=LWHrnD2CVQX4xYm=FBHvY_dx9OesHDz5zNg@mail.gmail.com/
>
> Thanks for the update!
>
>> --- a/drivers/soc/renesas/rz-sysc.c
>> +++ b/drivers/soc/renesas/rz-sysc.c
> =
>> @@ -117,7 +125,26 @@ static int rz_sysc_probe(struct platform_device *pdev)
>> return PTR_ERR(sysc->base);
>>
>> sysc->dev = dev;
>> - return rz_sysc_soc_init(sysc, match);
>> + ret = rz_sysc_soc_init(sysc, match);
>> + if (ret)
>> + return ret;
>> +
>> + regmap_cfg = devm_kzalloc(dev, sizeof(*regmap_cfg), GFP_KERNEL);
>> + if (!regmap_cfg)
>> + return -ENOMEM;
>
> Is there any specific reason you decided to allocate regmap_cfg
> separately, instead of embedding it into struct rz_sysc?
Sorry, I missed to mention.
I chose to have it like this as the regmap_cfg is not used anywhere else
(through rz_sysc) except in probe.
Thank you for your review,
Claudiu
>
> The rest LGTM.
>
> Gr{oetje,eeting}s,
>
> Geert
>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
WARNING: multiple messages have this Message-ID (diff)
From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de,
magnus.damm@gmail.com, yoshihiro.shimoda.uh@renesas.com,
biju.das.jz@bp.renesas.com, linux-phy@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-renesas-soc@vger.kernel.org,
John Madieu <john.madieu.xa@bp.renesas.com>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH v4 1/8] soc: renesas: rz-sysc: Add syscon/regmap support
Date: Fri, 8 Aug 2025 13:32:03 +0300 [thread overview]
Message-ID: <cbdfa6fd-e65b-45d7-a21f-3bfdd46af332@tuxon.dev> (raw)
In-Reply-To: <CAMuHMdUsFFd+orb17oQqoEidzYWMRjPoqMyzpgrdnicc=MRSYQ@mail.gmail.com>
Hi, Geert,
On 08.08.2025 12:29, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Fri, 8 Aug 2025 at 08:18, Claudiu <claudiu.beznea@tuxon.dev> wrote:
>> From: John Madieu <john.madieu.xa@bp.renesas.com>
>>
>> The RZ/G3E system controller has various registers that control or report
>> some properties specific to individual IPs. The regmap is registered as a
>> syscon device to allow these IP drivers to access the registers through the
>> regmap API.
>>
>> As other RZ SoCs might have custom read/write callbacks or max-offsets,
>> register a custom regmap configuration.
>>
>> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
>> [claudiu.beznea:
>> - do not check the match->data validity in rz_sysc_probe() as it is
>> always valid
>> - dinamically allocate regmap_cfg]
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>> ---
>>
>> Changes in v4:
>> - adjusted the patch description by dropping "add" from
>> "add register a custom regmap configuration"
>> - updated the list of changes from Claudiu Beznea
>> - dynamically allocate the regmap_config as proposed at [2]
>> - this patch is needed for proper function of USB (as proposed in this
>> series) that being the reason it is introduced here, as well
>>
>> [2] https://lore.kernel.org/all/CAMuHMdVyf3Xtpw=LWHrnD2CVQX4xYm=FBHvY_dx9OesHDz5zNg@mail.gmail.com/
>
> Thanks for the update!
>
>> --- a/drivers/soc/renesas/rz-sysc.c
>> +++ b/drivers/soc/renesas/rz-sysc.c
> =
>> @@ -117,7 +125,26 @@ static int rz_sysc_probe(struct platform_device *pdev)
>> return PTR_ERR(sysc->base);
>>
>> sysc->dev = dev;
>> - return rz_sysc_soc_init(sysc, match);
>> + ret = rz_sysc_soc_init(sysc, match);
>> + if (ret)
>> + return ret;
>> +
>> + regmap_cfg = devm_kzalloc(dev, sizeof(*regmap_cfg), GFP_KERNEL);
>> + if (!regmap_cfg)
>> + return -ENOMEM;
>
> Is there any specific reason you decided to allocate regmap_cfg
> separately, instead of embedding it into struct rz_sysc?
Sorry, I missed to mention.
I chose to have it like this as the regmap_cfg is not used anywhere else
(through rz_sysc) except in probe.
Thank you for your review,
Claudiu
>
> The rest LGTM.
>
> Gr{oetje,eeting}s,
>
> Geert
>
next prev parent reply other threads:[~2025-08-08 10:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 6:17 [PATCH v4 0/8] Add initial USB support for the Renesas RZ/G3S SoC Claudiu
2025-08-08 6:17 ` Claudiu
2025-08-08 6:17 ` [PATCH v4 1/8] soc: renesas: rz-sysc: Add syscon/regmap support Claudiu
2025-08-08 6:17 ` Claudiu
2025-08-08 9:29 ` Geert Uytterhoeven
2025-08-08 9:29 ` Geert Uytterhoeven
2025-08-08 10:32 ` Claudiu Beznea [this message]
2025-08-08 10:32 ` Claudiu Beznea
2025-08-08 11:36 ` Geert Uytterhoeven
2025-08-08 11:36 ` Geert Uytterhoeven
2025-08-08 12:11 ` Claudiu Beznea
2025-08-08 12:11 ` Claudiu Beznea
2025-08-08 6:18 ` [PATCH v4 2/8] dt-bindings: phy: renesas,usb2-phy: Mark resets as required for RZ/G3S Claudiu
2025-08-08 6:18 ` Claudiu
2025-08-08 6:18 ` [PATCH v4 3/8] phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe() Claudiu
2025-08-08 6:18 ` Claudiu
2025-08-08 6:18 ` [PATCH v4 4/8] dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/G3S support Claudiu
2025-08-08 6:18 ` Claudiu
2025-08-13 23:21 ` Rob Herring
2025-08-13 23:21 ` Rob Herring
2025-08-19 5:21 ` claudiu beznea
2025-08-19 5:21 ` claudiu beznea
2025-08-08 6:18 ` [PATCH v4 5/8] reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY Claudiu
2025-08-08 6:18 ` Claudiu
2025-08-08 6:18 ` [PATCH v4 6/8] reset: rzg2l-usbphy-ctrl: Add support for RZ/G3S SoC Claudiu
2025-08-08 6:18 ` Claudiu
2025-08-08 6:18 ` [PATCH v4 7/8] arm64: dts: renesas: r9a08g045: Add USB support Claudiu
2025-08-08 6:18 ` Claudiu
2025-08-08 6:18 ` [PATCH v4 8/8] arm64: dts: renesas: rzg3s-smarc: Enable " Claudiu
2025-08-08 6:18 ` Claudiu
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=cbdfa6fd-e65b-45d7-a21f-3bfdd46af332@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=john.madieu.xa@bp.renesas.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
--cc=yoshihiro.shimoda.uh@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 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.