Re: [PATCH v7 1/2] i2c: algo: bit: Allow to skip bit test
From: Wolfram Sang
Date: Wed Jul 15 2026 - 16:31:58 EST
On Tue, Jul 14, 2026 at 06:29:14PM +0200, Markus Stockhausen wrote:
> An I2C bus can make use of shared resources. E.g. two GPIO based buses
> that share a single SCL line. To synchronize access to the bus the driver
> might use locking with the help of i2c_lock_operations(). While this
> works for normal transfers it is not available during initialization.
>
> Especially if i2c-algo-bit module is loaded with parameter bit_test
> it will issue some basic sanity checks that will access the bus without
> locking. This might interfere badly with concurrent transfers. Even
> if these are well synchronized via locks.
>
> Allow the consumer of an algorithm to override if the bit_test is allowed
> or not. For this add a new boolean attribute named skip_bit_test to
> i2c_algo_bit_data. If set the test is not run.
>
> Signed-off-by: Markus Stockhausen <markus.stockhausen@xxxxxx>
Reviewed-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
Tested-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature