public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Josua Mayer <josua@solid-run.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Jon Nettleton <jon@solid-run.com>,
	Mikhail Anikin <mikhail.anikin@solid-run.com>,
	Yazan Shhady <yazan.shhady@solid-run.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH RFC 2/2] regulator: raa215300: add support for configurable 32kHz clock output
Date: Sun, 3 May 2026 09:57:03 +0900	[thread overview]
Message-ID: <afadX4IC9o-zj6qC@sirena.co.uk> (raw)
In-Reply-To: <20260502-raa215300-clkout-v1-2-fd1c2a240963@solid-run.com>

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

On Sat, May 02, 2026 at 06:07:05PM +0200, Josua Mayer wrote:
> Renesas RA215300 PMIC can be configured to output a 32kHz clock on its
> multi-purpose MPIO2 pin.

> There are in total 6 configurable multi-purpose pins, however only one
> of them supports outputting a clock in one specific configuration.

So there should be some pinmux support here then?  This is starting to
sound like a MFD...

> +#define RAA215300_MPIO2_POWER_OFF_DELAY			GENMASK(6, 0)

> +static unsigned long raa215300_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
> +{
> +	struct raa215300_clk *clk = to_raa215300_clk(hw);
> +	unsigned int val;
> +
> +	regmap_read(clk->regmap, RAA215300_REG_MPIO2_POWER_OFF, &val);
> +	val &= RAA215300_MPIO2_POWER_OFF_DELAY;
> +
> +	return 32768 >> val;
> +}

Given the mask above val could be up to 127?  If nothing else it'd be
good to have some validation.

> +		/* register mpio2 32k clkout in common clk framework */
> +		raa215300_register_clk(dev, regmap);

You should check the return value here.

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

  reply	other threads:[~2026-05-03  0:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-02 16:07 [PATCH RFC 0/2] regulator: raa215300: add support for configurable 32kHz clock output Josua Mayer
2026-05-02 16:07 ` [PATCH RFC 1/2] regulator: dt-bindings: raa215300: add " Josua Mayer
2026-05-03  0:57   ` Mark Brown
2026-05-03 14:32     ` Josua Mayer
2026-05-04  8:56   ` Geert Uytterhoeven
2026-05-02 16:07 ` [PATCH RFC 2/2] regulator: raa215300: add support for configurable 32kHz " Josua Mayer
2026-05-03  0:57   ` Mark Brown [this message]
2026-05-03 14:49     ` Josua Mayer
2026-05-03 15:13       ` Josua Mayer
2026-05-03  9:24 ` [PATCH RFC 0/2] " 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=afadX4IC9o-zj6qC@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=jon@solid-run.com \
    --cc=josua@solid-run.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mikhail.anikin@solid-run.com \
    --cc=robh@kernel.org \
    --cc=yazan.shhady@solid-run.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