Re: [PATCH v3 1/2] dt-bindings: clock: fixed-clock: Add nvmem support

From: Stephen Boyd
Date: Thu Jun 08 2023 - 19:21:06 EST


Quoting Mike Looijmans (2023-06-05 07:00:16)
> On 05-06-2023 15:38, Krzysztof Kozlowski wrote:
> > On 05/06/2023 15:34, Mike Looijmans wrote:
> >> diff --git a/Documentation/devicetree/bindings/clock/fixed-clock.yaml b/Documentation/devicetree/bindings/clock/fixed-clock.yaml
> >> index b0a4fb8256e2..23e4df96d3b0 100644
> >> --- a/Documentation/devicetree/bindings/clock/fixed-clock.yaml
> >> +++ b/Documentation/devicetree/bindings/clock/fixed-clock.yaml
> >> @@ -12,7 +12,9 @@ maintainers:
> >>
> >> properties:
> >> compatible:
> >> - const: fixed-clock
> >> + enum:
> >> + - fixed-clock
> >> + - fixed-clock-nvmem
> > Do you even need new compatible? Isn't this the same clock from the
> > hardware point of view?
>
> I need a new compatible because a "fixed-clock" only loads at init time.
> It registers using CLK_OF_DECLARE, which requires the clock to register
> early. NVMEM providers are typical devices like I2C EEPROMs that won't
> be available at that point, hence I needed to create a clock that
> registers as a regular clock driver and can handle deferral and similar.

What is builtin_platform_driver(of_fixed_clk_driver)?