1919LOG_MODULE_REGISTER (sm_ctrl_pin , CONFIG_SM_LOG_LEVEL );
2020
2121#define SM_DTR_GPIOS DT_NODE_HAS_PROP(DT_CHOSEN(ncs_sm_uart), dtr_gpios)
22- #define SM_MDM_PWR_GPIOS DT_NODE_HAS_PROP(DT_CHOSEN(ncs_sm_power_gpios), power_gpios )
22+ #define SLM_HAS_PWR_KEY DT_HAS_CHOSEN(ncs_sm_power_key )
2323
2424#if SM_DTR_GPIOS
2525static const struct gpio_dt_spec dtr_gpio =
2626 GPIO_DT_SPEC_GET_OR (DT_CHOSEN (ncs_sm_uart ), dtr_gpios , {0 });
2727
2828static struct gpio_callback dtr_gpio_cb ;
2929#endif
30- #if SM_MDM_PWR_GPIOS
30+ #if SLM_HAS_PWR_KEY
3131static const struct gpio_dt_spec mdm_pwr_gpio =
32- GPIO_DT_SPEC_GET_OR (DT_CHOSEN (ncs_sm_power_gpios ), power_gpios , {0 });
32+ GPIO_DT_SPEC_GET_OR (DT_CHOSEN (ncs_sm_power_key ), gpios , {0 });
3333
3434static struct gpio_callback mdm_pwr_gpio_cb ;
3535#endif
@@ -102,7 +102,7 @@ int sm_ctrl_pin_ready(void)
102102
103103void sm_ctrl_pin_enter_sleep_no_uninit (bool at_host_power_off )
104104{
105- #if SM_DTR_GPIOS || SM_MDM_PWR_GPIOS
105+ #if SM_DTR_GPIOS || SLM_HAS_PWR_KEY
106106 if (at_host_power_off ) {
107107 sm_at_host_power_off ();
108108 }
@@ -119,7 +119,7 @@ void sm_ctrl_pin_enter_sleep_no_uninit(bool at_host_power_off)
119119
120120void sm_ctrl_pin_enter_sleep (void )
121121{
122- #if SM_DTR_GPIOS || SM_MDM_PWR_GPIOS
122+ #if SM_DTR_GPIOS || SLM_HAS_PWR_KEY
123123
124124 /* Stop threads, uninitialize host and disable DTR UART. */
125125 sm_at_host_uninit ();
@@ -171,7 +171,7 @@ void sm_ctrl_pin_enter_shutdown(void)
171171
172172void sm_ctrl_pin_init_gpios (void )
173173{
174- #if SM_MDM_PWR_GPIOS
174+ #if SLM_HAS_PWR_KEY
175175 /* Configure Modem Power GPIO */
176176 if (!gpio_is_ready_dt (& mdm_pwr_gpio )) {
177177 LOG_ERR ("Modem Power GPIO not ready" );
@@ -198,7 +198,7 @@ int sm_ctrl_pin_init(void)
198198#if SM_DTR_GPIOS
199199 nrf_gpio_cfg_sense_set (dtr_gpio .pin , NRF_GPIO_PIN_SENSE_LOW );
200200#endif
201- #if SM_MDM_PWR_GPIOS
201+ #if SLM_HAS_PWR_KEY
202202 err = gpio_pin_interrupt_configure_dt (& mdm_pwr_gpio , GPIO_INT_EDGE_TO_ACTIVE );
203203 if (err ) {
204204 LOG_ERR ("Failed to configure Modem Power GPIO interrupt (%d)." , err );
0 commit comments