Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heavy spi module refactor #32

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

mjsir911
Copy link

@mjsir911 mjsir911 commented Mar 12, 2024

Takes advantage of existing kernel procedures for gpio handling mostly, some resource management and device loading too.

Oh, this actually doesn't work because:

  • devm_spi_register_master does automatically allocation CS pins, but looks them up in a table with a device it literally just named (??)
  • I made a patch to move the naming to happen after the table gets created and have been working with that patch locally.
  • Also sent an email out to the mailing list for help but got back radio silence.

Also regresses the spi driver behaviour by claiming all CS pins / spi busses immediately. It would be cool to be able to load/unload individual busses individually (like we've previously been able to do), if there's some convention on how to do that within the kernel that would be a good start. This probably also means not relying on the kernel's csgpiod handling as much.

mjsir911 added 12 commits March 9, 2024 11:30
"master" semantics are just for compatibility at this point
rely more on devm_ allocations & don't worry about freeing them
We can deduce it
The cs handling is done via the kernel, although I'de like to find out
how to control them all individually.
@mjsir911
Copy link
Author

Okay yeah I got clued in about multiple devices and spi does fail to load on the second device plugged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants