aboutsummaryrefslogtreecommitdiffstats
path: root/src/linux/spidev.c
Commit message (Collapse)AuthorAgeFilesLines
* linux: Support spidev4 through spidev7Kevin O'Connor2021-09-151-0/+4
| | | | | | The rpi4 has additional spi devices. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Fix spi handling with more than one spi deviceKevin O'Connor2020-10-251-0/+1
| | | | | | Reported by @opensource-alt. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Set the SPI mode in spidev.cKevin O'Connor2020-07-311-0/+5
| | | | | | Fix omission causing the SPI mode to not be set on the linux mcu. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: userspace GPIO controlandryblack2020-05-171-12/+0
| | | | | | Allow use host GPIO pins for non-realtime purposes. Signed-off-by: Andrey Kunitsyn <blackicebox@gmail.com>
* spicmds: Rework spi config commandsKevin O'Connor2019-08-061-2/+2
| | | | | | | | | | Rework the spi_config commands so that bus configuration and shutdown message configuration is done separately from the main "config_spi" command. This makes the spi configuration more flexible. It's now possible to use software spi without a CS pin. It's now possible to define multiple SPI messages to send on a shutdown event. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Convert SPI to use enumerationsKevin O'Connor2019-04-041-1/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Add support for bi-directional SPI communicationRicardo Amezquita2018-07-241-5/+32
| | | | | Signed-off-by: Ricardo Amézquita <ramezquitao@cihologramas.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* SPI: introduce spi_prepare functionGrigori Goronzy2018-07-081-0/+5
| | | | | | | | | | | | | | | | The SPI interface needs to be enabled and configured to the correct settings of a given oid before CS is asserted. The new function spi_prepare() allows ports to do that. This port only introduces the new function in all ports with no implementation and adds the call to the Klipper generic firmware code. That means everything still works as before. Ports need to be changed to fix the underlying issue. Discussion about the motivation here: https://github.com/KevinOConnor/klipper/pull/453#issuecomment-403131149 Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
* linux: Convert linux SPI code to use the generic spicmds.c codeKevin O'Connor2018-05-071-11/+23
| | | | | | | | | | Use the generic spi send/receive code on Linux. Update the replicape code to use the updated command format. Also, update the replicape code to turn off the stepper motors on a shutdown event. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: Add support for spidev devicesKevin O'Connor2017-09-201-0/+68
Add support for sending SPI messages to devices via the standard Linux SPI interface. This can be used to configure the shift registers on Replicape boards. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>