OSDN Git Service

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)
commitea23578611dce2eeaf31dcfe12cd7130cf3d1411
tree6e41d9f9d35c2a9a6f803843f93fe3150ca9e13d
parent3d24b2a470466aa901ba8354468fc1899259fd84
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