OSDN Git Service

spi: mpc512x-psc: Convert to use GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 20 Jan 2022 00:26:00 +0000 (01:26 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 31 Jan 2022 15:17:29 +0000 (15:17 +0000)
commit2818824ced4be5abc22c450340d548702f166d9a
tree0a9e76f79036efd2a78c0bf322dd265ff03ba8d9
parent1a5a87d541b442293dfcc2253b652bc7b7e02d09
spi: mpc512x-psc: Convert to use GPIO descriptors

This driver is already relying on the core to provide
valid GPIO numbers in spi->cs_gpio through
of_spi_get_gpio_numbers(), so we can switch to letting
the core use GPIO descriptors instead.

The driver was assigning a local function to the custom
chipselect callback, but I chose to just open code the
gpiod setting instead, this is easier to read.

The only platform that overrides the cs_control callback
is the mpc832x_rdb.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220120002600.216667-1-linus.walleij@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mpc512x-psc.c