diff options
author | Rasmus Villemoes <[email protected]> | 2023-06-02 13:57:30 +0200 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-06-02 13:15:14 +0100 |
commit | a34e0353a681bbdd0402825e25410c3236109f31 (patch) | |
tree | b71b11e8f75dd73fb6d76e2da32f3396186b8db5 /tools/perf/util/trace-event-scripting.c | |
parent | 20c475d21ed9326f7b1396c9bb8991b375cb6c50 (diff) |
spi: spi-imx: fix mixing of native and gpio chipselects for imx51/imx53/imx6 variants
Commit 87c614175bbf (spi: spi-imx: fix MX51_ECSPI_* macros when cs >
3) ensured that the argument passed to the macros was masked with &3,
so that we no longer write outside the intended fields in the various
control registers. When all chip selects are gpios, this works just
fine.
However, when a mix of native and gpio chip selects are in use, that
masking is too naive. Say, for example, that SS0 is muxed as native
chip select, and there is also a chip at 4 (obviously with a gpio
cs). In that case, when accessing the latter chip, both the SS0 pin
and the gpio pin will be asserted low.
The fix for this is to use the ->unused_native_cs value as channel
number for any spi device which uses a gpio as chip select.
Signed-off-by: Rasmus Villemoes <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions