devicetree: remove DT_HAS_NODE_STATUS_OKAY

Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an
undesirable API for the following reasons:

- it's inconsistent with the rest of the DT_NODE_HAS_FOO names
- DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand
  for macros which are equivalent to
  DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) &&
- DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck
- DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway
- it is seen as a somewhat aesthetically challenged name

Replace all users with DT_NODE_HAS_STATUS(..., okay), which is
semantically equivalent.

This is mostly done with sed, but a few remaining cases were done by
hand, along with whitespace, docs, and comment changes. These special
cases include the Nordic SOC static assert files.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-05-11 11:56:08 -07:00 committed by Carles Cufí
commit 6e8775ff84
184 changed files with 968 additions and 1010 deletions

View file

@ -317,7 +317,7 @@ static const struct uart_driver_api leuart_gecko_driver_api = {
#endif
};
#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0))
#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay)
#define PIN_LEUART_0_RXD {DT_INST_PROP_BY_IDX(0, location_rx, 1), \
DT_INST_PROP_BY_IDX(0, location_rx, 2), gpioModeInput, 1}
@ -368,9 +368,9 @@ static void leuart_gecko_config_func_0(struct device *dev)
}
#endif
#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1))
#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay)
#define PIN_LEUART_1_RXD {DT_INST_PROP_BY_IDX(1, location_rx, 1), \
DT_INST_PROP_BY_IDX(1, location_rx, 2), gpioModeInput, 1}
@ -421,4 +421,4 @@ static void leuart_gecko_config_func_1(struct device *dev)
}
#endif
#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */