summaryrefslogtreecommitdiff
path: root/crypto/async_tx/async_memcpy.c
diff options
context:
space:
mode:
authorJaakko Laine <ext-jaakko.laine@vaisala.com>2020-08-27 17:48:48 +0300
committerWolfram Sang <wsa@kernel.org>2020-08-28 09:00:00 +0200
commit9e3b184b3b4fff3451b4a4089a727988ca14bee3 (patch)
treeacd07ae3e1c28b86b0229521405744e4cc8e224d /crypto/async_tx/async_memcpy.c
parent9106e45ceaafd3c3a7264c68dc5dc08874f6c8ce (diff)
i2c: xiic: Support forcing single-master in DT
I2C master operating in multimaster mode can get stuck indefinitely if I2C start is detected on bus, but no master has a transaction going. This is a weakness in I2C standard, which defines no way to recover, since all masters are indefinitely disallowed from interrupting the currently operating master. A start condition can be created for example by an electromagnetic discharge applied near physical I2C lines. Or a already operating master could get reset immediately after sending a start. If it is known during device tree creation that only a single I2C master will be present on the bus, this deadlock of the I2C bus could be avoided in the driver by ignoring the bus_is_busy register of the xiic, since bus can never be reserved by any other master. This patch adds this support for detecting single-master flag in device tree and when provided, improves I2C reliability by ignoring the therefore unnecessary xiic bus_is_busy register. Error can be reproduced by pulling I2C SDA -line temporarily low by shorting it to ground, while linux I2C master is operating on it using the xiic driver. The application using the bus will start receiving linux error code 16: "Device or resource busy" indefinitely: kernel: pca953x 0-0020: failed writing register app: Error writing file, error: 16 With multi-master disabled device will instead receive error code 5: "I/O error" while SDA is grounded, but recover normal operation once short is removed. kernel: pca953x 0-0020: failed reading register app: Error reading file, error: 5 Signed-off-by: Jaakko Laine <ext-jaakko.laine@vaisala.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'crypto/async_tx/async_memcpy.c')
0 files changed, 0 insertions, 0 deletions