[PATCH v2 1/2] clk: add gated-fixed-clock driver
David Lechner
dlechner at baylibre.com
Tue May 19 16:09:25 CEST 2026
On 5/19/26 6:55 AM, Daniele Briguglio wrote:
> Add a UCLASS_CLK driver matching the Linux DT binding documented at
> Documentation/devicetree/bindings/clock/gated-fixed-clock.yaml, a
> fixed-rate oscillator whose output is enabled by toggling a
> regulator supply. The optional enable-gpios variant is not
> implemented.
>
...
> +static int clk_gated_fixed_enable(struct clk *clk)
> +{
> + struct clk_gated_fixed_priv *priv = dev_get_priv(clk->dev);
> +
> + return regulator_set_enable_if_allowed(priv->supply, true);
> +}
> +
> +static int clk_gated_fixed_disable(struct clk *clk)
> +{
> + struct clk_gated_fixed_priv *priv = dev_get_priv(clk->dev);
> +
> + return regulator_set_enable_if_allowed(priv->supply, false);
> +}
> +
It seems a bit odd to use regulator_set_enable_if_allowed()
since the point of the binding is to provide a clock that
is gated by a regulator. Why would someone use this binding
with a regulator that can't be enabled/disabled?
More information about the U-Boot
mailing list