Skip to content
Permalink
Browse files

dts: Convert from DT_<COMPAT>_<INSTANCE>_<PROP> to DT_INST...

Change code from using now deprecated DT_<COMPAT>_<INSTANCE>_<PROP>
defines to using DT_INST_<INSTANCE>_<COMPAT>_<PROP>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information...
galak committed Jun 11, 2019
1 parent 01e54a5 commit a2693975d78855792603d9c0ac47756e72040373
Showing with 1,489 additions and 1,488 deletions.
  1. +3 −3 boards/arc/em_starterkit/arc_mpu_regions.c
  2. +1 −1 boards/arm/nrf52_pca20020/board.c
  3. +6 −6 boards/arm/particle_argon/board.h
  4. +4 −4 boards/arm/particle_boron/board.h
  5. +6 −6 boards/arm/particle_xenon/board.h
  6. +2 −2 boards/arm/reel_board/board.c
  7. +2 −2 boards/arm/twr_ke18f/pinmux.c
  8. +1 −1 boards/posix/native_posix/dts_fixup.h
  9. +6 −6 boards/posix/nrf52_bsim/board_soc.h
  10. +4 −4 boards/x86/galileo/Kconfig.defconfig
  11. +12 −12 boards/x86/quark_se_c1000_devboard/board.c
  12. +3 −3 drivers/audio/mpxxdtyy.c
  13. +17 −17 drivers/bluetooth/hci/spi.c
  14. +14 −14 drivers/clock_control/nrf_power_clock.c
  15. +3 −3 drivers/counter/Kconfig.nrfx
  16. +9 −9 drivers/counter/counter_gecko_rtcc.c
  17. +2 −2 drivers/counter/counter_mcux_rtc.c
  18. +1 −1 drivers/counter/counter_nrfx_rtc.c
  19. +8 −8 drivers/counter/timer_dtmr_cmsdk_apb.c
  20. +14 −14 drivers/counter/timer_tmr_cmsdk_apb.c
  21. +20 −20 drivers/display/display_ili9340.c
  22. +5 −5 drivers/display/display_mcux_elcdif.c
  23. +36 −36 drivers/display/ssd1306.c
  24. +41 −41 drivers/display/ssd1673.c
  25. +5 −5 drivers/dma/dma_sam0.c
  26. +4 −4 drivers/entropy/entropy_cc13xx_cc26xx.c
  27. +3 −3 drivers/ethernet/eth_smsc911x.c
  28. +1 −1 drivers/ethernet/eth_smsc911x_priv.h
  29. +3 −3 drivers/flash/flash_gecko.c
  30. +8 −8 drivers/flash/flash_sam.c
  31. +1 −1 drivers/flash/flash_sam0.c
  32. +2 −2 drivers/flash/flash_stm32.c
  33. +2 −2 drivers/flash/soc_flash_mcux.c
  34. +2 −2 drivers/flash/soc_flash_rv32m1.c
  35. +5 −5 drivers/flash/spi_flash_w25qxxdv.c
  36. +15 −15 drivers/flash/spi_nor.c
  37. +4 −4 drivers/gpio/gpio_cc13xx_cc26xx.c
  38. +3 −3 drivers/gpio/gpio_ht16k33.c
  39. +36 −36 drivers/gpio/gpio_sifive.c
  40. +3 −3 drivers/gpio/gpio_sx1509b.c
  41. +4 −4 drivers/hwinfo/hwinfo_sam0.c
  42. +8 −8 drivers/i2c/i2c_cc13xx_cc26xx.c
  43. +8 −8 drivers/i2c/i2c_dw.h
  44. +23 −23 drivers/i2c/i2c_dw_port_x.h
  45. +24 −24 drivers/i2c/i2c_gecko.c
  46. +9 −9 drivers/i2c/i2c_mchp_xec.c
  47. +2 −2 drivers/i2c/i2c_sbcon.c
  48. +1 −1 drivers/i2c/i2c_sifive.c
  49. +10 −10 drivers/i2c/slave/eeprom_slave.c
  50. +7 −7 drivers/ieee802154/ieee802154_cc2520.c
  51. +16 −16 drivers/ieee802154/ieee802154_mcr20a.c
  52. +10 −10 drivers/interrupt_controller/plic.c
  53. +5 −5 drivers/interrupt_controller/sam0_eic.c
  54. +2 −2 drivers/interrupt_controller/vexriscv_litex.c
  55. +10 −10 drivers/ipm/ipm_mhu.c
  56. +17 −17 drivers/led/ht16k33.c
  57. +3 −3 drivers/led/lp3943.c
  58. +3 −3 drivers/led/lp5562.c
  59. +3 −3 drivers/led/pca9633.c
  60. +4 −4 drivers/led_strip/apa102.c
  61. +15 −15 drivers/led_strip/lpd880x.c
  62. +5 −5 drivers/led_strip/ws2812.c
  63. +1 −1 drivers/led_strip/ws2812b_sw.c
  64. +5 −5 drivers/modem/ublox-sara-r4.c
  65. +16 −16 drivers/modem/wncm14a2a.c
  66. +7 −7 drivers/pwm/pwm_nrf5_sw.c
  67. +5 −5 drivers/pwm/pwm_sam.c
  68. +6 −6 drivers/pwm/pwm_sifive.c
  69. +5 −5 drivers/sensor/adt7420/adt7420.c
  70. +10 −10 drivers/sensor/adxl362/adxl362.c
  71. +2 −2 drivers/sensor/adxl362/adxl362.h
  72. +12 −12 drivers/sensor/adxl372/adxl372.c
  73. +2 −2 drivers/sensor/adxl372/adxl372.h
  74. +4 −4 drivers/sensor/ams_iAQcore/iAQcore.c
  75. +6 −6 drivers/sensor/apds9960/apds9960.c
  76. +9 −9 drivers/sensor/bme280/bme280.c
  77. +4 −4 drivers/sensor/bme680/bme680.c
  78. +7 −7 drivers/sensor/bmi160/bmi160.c
  79. +11 −11 drivers/sensor/ccs811/ccs811.c
  80. +10 −10 drivers/sensor/ens210/ens210.c
  81. +7 −7 drivers/sensor/fxas21002/fxas21002.c
  82. +10 −10 drivers/sensor/fxos8700/fxos8700.c
  83. +7 −7 drivers/sensor/hts221/hts221.c
  84. +10 −10 drivers/sensor/hts221/hts221_trigger.c
  85. +1 −1 drivers/sensor/lis2dh/lis2dh.c
  86. +16 −16 drivers/sensor/lis2dh/lis2dh.h
  87. +12 −12 drivers/sensor/lis2dh/lis2dh_trigger.c
  88. +2 −2 drivers/sensor/lis2ds12/lis2ds12.c
  89. +1 −1 drivers/sensor/lis2ds12/lis2ds12_i2c.c
  90. +8 −8 drivers/sensor/lis2ds12/lis2ds12_spi.c
  91. +9 −9 drivers/sensor/lis2ds12/lis2ds12_trigger.c
  92. +4 −4 drivers/sensor/lis2dw12/lis2dw12.c
  93. +1 −1 drivers/sensor/lis2dw12/lis2dw12.h
  94. +1 −1 drivers/sensor/lis2dw12/lis2dw12_i2c.c
  95. +7 −7 drivers/sensor/lis2dw12/lis2dw12_spi.c
  96. +5 −5 drivers/sensor/lis2mdl/lis2mdl.c
  97. +7 −7 drivers/sensor/lis3mdl/lis3mdl.c
  98. +1 −1 drivers/sensor/lis3mdl/lis3mdl_trigger.c
  99. +3 −3 drivers/sensor/lps22hb/lps22hb.c
  100. +3 −3 drivers/sensor/lps25hb/lps25hb.c
  101. +3 −3 drivers/sensor/lsm303dlhc_magn/lsm303dlhc_magn.c
  102. +3 −3 drivers/sensor/lsm6ds0/lsm6ds0.c
  103. +2 −2 drivers/sensor/lsm6dsl/lsm6dsl.c
  104. +1 −1 drivers/sensor/lsm6dsl/lsm6dsl_i2c.c
  105. +8 −8 drivers/sensor/lsm6dsl/lsm6dsl_spi.c
  106. +9 −9 drivers/sensor/lsm6dsl/lsm6dsl_trigger.c
  107. +5 −5 drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.c
  108. +3 −3 drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.c
  109. +2 −2 drivers/sensor/max30101/max30101.c
  110. +4 −4 drivers/sensor/ms5837/ms5837.c
  111. +4 −4 drivers/sensor/nrf5/temp_nrf5.c
  112. +5 −5 drivers/sensor/sht3xd/sht3xd.c
  113. +19 −19 drivers/sensor/ti_hdc/ti_hdc.c
  114. +2 −2 drivers/sensor/ti_hdc/ti_hdc.h
  115. +4 −4 drivers/sensor/vl53l0x/vl53l0x.c
  116. +15 −15 drivers/serial/leuart_gecko.c
  117. +68 −68 drivers/serial/uart_cmsdk_apb.c
  118. +36 −36 drivers/serial/uart_gecko.c
  119. +2 −2 drivers/serial/uart_nsim.c
  120. +2 −2 drivers/serial/uart_rv32m1_lpuart.c
  121. +12 −12 drivers/serial/uart_sifive.c
  122. +1 −1 drivers/spi/spi_cc13xx_cc26xx.c
  123. +9 −9 drivers/spi/spi_sifive.c
  124. +1 −1 drivers/timer/nrf_rtc_timer.c
  125. +6 −6 drivers/timer/sam0_rtc_timer.c
  126. +1 −1 drivers/usb/device/usb_dc_nrfx.c
  127. +6 −6 drivers/usb/device/usb_dc_sam0.c
  128. +6 −6 drivers/usb/device/usb_dc_stm32.c
  129. +1 −1 drivers/watchdog/wdt_cmsdk_apb.c
  130. +2 −2 drivers/watchdog/wdt_iwdg_stm32.c
  131. +5 −5 drivers/watchdog/wdt_sam0.c
  132. +7 −7 drivers/wifi/winc1500/wifi_winc1500_nm_bus_wrapper.c
  133. +2 −2 ext/hal/nordic/nrfx_glue.h
  134. +3 −3 samples/bluetooth/hci_spi/src/main.c
  135. +4 −4 samples/boards/96b_argonkey/microphone/src/main.c
  136. +10 −10 samples/boards/96b_argonkey/sensors/src/main.c
  137. +4 −4 samples/boards/reel_board/mesh_badge/src/periphs.c
  138. +1 −1 samples/boards/reel_board/mesh_badge/src/reel_board.c
  139. +1 −1 samples/display/ili9340/src/main.c
  140. +4 −4 samples/drivers/ht16k33/src/main.c
  141. +3 −3 samples/drivers/led_apa102/src/main.c
  142. +1 −1 samples/drivers/led_lp3943/src/main.c
  143. +1 −1 samples/drivers/led_lp5562/src/main.c
  144. +1 −1 samples/drivers/led_lpd8806/src/main.c
  145. +1 −1 samples/drivers/led_pca9633/src/main.c
  146. +1 −1 samples/drivers/led_ws2812/src/main.c
  147. +1 −1 samples/net/lwm2m_client/src/lwm2m-client.c
  148. +6 −6 samples/net/wifi/src/wifi_test.c
  149. +1 −1 samples/sensor/adt7420/src/main.c
  150. +1 −1 samples/sensor/adxl362/src/main.c
  151. +2 −2 samples/sensor/adxl372/src/main.c
  152. +1 −1 samples/sensor/ams_iAQcore/src/main.c
  153. +1 −1 samples/sensor/apds9960/src/main.c
  154. +1 −1 samples/sensor/bme680/src/main.c
  155. +1 −1 samples/sensor/bmi160/src/bmi160.c
  156. +1 −1 samples/sensor/ccs811/src/main.c
  157. +1 −1 samples/sensor/ens210/src/main.c
  158. +1 −1 samples/sensor/fxas21002/src/main.c
  159. +1 −1 samples/sensor/fxos8700-hid/src/main.c
  160. +1 −1 samples/sensor/fxos8700/src/main.c
  161. +4 −4 samples/sensor/lsm303dlhc/src/main.c
  162. +1 −1 samples/sensor/lsm6dsl/src/main.c
  163. +1 −1 samples/sensor/max30101/src/main.c
  164. +1 −1 samples/sensor/ms5837/src/main.c
  165. +1 −1 samples/sensor/ti_hdc/src/main.c
  166. +1 −1 samples/sensor/vl53l0x/src/main.c
  167. +4 −4 samples/shields/x_nucleo_iks01a1/src/main.c
  168. +5 −5 samples/shields/x_nucleo_iks01a2/src/main.c
  169. +1 −1 samples/subsys/ipc/ipm_mcux/remote/src/main_remote.c
  170. +1 −1 samples/subsys/ipc/ipm_mcux/src/main_master.c
  171. +1 −1 samples/subsys/ipc/ipm_mhu_dual_core/src/main.c
  172. +2 −2 soc/arc/snps_emsk/dts_fixup.h
  173. +2 −2 soc/arc/snps_nsim/dts_fixup.h
  174. +3 −3 soc/arm/atmel_sam0/samd20/dts_fixup.h
  175. +4 −4 soc/arm/atmel_sam0/samd21/dts_fixup.h
  176. +4 −4 soc/arm/atmel_sam0/samr21/dts_fixup.h
  177. +39 −39 soc/arm/microchip_mec/mec1501/dts_fixup.h
  178. +2 −2 soc/arm/microchip_mec/mec1701/dts_fixup.h
  179. +1 −1 soc/arm/nordic_nrf/nrf51/dts_fixup.h
  180. +1 −1 soc/arm/nordic_nrf/nrf52/dts_fixup.h
  181. +4 −4 soc/arm/nxp_imx/rt/Kconfig.defconfig.series
  182. +44 −44 soc/arm/nxp_kinetis/ke1xf/soc.c
  183. +1 −1 soc/arm/st_stm32/stm32f0/dts_fixup.h
  184. +1 −1 soc/arm/st_stm32/stm32f1/dts_fixup.h
  185. +1 −1 soc/arm/st_stm32/stm32f2/dts_fixup.h
  186. +1 −1 soc/arm/st_stm32/stm32f3/dts_fixup.h
  187. +1 −1 soc/arm/st_stm32/stm32f4/dts_fixup.h
  188. +1 −1 soc/arm/st_stm32/stm32f7/dts_fixup.h
  189. +1 −1 soc/arm/st_stm32/stm32l0/dts_fixup.h
  190. +1 −1 soc/arm/st_stm32/stm32l4/dts_fixup.h
  191. +1 −1 soc/arm/ti_simplelink/cc13x2_cc26x2/dts_fixup.h
  192. +2 −2 soc/riscv32/litex-vexriscv/soc.h
  193. +1 −1 soc/riscv32/riscv-privilege/sifive-freedom/soc.h
  194. +36 −36 soc/x86/apollo_lake/dts_fixup.h
  195. +19 −19 soc/x86/intel_quark/quark_x1000/dts_fixup.h
  196. +1 −1 subsys/bluetooth/controller/ll_sw/ctrl.c
  197. +2 −2 subsys/bluetooth/controller/ll_sw/ll.c
  198. +2 −2 subsys/bluetooth/controller/ll_sw/nordic/lll/lll.c
  199. +1 −1 subsys/bluetooth/controller/ll_sw/nordic/lll/lll_clock.c
  200. +4 −4 subsys/disk/disk_access_sdhc.c
  201. +1 −1 tests/boards/intel_s1000_crb/src/spi_flash.c
  202. +1 −1 tests/drivers/adc/adc_api/src/test_adc.c
  203. +193 −192 tests/drivers/build_all/dts_fixup.h
  204. +6 −6 tests/drivers/counter/counter_basic_api/src/test_counter.c
  205. +29 −29 tests/drivers/i2c/i2c_slave_api/src/main.c
  206. +1 −1 tests/drivers/pwm/pwm_api/src/test_pwm.c
