[PATCH V8 4/5] phy: freescale: fsl-samsung-hdmi: Use closest divider

Frieder Schrempf frieder.schrempf at kontron.de
Mon Sep 16 00:16:14 PDT 2024


On 14.09.24 1:27 PM, Adam Ford wrote:
> Currently, if the clock values cannot be set to the exact rate,
> the round_rate and set_rate functions use the closest value found in
> the look-up-table.  In preparation of removing values from the LUT
> that can be calculated evenly with the integer calculator, it's
> necessary to ensure to check both the look-up-table and the integer
> divider clock values to get the closest values to the requested
> value.  It does this by measuring the difference between the
> requested clock value and the closest value in both integer divider
> calucator and the fractional clock look-up-table.
> 
> Which ever has the smallest difference between them is returned as
> the closest rate.
> 
> Signed-off-by: Adam Ford <aford173 at gmail.com>
> Reviewed-by: Dominique Martinet <dominique.martinet at atmark-techno.com>
> Tested-by: Dominique Martinet <dominique.martinet at atmark-techno.com>

Reviewed-by: Frieder Schrempf <frieder.schrempf at kontron.de>



More information about the linux-phy mailing list