drivers: uart_nrfx_uarte: Fix USE_LOW_POWER macro for PINCTRL case

This macro incorrectly uses DT_NODE_HAS_PROP() to check the truth value
of the "disable-rx" boolean property. In consequence, it always assumes
that RX is disabled and the low power mode needs to be used. Fix this
by replacing the check with DT_PROP().

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2022-03-16 16:44:31 +01:00 committed by Carles Cufí
commit 88ec25b7ee

View file

@ -2027,7 +2027,7 @@ static int uarte_nrfx_pm_action(const struct device *dev,
* kconfig option is enabled.
*/
#define USE_LOW_POWER(idx) \
((!UARTE_HAS_PROP(idx, disable_rx) && \
((!UARTE_PROP(idx, disable_rx) && \
COND_CODE_1(CONFIG_UART_##idx##_ASYNC, \
(!IS_ENABLED(CONFIG_UART_##idx##_NRF_ASYNC_LOW_POWER)), \
(1))) ? 0 : UARTE_CFG_FLAG_LOW_POWER)