Skip to content

How to use SPI with gpio_cdev #116

@patrickelectric

Description

@patrickelectric

Using gpio_cdev the line handler return Error { kind: Ioctl { kind: LineHandle, cause: EBUSY } } when requesting a pin configured as SPI chip select.

In my case, when running a raspberry pi 5:
line 16: "GPIO16" "spi1 CS2" output active-low [used]

ls /dev/spidev*
/dev/spidev0.0  /dev/spidev1.0  /dev/spidev10.0  /dev/spidev1.1  /dev/spidev1.2

Any suggestion or example of how to use chip selects with the new API ?
It appears to run fine in a Raspberry Pi 4.
line 16: "GPIO16" unused output active-high

ls /dev/spidev
spidev0.0  spidev1.0  spidev1.1  spidev1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions