Skip to content

Commit 42fad2c

Browse files
nordic-krchnordicjm
authored andcommitted
[nrf fromtree] drivers: serial: nrfx_uarte2: Remove CONFIG_UART_n_GPIO_MANAGEMENT
Remove Kconfig option that no longer has any use after pinctrl driver is introduced. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit cae53af)
1 parent eb62dd5 commit 42fad2c

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

drivers/serial/uart_nrfx_uarte2.c

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,11 @@ struct uarte_nrfx_data {
141141
};
142142
BUILD_ASSERT(offsetof(struct uarte_nrfx_data, a2i_data) == 0);
143143

144-
/* If set then pins are managed when going to low power mode. */
145-
#define UARTE_CFG_FLAG_GPIO_MGMT BIT(0)
146-
147144
/* If set then receiver is not used. */
148-
#define UARTE_CFG_FLAG_NO_RX BIT(1)
145+
#define UARTE_CFG_FLAG_NO_RX BIT(0)
149146

150147
/* If set then instance is using interrupt driven API. */
151-
#define UARTE_CFG_FLAG_INTERRUPT_DRIVEN_API BIT(2)
148+
#define UARTE_CFG_FLAG_INTERRUPT_DRIVEN_API BIT(1)
152149

153150
/**
154151
* @brief Structure for UARTE configuration.
@@ -917,11 +914,9 @@ static int uarte_nrfx_pm_action(const struct device *dev,
917914

918915
switch (action) {
919916
case PM_DEVICE_ACTION_RESUME:
920-
if (cfg->flags & UARTE_CFG_FLAG_GPIO_MGMT) {
921-
ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT);
922-
if (ret < 0) {
923-
return ret;
924-
}
917+
ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT);
918+
if (ret < 0) {
919+
return ret;
925920
}
926921
if (!IS_ASYNC_API(dev) && !(cfg->flags & UARTE_CFG_FLAG_NO_RX)) {
927922
return start_rx(dev);
@@ -933,11 +928,9 @@ static int uarte_nrfx_pm_action(const struct device *dev,
933928
stop_rx(dev);
934929
}
935930

936-
if (cfg->flags & UARTE_CFG_FLAG_GPIO_MGMT) {
937-
ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_SLEEP);
938-
if (ret < 0) {
939-
return ret;
940-
}
931+
ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_SLEEP);
932+
if (ret < 0) {
933+
return ret;
941934
}
942935

943936
break;
@@ -1032,8 +1025,6 @@ static int uarte_nrfx_pm_action(const struct device *dev,
10321025
}, \
10331026
.pcfg = PINCTRL_DT_DEV_CONFIG_GET(UARTE(idx)), \
10341027
.flags = (UARTE_PROP(idx, disable_rx) ? UARTE_CFG_FLAG_NO_RX : 0) | \
1035-
(IS_ENABLED(CONFIG_UART_##idx##_GPIO_MANAGEMENT) ? \
1036-
UARTE_CFG_FLAG_GPIO_MGMT : 0) | \
10371028
(IS_ENABLED(CONFIG_UART_##idx##_INTERRUPT_DRIVEN) ? \
10381029
UARTE_CFG_FLAG_INTERRUPT_DRIVEN_API : 0), \
10391030
LOG_INSTANCE_PTR_INIT(log, LOG_MODULE_NAME, idx) \

0 commit comments

Comments
 (0)