Skip to content

rust: helpers: build the iio_trigger_get() helper only with IIO triggers - #1073

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
jgoyvaerts:pr/rust-iio-trigger-helper
Nov 7, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
jgoyvaerts:pr/rust-iio-trigger-helper

Conversation

@jgoyvaerts

Copy link
Copy Markdown
Contributor

bac6f373c5c9 ("iio: aop_motion: give each sensor its own trigger") added rust/helpers/iio.c, which wraps iio_trigger_get(). That inline exists only under CONFIG_IIO_TRIGGER, but the helper is built whenever CONFIG_IIO is. A config with IIO and without triggers, for example one that doesn't build IIO_AOP_SENSOR_MOTION, stops in make prepare:

rust/helpers/iio.c:7:16: error: implicit declaration of function 'iio_trigger_get'

This builds the helper only when the function exists. Its one user, aop_motion, selects IIO_TRIGGERED_BUFFER, and with it IIO_TRIGGER, so nothing changes for it.

Testing

  • Our J616s config (IIO on, AOP motion off) failed with the error above on aurora-wip 57222e0ee261. With this commit, Image, modules and dtbs build: 1,056 modules, no new warnings.
  • The branch is one cherry-pick onto integration/aurora 068dfce19780, which has the same helper.

🤖 Generated with Claude Code

iio_trigger_get() is declared only under CONFIG_IIO_TRIGGER, but the
helper is built whenever CONFIG_IIO is, so a kernel with IIO and without
triggers, such as one without IIO_AOP_SENSOR_MOTION, fails to build:

  rust/helpers/iio.c:7:16: error: implicit declaration of function
  'iio_trigger_get'

Build the helper only when the function exists. Its one user,
aop_motion, selects IIO_TRIGGERED_BUFFER and with it IIO_TRIGGER.

Fixes: bac6f37 ("iio: aop_motion: give each sensor its own trigger")
Signed-off-by: Jonathan Goyvaerts <[email protected]>
Assisted-by: LLM

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge-train review (MTR-J, 11-07): approved, merging.

The #ifdef CONFIG_IIO_TRIGGER guard is right: iio_trigger_get() only exists with triggers, and aop_motion, the helper's only user, selects IIO_TRIGGERED_BUFFER -> IIO_TRIGGER.

Gates, run on integration/aurora b8ae494f (= fleet19) with linux PRs 1073-1076 merged locally (tree cc6fe2d0):

  • Build: buildbox, fleet recipe (Fedora asahi base + asahi.config, LLVM=1). 5890 modules. The build warnings are identical to the fleet baseline, 0 new.
  • W=1: rust/helpers/helpers.o has 0 warnings.
  • Host tests: run-host-tests.py 193/193, apple-dcp selftests 86/86 (both = fleet19).
  • Boot: one-shot on the J616s. Err 0, 0 AVC (Enforcing), 0 failed units.
  • Integration since then: it moved to 98f6184c (ANE, JPEG, brcmfmac, pmgr, tas2764), none of which touches this file. The merge is clean.

@RyanTheTide
RyanTheTide merged commit 9e0f5ac into aurora-silicon:integration/aurora Nov 7, 2026
3 checks passed
RyanTheTide added a commit that referenced this pull request Nov 7, 2026
Brings aurora-wip up to the tested release branch: CTXR execmem
(#985, #1079), KFIX speaker sleep and resume fixes (#1077, #1080),
JPEG v2 (#1072), Jonathan's G17 and USB work (#1073-#1076), brcmfmac
flowring count (#1081), ANE H16 startup restart (#1066) and the
Touch ID per-prompt match (#904).

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
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.

2 participants