circuitdojo / pcf85063a

Zephyr driver for PCF85063A
Apache License 2.0
7 stars 7 forks source link

`DEVICE_DT_INST_DEFINE` init priority is too high #3

Closed bandogora closed 1 year ago

bandogora commented 1 year ago

I'm trying to integrate this driver into an nrfconnect 2.2.0 (Zephyr v3.2.99-ncs1) build. I've been running into an issue finding the bindings for the device during initialization.

Through testing it looks like the cause is the prio level int the DEVICE_DT_INST_DEFINE call.

CONFIG_I2C_INIT_PRIORITY is equal to 50, changing that to 51 seems to solve the issue for me.

https://github.com/circuitdojo/pcf85063a/blob/61cde56d0f269d6cd881bd98a8667d46623b4c51/drivers/counter/pcf85063a.c#L364