All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] spi: spi-rockchip spi slave mode
@ 2020-05-11  8:30 ` Chris Ruehl
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Ruehl @ 2020-05-11  8:30 UTC (permalink / raw)
  To: Chris Ruehl, Jack Lo
  Cc: Mark Brown, Heiko Stuebner, linux-spi, linux-arm-kernel,
	linux-rockchip, linux-kernel

The spi-rockchip driver does not implement spi slave mode, but the register map
have a corresponding flag. An example implementation found
here: https://dev.t-firefly.com/thread-101485-1-1.html
This patchset clean the compatiblity names and add support slave mode.
We need the slave mode for our project, but the PCBA is not yet available
in consequence the code in the patch isn't tested yet but need your review.

Patch 1/3
Cleanup, move from the compatibily layer struct spi_master over
to struct spi_controller, and rename the related function calls.

Patch 2/3
Add support for spi slave mode and support function

Patch 3/3
Use OF property num-cs and enable support for cs_gpiods

IMHO its wrong, that the num_chipselect is set fixed to the amount of 
native chip-select lines. SPI0 which has two native lines, while the others
SPIs one native cs line only.
Set max_native_cs in the controller struct with ROCKCHIP_SPI_MAX_CS_NUM seems
the correct way to do and let num-cs the OF / dts config set the CS count for
the boards.

Patch against next-20200508

Thanks for review!

Happy hacking
Chris

Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
---


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-05-11  8:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11  8:30 [PATCH v1 0/3] spi: spi-rockchip spi slave mode Chris Ruehl
2020-05-11  8:30 ` Chris Ruehl
2020-05-11  8:30 ` Chris Ruehl
2020-05-11  8:30 ` [PATCH v1 1/3] spi: spi-rockchip: cleanup use struct spi_controller Chris Ruehl
2020-05-11  8:30   ` Chris Ruehl
2020-05-11  8:30   ` Chris Ruehl
2020-05-11  8:30 ` [PATCH v1 2/3] spi: spi-rockchip: add support for spi slave mode Chris Ruehl
2020-05-11  8:30   ` Chris Ruehl
2020-05-11  8:30   ` Chris Ruehl
2020-05-11  8:30 ` [PATCH v1 3/3] spi: spi-rockchip: use num-cs property and ctlr->enable_gpiods Chris Ruehl
2020-05-11  8:30   ` Chris Ruehl
2020-05-11  8:30   ` Chris Ruehl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.