LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Linux: cannot use 'spidev' device after using gpiod on chip select pin (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/linux-cannot-use-%27spidev%27-device-after-using-gpiod-on-chip-select-pin-4175720790/)

KWolfe81 01-11-2023 06:13 PM

Linux: cannot use 'spidev' device after using gpiod on chip select pin
 
Embedded Linux question: I'm reading/writing a SPI device via spidev perfectly fine. I have the need to manually assert the active-low chip select pin (setting it low for extended periods of time) which I am doing through libgpiod. This works.

However, after the manual control, spidev is no longer able to control the chip-select pin - meaning I cannot talk to my peripheral. I can rebuild my spi controller as a module, and a rmmod/insmod gets the spidev device to work again. However, this is not really a tenable solution. What is the best way to get the chip select back under spidev's control?

astrogeek 01-15-2023 02:47 PM

Moved: This thread is more suitable in the Embedded Linux forum and has been moved accordingly to help your thread/question get the exposure it deserves.

rtmistler 01-15-2023 07:48 PM

This seems like a situation where you may need to view the spidev source to diagnose. Spidev expects to control CS and you're stealing it via other means.


All times are GMT -5. The time now is 01:29 AM.