Skip to content

Commit

Permalink
drivers: modem: quectel-bg9x: fix for bg95 pinout
Browse files Browse the repository at this point in the history
The BG95 pin configuration does not internally ever use the reset pin.
Because of this, there is no need to make reset pin mandatory.
Commit removes reset pin dependency [e.g. in case of BG95].

Signed-off-by: Andrei Hutanu <[email protected]>
  • Loading branch information
Andrei Hutanu authored and nashif committed May 27, 2023
1 parent 5a7f80f commit cf3df2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions drivers/modem/quectel-bg9x.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ static K_KERNEL_STACK_DEFINE(modem_workq_stack, CONFIG_MODEM_QUECTEL_BG9X_RX_WOR
NET_BUF_POOL_DEFINE(mdm_recv_pool, MDM_RECV_MAX_BUF, MDM_RECV_BUF_SIZE, 0, NULL);

static const struct gpio_dt_spec power_gpio = GPIO_DT_SPEC_INST_GET(0, mdm_power_gpios);
#if DT_INST_NODE_HAS_PROP(0, mdm_reset_gpios)
static const struct gpio_dt_spec reset_gpio = GPIO_DT_SPEC_INST_GET(0, mdm_reset_gpios);
#endif
#if DT_INST_NODE_HAS_PROP(0, mdm_dtr_gpios)
static const struct gpio_dt_spec dtr_gpio = GPIO_DT_SPEC_INST_GET(0, mdm_dtr_gpios);
#endif
Expand Down Expand Up @@ -1203,11 +1205,13 @@ static int modem_init(const struct device *dev)
goto error;
}

#if DT_INST_NODE_HAS_PROP(0, mdm_reset_gpios)
ret = gpio_pin_configure_dt(&reset_gpio, GPIO_OUTPUT_LOW);
if (ret < 0) {
LOG_ERR("Failed to configure %s pin", "reset");
goto error;
}
#endif

#if DT_INST_NODE_HAS_PROP(0, mdm_dtr_gpios)
ret = gpio_pin_configure_dt(&dtr_gpio, GPIO_OUTPUT_LOW);
Expand Down
1 change: 0 additions & 1 deletion dts/bindings/modem/quectel,bg9x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ properties:

mdm-reset-gpios:
type: phandle-array
required: true

mdm-dtr-gpios:
type: phandle-array
Expand Down

0 comments on commit cf3df2b

Please sign in to comment.