[PATCH v2 1/1] i2c: lpi2c: Avoid calling clk_get_rate during transfer

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Jan 18 23:48:02 PST 2024


Hello Alexander,

On Fri, Jan 19, 2024 at 08:22:23AM +0100, Alexander Stein wrote:
> Instead of repeatedly calling clk_get_rate for each transfer, lock
> the clock rate and cache the value.
> A deadlock has been observed while adding tlv320aic32x4 audio codec to
> the system. When this clock provider adds its clock, the clk mutex is
> locked already, it needs to access i2c, which in return needs the mutex
> for clk_get_rate as well.
> 
> Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> Reviewed-by: Andi Shyti <andi.shyti at kernel.org>
> ---
> This is an alternative, lightweight approach replacing the patch [1] and
> depends on [2].

If the kernel build bots find your patch they will likely trip over not
being able to parse that. If you want to prevent this, you could make
use of git format-patch's --base parameter.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240119/6b9eeb18/attachment.sig>


More information about the linux-arm-kernel mailing list