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

drivers/pcf857x: stop (ab)using gpio_t #20435

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Feb 27, 2024

Contribution description

The driver only supports addressing GPIOs by their index, (ab)using gpio_t for that will break on platforms that encode GPIO values differently.

Testing procedure

I don't have the hardware to test this, but this should be a simple conversion as the driver expects that gpio_t just encodes the pin number in lower 3 bits of gpio_t.

It never accesses the 'port' bits (which would be implementation defined anyway).

Issues/PRs references

triggered some unnecessary workarounds in #20431

@benpicco benpicco requested a review from gschorcht February 27, 2024 14:44
@github-actions github-actions bot added the Area: drivers Area: Device drivers label Feb 27, 2024
@benpicco benpicco added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 27, 2024
@benpicco benpicco requested review from chrysn and maribu February 27, 2024 14:45
@riot-ci
Copy link

riot-ci commented Feb 27, 2024

Murdock results

✔️ PASSED

e8a4def drivers/pcf857x: stop (ab)using gpio_t

Success Failures Total Runtime
10009 0 10009 06m:41s

Artifacts

The driver only supports addressing GPIOs by their index, (ab)using
`gpio_t` for that will break on platforms that encode GPIO values
differently.
@benpicco benpicco force-pushed the drivers/pcf857x-gpio_t branch from 34dcd5c to e8a4def Compare February 27, 2024 15:32
@maribu maribu added this pull request to the merge queue Feb 27, 2024
Merged via the queue into RIOT-OS:master with commit 97cfdde Feb 27, 2024
25 checks passed
@benpicco benpicco deleted the drivers/pcf857x-gpio_t branch February 27, 2024 17:48
@chrysn
Copy link
Member

chrysn commented Feb 27, 2024

Thanks for fixing this right away!

@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants