Re: [PATCH RFC v2 2/2] dt-bindings: clock: ti: Convert divider.txt to json-schema
From: Andreas Kemnade
Date: Thu Oct 17 2024 - 06:38:31 EST
Am Wed, 9 Oct 2024 22:44:34 -0500
schrieb Rob Herring <robh@xxxxxxxxxx>:
> > +
> > + ti,min-div:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description:
> > + min divisor for dividing the input clock rate, only
> > + needed if the first divisor is offset from the default value
> > (1)
>
> minimum: 1
> maximum: ?
> default: 1
maximum is complex: there is one place in the code where this runs
through a u8 (_get_val). although it it read from the devicetree as a
uint32.
So, if we do not care about a specific implementation, then
in the power-of-two case, the theoretical maximum would be 1 << (1 <<
(32-bitshift) - 1) clipped to UINT32_MAX due to type constraints. And
also the maximum lifetime of electronics and elementary elements and
pieces, probably even with the proposed decay time of protons.
In the index-starts-at-case, we would have (1 << (32-bitshift)) - 1.
otherwise 1 << (32-bitshift).
I would propose not to define a maximum here.
Regards,
Andreas