]> git.karo-electronics.de Git - karo-tx-linux.git/commit
spi: introduce max_message_size hook in spi_master
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 17 Aug 2016 19:08:01 +0000 (21:08 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 18 Aug 2016 10:14:48 +0000 (11:14 +0100)
commit5090cc6ae2f79ee779e5faf7c8a28edf42b7d738
tree531e431fa02f122fbc13ff0d498bc908cc2e3f2b
parent29b4817d4018df78086157ea3a55c1d9424a7cfc
spi: introduce max_message_size hook in spi_master

Recently a maximum transfer size was was introduced in struct spi_master.
However there are also spi controllers with a maximum message size, e.g.
fsl-espi has a max message size of 64KB.
Introduce a hook max_message_size to deal with such limitations.

Also make sure that spi_max_transfer_size doesn't return greater values
than spi_max_message_size, even if hook max_transfer_size is not set.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/spi/spi.h