LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 01-11-2023, 07:13 PM   #1
KWolfe81
LQ Newbie
 
Registered: Jan 2023
Posts: 1

Rep: Reputation: 0
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?
 
Old 01-15-2023, 03:47 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,005
Blog Entries: 23

Rep: Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967Reputation: 3967
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.
 
Old 01-15-2023, 08:48 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,760
Blog Entries: 13

Rep: Reputation: 4803Reputation: 4803Reputation: 4803Reputation: 4803Reputation: 4803Reputation: 4803Reputation: 4803Reputation: 4803Reputation: 4803Reputation: 4803Reputation: 4803
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU 12-V power supply: 4-pin or 8-pin? michapma Linux - Hardware 3 07-23-2007 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 11:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration