dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
These changes were obtained by running a script created by Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following specification: 1. Read the contents of all dts_fixup.h files in Zephyr 2. Check the left-hand side of the #define macros (i.e. the X in #define X Y) 3. Check if that name is also the name of a Kconfig option 3.a If it is, then do nothing 3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it has neither of these two prefixes 4. Replace the use of the changed #define in the code itself (.c, .h, .ld) Additionally, some tweaks had to be added to this script to catch some of the macros used in the code in a parameterized form, e.g.: - CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS - CONFIG_UART_##idx##_TX_PIN - I2C_SBCON_##_num##_BASE_ADDR and to prevent adding DT_ prefix to the following symbols: - FLASH_START - FLASH_SIZE - SRAM_START - SRAM_SIZE - _ROM_ADDR - _ROM_SIZE - _RAM_ADDR - _RAM_SIZE which are surprisingly also defined in some dts_fixup.h files. Finally, some manual corrections had to be done as well: - name##_IRQ -> DT_##name##_IRQ in uart_stm32.c Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
d4a17b4085
commit
20202902f2
304 changed files with 5118 additions and 5118 deletions
|
@ -54,7 +54,7 @@ enum mdm_control_pins {
|
|||
MDM_KEEP_AWAKE,
|
||||
MDM_RESET,
|
||||
SHLD_3V3_1V8_SIG_TRANS_ENA,
|
||||
#ifdef CONFIG_WNCM14A2A_GPIO_MDM_SEND_OK_PIN
|
||||
#ifdef DT_WNCM14A2A_GPIO_MDM_SEND_OK_PIN
|
||||
MDM_SEND_OK,
|
||||
#endif
|
||||
MAX_MDM_CONTROL_PINS,
|
||||
|
@ -62,33 +62,33 @@ enum mdm_control_pins {
|
|||
|
||||
static const struct mdm_control_pinconfig pinconfig[] = {
|
||||
/* MDM_BOOT_MODE_SEL */
|
||||
PINCONFIG(CONFIG_WNCM14A2A_GPIO_MDM_BOOT_MODE_SEL_NAME,
|
||||
CONFIG_WNCM14A2A_GPIO_MDM_BOOT_MODE_SEL_PIN),
|
||||
PINCONFIG(DT_WNCM14A2A_GPIO_MDM_BOOT_MODE_SEL_NAME,
|
||||
DT_WNCM14A2A_GPIO_MDM_BOOT_MODE_SEL_PIN),
|
||||
|
||||
/* MDM_POWER */
|
||||
PINCONFIG(CONFIG_WNCM14A2A_GPIO_MDM_POWER_NAME,
|
||||
CONFIG_WNCM14A2A_GPIO_MDM_POWER_PIN),
|
||||
PINCONFIG(DT_WNCM14A2A_GPIO_MDM_POWER_NAME,
|
||||
DT_WNCM14A2A_GPIO_MDM_POWER_PIN),
|
||||
|
||||
/* MDM_KEEP_AWAKE */
|
||||
PINCONFIG(CONFIG_WNCM14A2A_GPIO_MDM_KEEP_AWAKE_NAME,
|
||||
CONFIG_WNCM14A2A_GPIO_MDM_KEEP_AWAKE_PIN),
|
||||
PINCONFIG(DT_WNCM14A2A_GPIO_MDM_KEEP_AWAKE_NAME,
|
||||
DT_WNCM14A2A_GPIO_MDM_KEEP_AWAKE_PIN),
|
||||
|
||||
/* MDM_RESET */
|
||||
PINCONFIG(CONFIG_WNCM14A2A_GPIO_MDM_RESET_NAME,
|
||||
CONFIG_WNCM14A2A_GPIO_MDM_RESET_PIN),
|
||||
PINCONFIG(DT_WNCM14A2A_GPIO_MDM_RESET_NAME,
|
||||
DT_WNCM14A2A_GPIO_MDM_RESET_PIN),
|
||||
|
||||
/* SHLD_3V3_1V8_SIG_TRANS_ENA */
|
||||
PINCONFIG(CONFIG_WNCM14A2A_GPIO_MDM_SHLD_TRANS_ENA_NAME,
|
||||
CONFIG_WNCM14A2A_GPIO_MDM_SHLD_TRANS_ENA_PIN),
|
||||
PINCONFIG(DT_WNCM14A2A_GPIO_MDM_SHLD_TRANS_ENA_NAME,
|
||||
DT_WNCM14A2A_GPIO_MDM_SHLD_TRANS_ENA_PIN),
|
||||
|
||||
#ifdef CONFIG_WNCM14A2A_GPIO_MDM_SEND_OK_PIN
|
||||
#ifdef DT_WNCM14A2A_GPIO_MDM_SEND_OK_PIN
|
||||
/* MDM_SEND_OK */
|
||||
PINCONFIG(CONFIG_WNCM14A2A_GPIO_MDM_SEND_OK_NAME,
|
||||
CONFIG_WNCM14A2A_GPIO_MDM_SEND_OK_PIN),
|
||||
PINCONFIG(DT_WNCM14A2A_GPIO_MDM_SEND_OK_NAME,
|
||||
DT_WNCM14A2A_GPIO_MDM_SEND_OK_PIN),
|
||||
#endif
|
||||
};
|
||||
|
||||
#define MDM_UART_DEV_NAME CONFIG_WNCM14A2A_UART_DRV_NAME
|
||||
#define MDM_UART_DEV_NAME DT_WNCM14A2A_UART_DRV_NAME
|
||||
|
||||
#define MDM_BOOT_MODE_SPECIAL 0
|
||||
#define MDM_BOOT_MODE_NORMAL 1
|
||||
|
@ -1256,7 +1256,7 @@ static int modem_pin_init(void)
|
|||
LOG_DBG("MDM_KEEP_AWAKE_PIN -> ENABLED");
|
||||
gpio_pin_write(ictx.gpio_port_dev[MDM_KEEP_AWAKE],
|
||||
pinconfig[MDM_KEEP_AWAKE].pin, MDM_KEEP_AWAKE_ENABLED);
|
||||
#ifdef CONFIG_WNCM14A2A_GPIO_MDM_SEND_OK_PIN
|
||||
#ifdef DT_WNCM14A2A_GPIO_MDM_SEND_OK_PIN
|
||||
LOG_DBG("MDM_SEND_OK_PIN -> ENABLED");
|
||||
gpio_pin_write(ictx.gpio_port_dev[MDM_SEND_OK],
|
||||
pinconfig[MDM_SEND_OK].pin, MDM_SEND_OK_ENABLED);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue