]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: cadence: Increase timeout per message if necessary
authorLucas Tanure <tanureal@opensource.cirrus.com>
Wed, 13 Apr 2022 09:14:10 +0000 (10:14 +0100)
committerWolfram Sang <wsa@kernel.org>
Sat, 14 May 2022 13:58:56 +0000 (15:58 +0200)
commit574a6caf9688f848184d8d13bc995507a65d0aea
tree6976bc8715af5c8efe8f9fd12fdf09d2db2114f2
parentee082ae7c7c6eb305dbde745a7e42e4691a1fe8e
i2c: cadence: Increase timeout per message if necessary

Timeout as 1 second sets an upper limit on the length
of the transfer executed, but there is no maximum length
of a write or read message set in i2c_adapter_quirks for
this controller.

This upper limit affects devices that require sending
large firmware blobs over I2C.

To remove that limitation, calculate the minimal time
necessary, plus some wiggle room, for every message and
use it instead of the default one second, if more than
one second.

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-cadence.c