Page MenuHomeFreeBSD

spigen(4) SPI Generic IO driver and spibus(4) automatic clock adjustment
Needs ReviewPublic

Authored by brianfundakowskifeldman_gmail.com on Aug 22 2015, 9:21 PM.
Tags
Referenced Files
F81678875: D3462.diff
Fri, Apr 19, 7:56 PM
Unknown Object (File)
Sun, Apr 7, 4:10 AM
Unknown Object (File)
Sun, Apr 7, 4:10 AM
Unknown Object (File)
Feb 23 2024, 4:24 PM
Unknown Object (File)
Feb 9 2024, 10:09 PM
Unknown Object (File)
Dec 20 2023, 1:40 AM
Unknown Object (File)
Dec 20 2023, 12:04 AM
Unknown Object (File)
Dec 17 2023, 5:22 AM
Subscribers

Details

Reviewers
loos
Group Reviewers
Contributor Reviews (src)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

brianfundakowskifeldman_gmail.com retitled this revision from to spigen(4) SPI Generic IO driver and spibus(4) automatic clock adjustment.
brianfundakowskifeldman_gmail.com edited the test plan for this revision. (Show Details)
brianfundakowskifeldman_gmail.com changed the edit policy from "All Users" to "Custom Policy".

Added ioctl variants that include specification of the SPI clock speed to use within the transfer request.

I haven't tested the code yet, but from what I see there is a bug WRT CS handling.

The CS is stored in the child ivar, I believe you are getting the CS set to 0 by a mistake.

The CS must be present in transfer structure (you should not rely on the existence of a kernel driver for the device).

We should probably get rid of the non clocked version of API and make the clocked functions the default API (not setting a clock produce the same result of non clocked version).

[GET|SET]_CLOCK_SPEED should set/get the SPI controller default speed and not the spigen default speed (allowing set the default clock freq for kernel drivers).

dev/spibus/spigen.c
432

Use DEVMETHOD_END here