diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-12-13 20:05:12 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-12-14 11:46:14 +0000 |
commit | b8761434bdec32fa46a644c26a12d16a9b0f58d8 (patch) | |
tree | b8007881f64e76e6c969069844c6d554c16ce389 /Documentation/devicetree/bindings/spi | |
parent | 9cce882bedd2768dc251b73f2ad86a9bfcfd9fc7 (diff) |
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