@@ -25,11 +25,11 @@ static struct arc_mpu_region mpu_regions[] = {
REGION_KERNEL_RAM_ATTR | REGION_DYNAMIC),
#endif

#if DT_MMIO_SRAM_0_SIZE > 0
#if DT_INST_0_MMIO_SRAM_SIZE > 0
/* Region DDR RAM */
MPU_REGION_ENTRY("DDR RAM",
DT_MMIO_SRAM_0_BASE_ADDRESS,
DT_MMIO_SRAM_0_SIZE,
DT_INST_0_MMIO_SRAM_BASE_ADDRESS,
DT_INST_0_MMIO_SRAM_SIZE,
AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR | AUX_MPU_ATTR_UR |
AUX_MPU_ATTR_KE | AUX_MPU_ATTR_UE | REGION_DYNAMIC),
#endif
@@ -67,7 +67,7 @@ DEVICE_INIT(vdd_pwr_ctrl_init, "", pwr_ctrl_init, NULL, &vdd_pwr_ctrl_cfg,
#endif

static const struct pwr_ctrl_cfg ccs_vdd_pwr_ctrl_cfg = {
.port = DT_SEMTECH_SX1509B_0_LABEL,
.port = DT_INST_0_SEMTECH_SX1509B_LABEL,
.pin = CCS_VDD_PWR_CTRL_GPIO_PIN,
};

@@ -8,11 +8,11 @@
#define __INC_BOARD_H

/* SKYWORKS SKY13351 antenna selection settings */
#define SKY_UFLn_GPIO_NAME DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_CONTROLLER
#define SKY_UFLn_GPIO_FLAGS DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_FLAGS
#define SKY_UFLn_GPIO_PIN DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_PIN
#define SKY_PCBn_GPIO_NAME DT_SKYWORKS_SKY13351_0_VCTL2_GPIOS_CONTROLLER
#define SKY_PCBn_GPIO_FLAGS DT_SKYWORKS_SKY13351_0_VCTL2_GPIOS_FLAGS
#define SKY_PCBn_GPIO_PIN DT_SKYWORKS_SKY13351_0_VCTL2_GPIOS_PIN
#define SKY_UFLn_GPIO_NAME DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_CONTROLLER
#define SKY_UFLn_GPIO_FLAGS DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_FLAGS
#define SKY_UFLn_GPIO_PIN DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_PIN
#define SKY_PCBn_GPIO_NAME DT_INST_0_SKYWORKS_SKY13351_VCTL2_GPIOS_CONTROLLER
#define SKY_PCBn_GPIO_FLAGS DT_INST_0_SKYWORKS_SKY13351_VCTL2_GPIOS_FLAGS
#define SKY_PCBn_GPIO_PIN DT_INST_0_SKYWORKS_SKY13351_VCTL2_GPIOS_PIN

#endif /* __INC_BOARD_H */
@@ -8,15 +8,15 @@
#define __INC_BOARD_H

/* pin used to enable the buffer power */
#define SERIAL_BUFFER_ENABLE_GPIO_NAME DT_NORDIC_NRF_GPIO_0_LABEL
#define SERIAL_BUFFER_ENABLE_GPIO_NAME DT_INST_0_NORDIC_NRF_GPIO_LABEL
#define SERIAL_BUFFER_ENABLE_GPIO_PIN 25

/* pin used to detect V_INT (buffer power) */
#define V_INT_DETECT_GPIO_PIN 2

/* SKYWORKS SKY13351 antenna selection settings (only use vctl1) */
#define ANT_SEL_GPIO_NAME DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_CONTROLLER
#define ANT_SEL_GPIO_FLAGS DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_FLAGS
#define ANT_SEL_GPIO_PIN DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_PIN
#define ANT_SEL_GPIO_NAME DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_CONTROLLER
#define ANT_SEL_GPIO_FLAGS DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_FLAGS
#define ANT_SEL_GPIO_PIN DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_PIN

#endif /* __INC_BOARD_H */
@@ -8,11 +8,11 @@
#define __INC_BOARD_H

/* SKYWORKS SKY13351 antenna selection settings */
#define SKY_UFLn_GPIO_NAME DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_CONTROLLER
#define SKY_UFLn_GPIO_FLAGS DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_FLAGS
#define SKY_UFLn_GPIO_PIN DT_SKYWORKS_SKY13351_0_VCTL1_GPIOS_PIN
#define SKY_PCBn_GPIO_NAME DT_SKYWORKS_SKY13351_0_VCTL2_GPIOS_CONTROLLER
#define SKY_PCBn_GPIO_FLAGS DT_SKYWORKS_SKY13351_0_VCTL2_GPIOS_FLAGS
#define SKY_PCBn_GPIO_PIN DT_SKYWORKS_SKY13351_0_VCTL2_GPIOS_PIN
#define SKY_UFLn_GPIO_NAME DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_CONTROLLER
#define SKY_UFLn_GPIO_FLAGS DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_FLAGS
#define SKY_UFLn_GPIO_PIN DT_INST_0_SKYWORKS_SKY13351_VCTL1_GPIOS_PIN
#define SKY_PCBn_GPIO_NAME DT_INST_0_SKYWORKS_SKY13351_VCTL2_GPIOS_CONTROLLER
#define SKY_PCBn_GPIO_FLAGS DT_INST_0_SKYWORKS_SKY13351_VCTL2_GPIOS_FLAGS
#define SKY_PCBn_GPIO_PIN DT_INST_0_SKYWORKS_SKY13351_VCTL2_GPIOS_PIN

#endif /* __INC_BOARD_H */
@@ -33,11 +33,11 @@ static int board_reel_board_init(struct device *dev)
* (High-Impedance state of pin B from Dual-Supply Bus Transceiver).
*/
gpio = NRF_P0;
gpio->PIN_CNF[DT_NORDIC_NRF_UART_0_RX_PIN] =
gpio->PIN_CNF[DT_INST_0_NORDIC_NRF_UART_RX_PIN] =
(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos) |
(GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |
(GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos);
gpio->PIN_CNF[DT_NORDIC_NRF_UART_0_TX_PIN] =
gpio->PIN_CNF[DT_INST_0_NORDIC_NRF_UART_TX_PIN] =
(GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos) |
(GPIO_PIN_CNF_PULL_Pullup << GPIO_PIN_CNF_PULL_Pos) |
(GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos);
@@ -103,10 +103,10 @@ static int twr_ke18f_pinmux_init(struct device *dev)
#endif

/* FXOS8700 INT1, INT2, RST */
#ifdef DT_NXP_FXOS8700_0_INT1_GPIOS_PIN
#ifdef DT_INST_0_NXP_FXOS8700_INT1_GPIOS_PIN
pinmux_pin_set(porta, 14, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif
#ifdef DT_NXP_FXOS8700_0_INT2_GPIOS_PIN
#ifdef DT_INST_0_NXP_FXOS8700_INT2_GPIOS_PIN
pinmux_pin_set(portc, 17, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif
pinmux_pin_set(portc, 15, PORT_PCR_MUX(kPORT_MuxAsGpio));
@@ -4,6 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

#define DT_FLASH_DEV_NAME DT_ZEPHYR_NATIVE_POSIX_FLASH_CONTROLLER_0_LABEL
#define DT_FLASH_DEV_NAME DT_INST_0_ZEPHYR_NATIVE_POSIX_FLASH_CONTROLLER_LABEL
#define DT_UART_0_DEV_NAME DT_ZEPHYR_NATIVE_POSIX_UART_1_LABEL

@@ -34,14 +34,14 @@
#define OFFLOAD_SW_IRQ SWI0_EGU0_IRQn

/* HACK due to the nrf52_bsim not yet supporting DTS */
#if !defined(DT_NORDIC_NRF_CLOCK_0_LABEL)
#define DT_NORDIC_NRF_CLOCK_0_LABEL "CLOCK"
#if !defined(DT_INST_0_NORDIC_NRF_CLOCK_LABEL)
#define DT_INST_0_NORDIC_NRF_CLOCK_LABEL "CLOCK"
#endif
#if !defined(DT_NORDIC_NRF_CLOCK_0_IRQ_0)
#define DT_NORDIC_NRF_CLOCK_0_IRQ_0 POWER_CLOCK_IRQn
#if !defined(DT_INST_0_NORDIC_NRF_CLOCK_IRQ_0)
#define DT_INST_0_NORDIC_NRF_CLOCK_IRQ_0 POWER_CLOCK_IRQn
#endif
#if !defined(DT_NORDIC_NRF_CLOCK_0_IRQ_0_PRIORITY)
#define DT_NORDIC_NRF_CLOCK_0_IRQ_0_PRIORITY 1
#if !defined(DT_INST_0_NORDIC_NRF_CLOCK_IRQ_0_PRIORITY)
#define DT_INST_0_NORDIC_NRF_CLOCK_IRQ_0_PRIORITY 1
#endif

#ifdef __cplusplus
@@ -40,7 +40,7 @@ config GPIO_PCAL9535A_0_DEV_NAME
config GPIO_PCAL9535A_0_I2C_ADDR
default 0x25
config GPIO_PCAL9535A_0_I2C_MASTER_DEV_NAME
default "$(dt_str_val,DT_SNPS_DESIGNWARE_I2C_0_LABEL)"
default "$(dt_str_val,DT_INST_0_SNPS_DESIGNWARE_I2C_LABEL)"

endif # GPIO_PCAL9535A_0

@@ -54,7 +54,7 @@ config GPIO_PCAL9535A_1_DEV_NAME
config GPIO_PCAL9535A_1_I2C_ADDR
default 0x26
config GPIO_PCAL9535A_1_I2C_MASTER_DEV_NAME
default "$(dt_str_val,DT_SNPS_DESIGNWARE_I2C_0_LABEL)"
default "$(dt_str_val,DT_INST_0_SNPS_DESIGNWARE_I2C_LABEL)"

endif # GPIO_PCAL9535A_1

@@ -68,7 +68,7 @@ config GPIO_PCAL9535A_2_DEV_NAME
config GPIO_PCAL9535A_2_I2C_ADDR
default 0x27
config GPIO_PCAL9535A_2_I2C_MASTER_DEV_NAME
default "$(dt_str_val,DT_SNPS_DESIGNWARE_I2C_0_LABEL)"
default "$(dt_str_val,DT_INST_0_SNPS_DESIGNWARE_I2C_LABEL)"

endif # GPIO_PCAL9535A_2

@@ -93,7 +93,7 @@ config PWM_PCA9685_0_DEV_NAME
config PWM_PCA9685_0_I2C_ADDR
default 0x47
config PWM_PCA9685_0_I2C_MASTER_DEV_NAME
default "$(dt_str_val,DT_SNPS_DESIGNWARE_I2C_0_LABEL)"
default "$(dt_str_val,DT_INST_0_SNPS_DESIGNWARE_I2C_LABEL)"

endif # PWM_PCA9685_0
endif # PWM_PCA9685
@@ -15,12 +15,12 @@
#include <gpio.h>

static struct cc2520_gpio_configuration cc2520_gpios[CC2520_GPIO_IDX_MAX] = {
{ .dev = NULL, .pin = DT_TI_CC2520_0_VREG_EN_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_TI_CC2520_0_RESET_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_TI_CC2520_0_FIFO_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_TI_CC2520_0_CCA_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_TI_CC2520_0_SFD_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_TI_CC2520_0_FIFOP_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_INST_0_TI_CC2520_VREG_EN_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_INST_0_TI_CC2520_RESET_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_INST_0_TI_CC2520_FIFO_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_INST_0_TI_CC2520_CCA_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_INST_0_TI_CC2520_SFD_GPIOS_PIN, },
{ .dev = NULL, .pin = DT_INST_0_TI_CC2520_FIFOP_GPIOS_PIN, },
};

struct cc2520_gpio_configuration *cc2520_configure_gpios(void)
@@ -31,32 +31,32 @@ struct cc2520_gpio_configuration *cc2520_configure_gpios(void)
GPIO_INT_ACTIVE_HIGH | GPIO_INT_DEBOUNCE);
struct device *gpio;

gpio = device_get_binding(DT_TI_CC2520_0_VREG_EN_GPIOS_CONTROLLER);
gpio = device_get_binding(DT_INST_0_TI_CC2520_VREG_EN_GPIOS_CONTROLLER);
gpio_pin_configure(gpio, cc2520_gpios[CC2520_GPIO_IDX_VREG_EN].pin,
flags_noint_out);
cc2520_gpios[CC2520_GPIO_IDX_VREG_EN].dev = gpio;

gpio = device_get_binding(DT_TI_CC2520_0_RESET_GPIOS_CONTROLLER);
gpio = device_get_binding(DT_INST_0_TI_CC2520_RESET_GPIOS_CONTROLLER);
gpio_pin_configure(gpio, cc2520_gpios[CC2520_GPIO_IDX_RESET].pin,
flags_noint_out);
cc2520_gpios[CC2520_GPIO_IDX_RESET].dev = gpio;

gpio = device_get_binding(DT_TI_CC2520_0_SFD_GPIOS_CONTROLLER);
gpio = device_get_binding(DT_INST_0_TI_CC2520_SFD_GPIOS_CONTROLLER);
gpio_pin_configure(gpio, cc2520_gpios[CC2520_GPIO_IDX_SFD].pin,
flags_int_in);
cc2520_gpios[CC2520_GPIO_IDX_SFD].dev = gpio;

gpio = device_get_binding(DT_TI_CC2520_0_FIFOP_GPIOS_CONTROLLER);
gpio = device_get_binding(DT_INST_0_TI_CC2520_FIFOP_GPIOS_CONTROLLER);
gpio_pin_configure(gpio, cc2520_gpios[CC2520_GPIO_IDX_FIFOP].pin,
flags_int_in);
cc2520_gpios[CC2520_GPIO_IDX_FIFOP].dev = gpio;

gpio = device_get_binding(DT_TI_CC2520_0_FIFO_GPIOS_CONTROLLER);
gpio = device_get_binding(DT_INST_0_TI_CC2520_FIFO_GPIOS_CONTROLLER);
gpio_pin_configure(gpio, cc2520_gpios[CC2520_GPIO_IDX_FIFO].pin,
flags_noint_in);
cc2520_gpios[CC2520_GPIO_IDX_FIFO].dev = gpio;

gpio = device_get_binding(DT_TI_CC2520_0_CCA_GPIOS_CONTROLLER);
gpio = device_get_binding(DT_INST_0_TI_CC2520_CCA_GPIOS_CONTROLLER);
gpio_pin_configure(gpio, cc2520_gpios[CC2520_GPIO_IDX_CCA].pin,
flags_noint_in);
cc2520_gpios[CC2520_GPIO_IDX_CCA].dev = gpio;
@@ -150,10 +150,10 @@ static int mpxxdtyy_initialize(struct device *dev)
{
struct mpxxdtyy_data *const data = DEV_DATA(dev);

data->comm_master = device_get_binding(DT_ST_MPXXDTYY_0_BUS_NAME);
data->comm_master = device_get_binding(DT_INST_0_ST_MPXXDTYY_BUS_NAME);

if (data->comm_master == NULL) {
LOG_ERR("master %s not found", DT_ST_MPXXDTYY_0_BUS_NAME);
LOG_ERR("master %s not found", DT_INST_0_ST_MPXXDTYY_BUS_NAME);
return -EINVAL;
}

@@ -163,6 +163,6 @@ static int mpxxdtyy_initialize(struct device *dev)

static struct mpxxdtyy_data mpxxdtyy_data;

DEVICE_AND_API_INIT(mpxxdtyy, DT_ST_MPXXDTYY_0_LABEL, mpxxdtyy_initialize,
DEVICE_AND_API_INIT(mpxxdtyy, DT_INST_0_ST_MPXXDTYY_LABEL, mpxxdtyy_initialize,
&mpxxdtyy_data, NULL, POST_KERNEL,
CONFIG_AUDIO_DMIC_INIT_PRIORITY, &mpxxdtyy_driver_api);
@@ -45,11 +45,11 @@
#define CMD_OGF 1
#define CMD_OCF 2

#define GPIO_IRQ_PIN DT_ZEPHYR_BT_HCI_SPI_0_IRQ_GPIO_PIN
#define GPIO_RESET_PIN DT_ZEPHYR_BT_HCI_SPI_0_RESET_GPIO_PIN
#ifdef DT_ZEPHYR_BT_HCI_SPI_0_CS_GPIO_PIN
#define GPIO_CS_PIN DT_ZEPHYR_BT_HCI_SPI_0_CS_GPIO_PIN
#endif /* DT_ZEPHYR_BT_HCI_SPI_0_CS_GPIO_PIN */
#define GPIO_IRQ_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIO_PIN
#define GPIO_RESET_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIO_PIN
#ifdef DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_PIN
#define GPIO_CS_PIN DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_PIN
#endif /* DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_PIN */

/* Max SPI buffer length for transceive operations.
*
@@ -124,7 +124,7 @@ static int bt_spi_send_aci_config_data_controller_mode(void);
static struct device *spi_dev;

static struct spi_config spi_conf = {
.frequency = DT_ZEPHYR_BT_HCI_SPI_0_SPI_MAX_FREQUENCY,
.frequency = DT_INST_0_ZEPHYR_BT_HCI_SPI_SPI_MAX_FREQUENCY,
.operation = (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8) |
SPI_LINES_SINGLE),
.slave = 0,
@@ -194,10 +194,10 @@ static void bt_spi_handle_vendor_evt(u8_t *rxmsg)
*/
static int configure_cs(void)
{
cs_dev = device_get_binding(DT_ZEPHYR_BT_HCI_SPI_0_CS_GPIO_CONTROLLER);
cs_dev = device_get_binding(DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_CONTROLLER);
if (!cs_dev) {
BT_ERR("Failed to initialize GPIO driver: %s",
DT_ZEPHYR_BT_HCI_SPI_0_CS_GPIO_CONTROLLER);
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_CONTROLLER);
return -EIO;
}

@@ -254,10 +254,10 @@ static int configure_cs(void)

spi_conf_cs.gpio_pin = GPIO_CS_PIN,
spi_conf_cs.gpio_dev = device_get_binding(
DT_ZEPHYR_BT_HCI_SPI_0_CS_GPIO_CONTROLLER);
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_CONTROLLER);
if (!spi_conf_cs.gpio_dev) {
BT_ERR("Failed to initialize GPIO driver: %s",
DT_ZEPHYR_BT_HCI_SPI_0_CS_GPIO_CONTROLLER);
DT_INST_0_ZEPHYR_BT_HCI_SPI_CS_GPIO_CONTROLLER);
return -EIO;
}

@@ -520,7 +520,7 @@ static int bt_spi_open(void)
}

static const struct bt_hci_driver drv = {
.name = DT_ZEPHYR_BT_HCI_SPI_0_LABEL,
.name = DT_INST_0_ZEPHYR_BT_HCI_SPI_LABEL,
.bus = BT_HCI_DRIVER_BUS_SPI,
#if defined(CONFIG_BT_BLUENRG_ACI)
.quirks = BT_QUIRK_NO_RESET,
@@ -533,10 +533,10 @@ static int bt_spi_init(struct device *unused)
{
ARG_UNUSED(unused);

spi_dev = device_get_binding(DT_ZEPHYR_BT_HCI_SPI_0_BUS_NAME);
spi_dev = device_get_binding(DT_INST_0_ZEPHYR_BT_HCI_SPI_BUS_NAME);
if (!spi_dev) {
BT_ERR("Failed to initialize SPI driver: %s",
DT_ZEPHYR_BT_HCI_SPI_0_BUS_NAME);
DT_INST_0_ZEPHYR_BT_HCI_SPI_BUS_NAME);
return -EIO;
}

@@ -545,18 +545,18 @@ static int bt_spi_init(struct device *unused)
}

irq_dev = device_get_binding(
DT_ZEPHYR_BT_HCI_SPI_0_IRQ_GPIO_CONTROLLER);
DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIO_CONTROLLER);
if (!irq_dev) {
BT_ERR("Failed to initialize GPIO driver: %s",
DT_ZEPHYR_BT_HCI_SPI_0_IRQ_GPIO_CONTROLLER);
DT_INST_0_ZEPHYR_BT_HCI_SPI_IRQ_GPIO_CONTROLLER);
return -EIO;
}

rst_dev = device_get_binding(
DT_ZEPHYR_BT_HCI_SPI_0_RESET_GPIO_CONTROLLER);
DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIO_CONTROLLER);
if (!rst_dev) {
BT_ERR("Failed to initialize GPIO driver: %s",
DT_ZEPHYR_BT_HCI_SPI_0_RESET_GPIO_CONTROLLER);
DT_INST_0_ZEPHYR_BT_HCI_SPI_RESET_GPIO_CONTROLLER);
return -EIO;
}

0 comments on commit a269397

Please sign in to comment.
You can’t perform that action at this time.