You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
drivers: smbus: use correct device initialization priority
The smbus driver initialization priority was previously set to
`KERNEL_INIT_PRIORITY_DEFAULT` (which is 40). However, the default init
priority of devices is typically `KERNEL_INIT_PRIORITY_DEVICE` (which is
50).
Since the stm32 smbus driver uses a reference to the underlying i2c
device, and since this driver was not being built in CI, this led to the
discovery that the smbus driver was initialized too early.
```shell
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)
```
By setting the initialization priority to `KERNEL_INIT_PRIORITY_DEVICE`,
both smbus1 and i2c1 have their priorities evaluated in the same group,
and it becomes possible to determine relative priorities via phandle
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
0 commit comments