]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Allow SPI controller override device buswidth
authorJohn Garry <john.garry@huawei.com>
Fri, 28 Feb 2020 15:18:49 +0000 (23:18 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 28 Feb 2020 18:01:42 +0000 (18:01 +0000)
commitdf7fe66f31c102b580e7327cb1433bda5d887880
tree6e41d9f9d35c2a9a6f803843f93fe3150ca9e13d
parent51fb2b4f3e6d9f5927c890fa2b12d96b80b13c53
spi: Allow SPI controller override device buswidth

Currently ACPI firmware description for a SPI device does not have any
method to describe the data buswidth on the board.

So even through the controller and device may support higher modes than
standard SPI, it cannot be assumed that the board does - as such, that
device is limited to standard SPI in such a circumstance.

As a workaround, allow the controller driver supply buswidth override bits,
which are used inform the core code that the controller driver knows the
buswidth supported on that board for that device.

A host controller driver might know this info from DMI tables, for example.

Signed-off-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1582903131-160033-2-git-send-email-john.garry@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h