Skip to content

Heavy spi module refactor - #32

Open
mjsir911 wants to merge 12 commits into
frank-zago:masterfrom
mjsir911:spi_refactor
Open

Heavy spi module refactor#32
mjsir911 wants to merge 12 commits into
frank-zago:masterfrom
mjsir911:spi_refactor

Conversation

@mjsir911

@mjsir911 mjsir911 commented Mar 12, 2024

Copy link
Copy Markdown

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
Copy Markdown
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