spi: intel: Implement dirmap hooks
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 20 Apr 2022 10:43:50 +0000 (13:43 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 20 Apr 2022 13:25:20 +0000 (14:25 +0100)
commitc2b5a40c9e50651a29ee9d110f7ebc41b8720efa
tree4d7d7060cb55c45b3c42fdd4b08d2e4ecd4032fd
parent3625a627f6e785a3469977d65dad41c21e77eedc
spi: intel: Implement dirmap hooks

Currently the driver goes over the supported opcodes list each time
->exec_op() is called and finds the suitable for the given operation.
This consumes unnecessary amount of CPU cycles because the operation is
always the same. For this reason populate dirmap hooks for the driver so
that we cache the selected operation and then simply call it on each
read/write.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/r/20220420104350.19510-1-mika.westerberg@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-intel.c