nrf52840 zephyr disable uart0 warning

It has been asked before but I couldn't find a satisfying answer so far. To reduce base power consumption of 600uA to roughly 3uA I disabled serial by setting CONFIG_SERIAL=n in prj.conf. But I get the following warning:

Fullscreen
1
2
3
4
5
warning: UART_CONSOLE (defined at drivers/console/Kconfig:43) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: SERIAL (=n), SERIAL_HAS_DRIVER (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_UART_CONSOLE and/or look up UART_CONSOLE in
the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

It does work however, and the powerconsumption is reduced. I'm on SDK v2.3.0.

I also tried to just disable serial in the device tree, but it's called somewhere in the project (probably <zephyr/logging/log.h>, so the build crashes unless I do the above.)

Fullscreen
1
2
3
4
5
&pinctrl {
uart0_default: uart0_default {
status="disabled";
};
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I also tried disabling using setting the powerstate at runtime, but I cannot figure the arguments I've to put in the function, as the signature has changed over time and I'm unable to find a current example. The latest I could find is of Zephyr 1.4.

Fullscreen
1
int pm_device_state_set(conststructdevice*dev, uint32_t device_power_state,pm_device_cbcb,void*arg)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Question why is this warning and what is the right way to disable serial (or reduce power).

Edit: I guess it should be

Fullscreen
1
err = pm_device_action_run(device, PM_DEVICE_ACTION_SUSPEND);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

during runtime.