Skip to content

zephyr-cp: don't require a label on gpio-keys nodes - #62

Closed
mikeysklar wants to merge 15 commits into
mainfrom
fix/zephyr-gpio-keys-optional-label
Closed

zephyr-cp: don't require a label on gpio-keys nodes#62
mikeysklar wants to merge 15 commits into
mainfrom
fix/zephyr-gpio-keys-optional-label

Conversation

@mikeysklar

Copy link
Copy Markdown
Owner

What

zephyr_dts_to_cp_board() dereferenced props["label"] unconditionally for gpio-keys. label is optional and deprecated there, so any board without one fails board generation with KeyError: 'label'.

Why

The gpio-leds handler in the same function already guards this with if "label" in props:. This applies the same guard to gpio-keys, so it is an existing pattern rather than a new one.

Hardware tested

Hit on a Silicon Labs SiWx917-DK2605A (BRD2605A), whose gpio-keys nodes come from Zephyr's own board .dts with no label. Board generation fails without this; it succeeds with it.

Not tested: other zephyr-cp boards. The change only removes an unconditional dereference, so boards that do have a label behave exactly as before.

Scope

One guard, one file. No behavior change for boards that set a label.

AI assistance

Written with Claude Code. I ran the build and confirmed the failure and the fix on hardware.

relic-se and others added 10 commits August 13, 2026 09:48
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
check_suite["workflowRun"] is null for check suites that are not attached to a
workflow run, for example one that was deleted or one belonging to an app
integration. get_commit_depth_and_check_suite() dereferenced it
unconditionally:

    TypeError: 'NoneType' object is not subscriptable

which fails the scheduler job's Get-last-commit-with-checks step. Skip those
entries rather than indexing into them.
@mikeysklar mikeysklar closed this Aug 17, 2026
@mikeysklar mikeysklar reopened this Aug 17, 2026
dhalbert and others added 5 commits August 17, 2026 18:31
…wrun

tools: skip check suites with no workflowRun in ci_changes_per_commit.py
…main

Translations update from Hosted Weblate
Prevent click noise on `audiomixer.Mixer` and `synthio.Synthesizer` during volume updates
zephyr_dts_to_cp_board() dereferenced props["label"] unconditionally for
gpio-keys, but label is optional and deprecated there; modern boards identify
keys with zephyr,code instead. Any such board fails board generation with
KeyError: 'label'.

Guard it the same way the gpio-leds handler in the same function already does.

Hit on a Silicon Labs SiWx917-DK2605A (BRD2605A), whose gpio-keys nodes come
from Zephyr's own board .dts with no label.
@mikeysklar
mikeysklar force-pushed the fix/zephyr-gpio-keys-optional-label branch from e41466a to 8e640dc Compare August 18, 2026 20:00
@mikeysklar

Copy link
Copy Markdown
Owner Author

Superseded by adafruit#11210, which targets adafruit:main directly. Closing this one so there is a single thread for the fix.

@mikeysklar mikeysklar closed this Aug 18, 2026
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.

5 participants