Skip to content

Conversation

@fschrempf
Copy link
Collaborator

@fschrempf fschrempf commented Sep 23, 2025

In Linux 3.15 (11 years ago) the size of the mode field was increased from 8 to 32 bits. In order to support some of the newer mode flags like SPI_MOSI_IDLE_LOW, let's switch to use the new ioctls and store a 32 bit value in SpiDevObject.

This breaks the compatibility with Linux kernel versions before v3.15.

The support for the mosi_idle_low attribute is wrapped in #ifdef SPI_MOSI_IDLE_LOW to make sure the module still compiles when using kernel header versions before v6.5 where support for SPI_MOSI_IDLE_LOW was added.

This solves #136.

fschrempf and others added 3 commits September 29, 2025 09:15
Since Linux 3.15 (11 years ago) the size of the mode field was
increased from 8 to 32 bits. In order to support some of the newer
mode flags (above the first 8 bits), let's switch to use the new
ioctls and store a 32 bit value in SpiDevObject.

This breaks the compatibility with Linux kernel versions before
v3.15.

Signed-off-by: Frieder Schrempf <[email protected]>
Add a new attribute 'idle_low' to get/set the state of the
SPI_MOSI_IDLE_LOW flag. If enabled the MOSI line is low when
idle. This needs to be supported by the controller driver.

This flag is available in the kernel since v6.5.

This solves doceme#136.

Signed-off-by: Oualid Derouiche <[email protected]>
Signed-off-by: Frieder Schrempf <[email protected]>
@fschrempf fschrempf force-pushed the feature/idle-low-flag branch from 131b7b7 to 16a3b80 Compare September 29, 2025 07:20
@fschrempf fschrempf requested a review from doceme September 29, 2025 07:21
@fschrempf fschrempf self-assigned this Nov 3, 2025
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.

1 participant