Re: [PATCH v7 3/5] i2c: davinci: calculate bus freq from Hz instead of kHz
From: Andy Shevchenko
Date: Mon Feb 23 2026 - 10:01:21 EST
On Mon, Feb 23, 2026 at 03:33:52PM +0100, Marcus Folkesson wrote:
> The bus frequency is unnecessarily converted between Hz and kHz in
> several places.
> This is probably an old legacy from the old times (pre-devicetrees)
> when the davinci_i2c_platform_data took the bus_freq in kHz.
>
> Stick to Hz.
...
> - clk = ((input_clock / (psc + 1)) / (dev->bus_freq * 1000));
> + clk = ((input_clock / (psc + 1)) / (dev->bus_freq_hz));
Two pairs too many parentheses!
clk = (input_clock / (psc + 1)) / dev->bus_freq_hz;
...
> + dev_dbg(dev->dev, "bus_freq_hz = %dHz\n", dev->bus_freq_hz);
%u ?
--
With Best Regards,
Andy Shevchenko