[PATCH v10 5/6] spi: rockchip: Support cs-gpio
Mark Brown
broonie at kernel.org
Fri Feb 11 03:48:26 PST 2022
On Fri, Feb 11, 2022 at 11:43:41AM +0800, Jon Lin wrote:
> 1.Add standard cs-gpio support
> 2.Refer to spi-controller.yaml for details
>
> Signed-off-by: Jon Lin <jon.lin at rock-chips.com>
> ---
>
> Changes in v10: None
> Changes in v9: None
> Changes in v8: None
> Changes in v7: None
> Changes in v6: None
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
Why is this the one patch in the series with any versioning information?
> - ROCKCHIP_SPI_SET_BITS(rs->regs + ROCKCHIP_SPI_SER,
> - BIT(spi->chip_select));
> + if (spi->cs_gpiod)
> + ROCKCHIP_SPI_SET_BITS(rs->regs + ROCKCHIP_SPI_SER, 1);
> + else
> + ROCKCHIP_SPI_SET_BITS(rs->regs + ROCKCHIP_SPI_SER, BIT(spi->chip_select));
This appears to be making the device control chip select 0 if a GPIO
chip select is used - that's going to work poorly if there's a device
using that chip select. It should be fine to prohibit that
configuration if the hardware requires that a GPIO be controlled,
especially if the native chip select can be pinmuxed to a GPIO, but it
ought to be at least documented that this won't work and ideally
detected.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220211/b4066967/attachment.sig>
More information about the linux-arm-kernel
mailing list