Skip to content

drivers: smbus: default initialization order is inconsistent and causes builds to fail #99129

@cfriedt

Description

@cfriedt

Describe the bug

The default initialization order of SMBus drivers is a little usual. It is set to CONFIG_KERNEL_INIT_PRIORITY_DEFAULT (which is 40). For most drivers, the default initialization priority should be CONFIG_KERNEL_INIT_PRIORITY_DEVICE (which is 50).

This causes an error when building a driver in-tree, today, unmodified, as demonstrated via this PR.

#99128

Regression

  • This is a regression.

Steps to reproduce

  1. twister -c -p nucleo_g071rb -T tests/drivers/build_all/smbus/
  2. See error

Relevant log output

ERROR: Device initialization priority validation failed, the sequence of initialization calls does not match the devicetree dependencies.
ERROR: /smbus1 <smbus_stm32_init> is initialized before its dependency /soc/i2c@40005400 <i2c_stm32_init> (POST_KERNEL+1 < POST_KERNEL+4)

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

  • OS: Any
  • Toolchain: Any
  • Commit SHA or Version used: v4.3.0-rc3

Additional Context

I'm not sure if this is an annoyance, but it results in a build failure any time someone were to build the driver.

Set to low priority since it's simply not seen because we do not build the driver in CI.

#99128

Metadata

Metadata

Assignees

Labels

Release BlockerUse this label for justified release blockersarea: SMBusbugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions