summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/spi
diff options
context:
space:
mode:
authorGeert Uytterhoeven2017-12-13 20:05:12 +0100
committerMark Brown2017-12-14 12:46:14 +0100
commitb8761434bdec32fa46a644c26a12d16a9b0f58d8 (patch)
treeb8007881f64e76e6c969069844c6d554c16ce389 /Documentation/devicetree/bindings/spi
parentspi: sh-msiof: Extend support to 3 native chip selects (diff)
downloadkernel-qcow2-linux-b8761434bdec32fa46a644c26a12d16a9b0f58d8.tar.gz
kernel-qcow2-linux-b8761434bdec32fa46a644c26a12d16a9b0f58d8.tar.xz
kernel-qcow2-linux-b8761434bdec32fa46a644c26a12d16a9b0f58d8.zip
spi: sh-msiof: Implement cs-gpios configuration
The current support for GPIO chip selects assumes the GPIOs have been configured by platform code or the boot loader. This includes pinmux setup and GPIO direction. Hence it does not work as expected when just described in DT using the "cs-gpios" property. Fix this by: 1. using devm_gpiod_get_index() to request the GPIO, and thus configure pinmux, if needed, 2. configuring the GPIO direction is the spi_master.setup() callback. Use gpio_is_valid() instead of a check on positive numbers. Note that when using GPIO chip selects, at least one native chip select must be left unused, as that native chip select will be driven anyway, and (global) native chip select polarity must be taken into account. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/spi')
0 files changed, 0 insertions, 0 deletions