public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@nabladev.com>
To: ovidiu.panait.rb@renesas.com
Cc: cip-dev@lists.cip-project.org, pavel@nabladev.com,
	nobuhiro.iwamatsu.x90@mail.toshiba
Subject: Re: [cip-dev] [PATCH 6.1.y-cip 01/11] soc: renesas: rz-sysc: Add syscon/regmap support
Date: Mon, 2 Feb 2026 14:17:46 +0100	[thread overview]
Message-ID: <aYCj+rasLB4K5WGt@duo.ucw.cz> (raw)
In-Reply-To: <20260128132522.6902-2-ovidiu.panait.rb@renesas.com>

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]

Hi!

> commit 2da2740fb9c8e26b6b5e20d74f2ed1d49824236d upstream.
> 
> 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.
> 
> [claudiu.beznea:
>  - do not check the match->data validity in rz_sysc_probe() as it is
>    always valid
>  - dinamically allocate regmap_cfg]

...

> +++ b/drivers/soc/renesas/rz-sysc.c
> @@ -100,14 +104,23 @@ MODULE_DEVICE_TABLE(of, rz_sysc_match);
>  
>  static int rz_sysc_probe(struct platform_device *pdev)
>  {
> +	const struct rz_sysc_init_data *data;
>  	const struct of_device_id *match;
>  	struct device *dev = &pdev->dev;
> +	struct regmap *regmap;
>  	struct rz_sysc *sysc;
> +	int ret;
> +
> +	struct regmap_config *regmap_cfg __free(kfree) = kzalloc(sizeof(*regmap_cfg), GFP_KERNEL);
> +	if (!regmap_cfg)
> +		return -ENOMEM;
>

>  	match = of_match_node(rz_sysc_match, dev->of_node);
>  	if (!match)
>  		return -ENODEV;
>  
> +	data = match->data;
> +
>  	sysc = devm_kzalloc(dev, sizeof(*sysc), GFP_KERNEL);
>  	if (!sysc)


So this function now uses both devm_ mechanism and __free() +
kzalloc. That's quite confusing / strange. I believe this is going to
be in 6.1 only, so probably not worth fixing.

Thanks and best regards,
								Pavel
-- 
In cooperation with Nabla.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2026-02-02 13:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28 13:25 [PATCH 6.1.y-cip 00/11] Add RZ/V2H TSU support Ovidiu Panait
2026-01-28 13:25 ` [PATCH 6.1.y-cip 01/11] soc: renesas: rz-sysc: Add syscon/regmap support Ovidiu Panait
2026-02-02 13:17   ` Pavel Machek [this message]
2026-01-28 13:25 ` [PATCH 6.1.y-cip 02/11] soc: renesas: r9a09g056-sys: Populate max_register Ovidiu Panait
2026-01-28 13:25 ` [PATCH 6.1.y-cip 03/11] soc: renesas: rz-sysc: Populate readable_reg/writeable_reg in regmap config Ovidiu Panait
2026-02-02 13:19   ` Pavel Machek
2026-01-28 13:25 ` [PATCH 6.1.y-cip 04/11] PM: domains: Add RZ/V2H compatible to PM domain detach list Ovidiu Panait
2026-01-28 13:25 ` [PATCH 6.1.y-cip 05/11] dt-bindings: thermal: r9a09g047-tsu: Document the TSU unit Ovidiu Panait
2026-01-28 13:25 ` [PATCH 6.1.y-cip 06/11] thermal/drivers/renesas/rzg3e: Add thermal driver for the Renesas RZ/G3E SoC Ovidiu Panait
2026-02-02 13:21   ` Pavel Machek
2026-01-28 13:25 ` [PATCH 6.1.y-cip 07/11] thermal/drivers/renesas/rzg3e: Fix add " Ovidiu Panait
2026-02-02 13:29   ` Pavel Machek
2026-01-28 13:25 ` [PATCH 6.1.y-cip 08/11] arm64: defconfig: Enable the Renesas RZ/G3E thermal driver Ovidiu Panait
2026-01-28 13:25 ` [PATCH 6.1.y-cip 09/11] clk: renesas: r9a09g057: Add clock and reset entries for TSU Ovidiu Panait
2026-01-28 13:25 ` [PATCH 6.1.y-cip 10/11] arm64: dts: renesas: r9a09g057: Move interrupt-parent to root node Ovidiu Panait
2026-01-28 13:25 ` [PATCH 6.1.y-cip 11/11] arm64: dts: renesas: r9a09g057: Add TSU nodes Ovidiu Panait
2026-01-29  8:10 ` [PATCH 6.1.y-cip 00/11] Add RZ/V2H TSU support nobuhiro.iwamatsu.x90
2026-02-02  2:00   ` nobuhiro.iwamatsu.x90
2026-02-02 13:48     ` [cip-dev] " Pavel Machek

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=aYCj+rasLB4K5WGt@duo.ucw.cz \
    --to=pavel@nabladev.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=nobuhiro.iwamatsu.x90@mail.toshiba \
    --cc=ovidiu.panait.rb@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