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

test_hardware: Use (new) static SPI bus numbers #4

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

hnez
Copy link
Member

@hnez hnez commented Oct 30, 2024

The SPI bus order has seemingly shifted by one position with the update to kernel 6.11, resulting in the following build errors:

05:45:11 FAILED tests/test_linux_hardware.py::test_linux_spi_1_adc - labgrid.driver.exception.ExecutionError: ('cat /sys/bus/spi/devices/spi1.0/iio\\:device3/in_voltage_raw', ["cat: '/sys/bus/spi/devices/spi1.0/iio:device3/in_voltage_raw': No such file or directory"], [])
05:45:11 FAILED tests/test_linux_hardware.py::test_linux_spi_2_lcd - labgrid.driver.exception.ExecutionError: ('cat /sys/bus/spi/devices/spi2.0/graphics/fb0/name', ['cat: /sys/bus/spi/devices/spi2.0/graphics/fb0/name: No such file or directory'], [])

I've marked this PR as a draft since just adapting to the new order and hoping that it does not change again is a bit of a hack.
We should check first if we can make the bus number assignment stable before we change it here.

The SPI bus order has seemingly shifted by one position with the
update to kernel 6.11.
Adapt to the change and cross fingers that it stays this way.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
@marckleinebudde
Copy link
Member

@hnez
Copy link
Member Author

hnez commented Nov 11, 2024

I've prepared a pull request to set fixed SPI bus numbers via aliases: linux-automation/meta-lxatac#205 .

With this PR applied the bus number associations are the following:

Linux bus number STM32 SPI peripheral Connected Peripherals
0 2 Power Board ADC
1 4 LCD Display
2 5 Ethernet Switch

E.g. order the Linux bus numbers based on the STM32 peripheral numbers and leave out unused peripherals.

This new numbering matches the numbering introduced in this labgrid-lxatac PR.

So we should thus merge both:

@hnez hnez marked this pull request as ready for review November 11, 2024 09:42
@hnez hnez changed the title test_hardware: rotate the SPI bus numbers test_hardware: Use (new) static SPI bus numbers Nov 11, 2024
@SmithChart SmithChart merged commit 90dc502 into linux-automation:master Nov 12, 2024
2 checks passed
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.

3 participants