Skip to content

Commit ec679bd

Browse files
l1kbroonie
authored andcommitted
spi: bcm2835: Allow arbitrary number of slaves
Since commit 571e31f ("spi: bcm2835: Cache CS register value for ->prepare_message()"), the number of slaves has been limited by a compile-time constant. This was necessitated by statically-sized arrays in the driver private data which contain per-slave register values. As suggested by Mark, move those register values to a per-slave controller_state which is allocated on ->setup and freed on ->cleanup. The limitation on the number of slaves is thus lifted. Signed-off-by: Lukas Wunner <[email protected]> Cc: Joe Burmeister <[email protected]> Cc: Phil Elwell <[email protected]> Link: https://lore.kernel.org/r/a847c01f09400801e74e0630bf5a0197591554da.1622150204.git.lukas@wunner.de Signed-off-by: Mark Brown <[email protected]>
1 parent 1a43546 commit ec679bd

File tree

1 file changed

+119
-85
lines changed

1 file changed

+119
-85
lines changed

0 commit comments

Comments
 (0)