Re: [PATCH RFC 2/2] regulator: raa215300: add support for configurable 32kHz clock output
From: Mark Brown
Date: Sat May 02 2026 - 20:57:15 EST
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:
signature.asc
Description: PGP signature