[PATCH v7 1/1] i2c: lpi2c: use clk notifier for rate changes

Wolfram Sang wsa at kernel.org
Tue Dec 19 08:56:15 PST 2023


Hi,

> > ... improve the commit message, reporting the real deadlock case
> > instead of a lockdep warning and...
> 
> I've improved the commit message about an actual deadlock.

That means a v8 is in your queue?

> > ... find a more appropriate error number, I will ack this patch.
> 
> Thinking about this again, I think EINVAL is an appropriate error code.
> The parent clock frequency is also an input for the i2c transfer. So if, for 
> whatever reason, that clock frequency is 0, it is an invalid value (argument).
> I've checked other drivers what they do if that clock is 0. Unfortunately most 
> don't consider this case at all. But some do, so e.g. i2c_lpc2k_probe() or 
> dc_i2c_init_hw() both return EINVAL if the clk or a calculated divider is 0.

IMHO, the return value doesn't matter that much as we have a descriptive
text accompanying it anyhow.

Happy hacking,

   Wolfram
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20231219/23fa9ca9/attachment.sig>


More information about the linux-arm-kernel mailing list