Skip to content

Commit cf3df2b

Browse files
Andrei Hutanunashif
authored andcommitted
drivers: modem: quectel-bg9x: fix for bg95 pinout
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]>
1 parent 5a7f80f commit cf3df2b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/modem/quectel-bg9x.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ static K_KERNEL_STACK_DEFINE(modem_workq_stack, CONFIG_MODEM_QUECTEL_BG9X_RX_WOR
2222
NET_BUF_POOL_DEFINE(mdm_recv_pool, MDM_RECV_MAX_BUF, MDM_RECV_BUF_SIZE, 0, NULL);
2323

2424
static const struct gpio_dt_spec power_gpio = GPIO_DT_SPEC_INST_GET(0, mdm_power_gpios);
25+
#if DT_INST_NODE_HAS_PROP(0, mdm_reset_gpios)
2526
static const struct gpio_dt_spec reset_gpio = GPIO_DT_SPEC_INST_GET(0, mdm_reset_gpios);
27+
#endif
2628
#if DT_INST_NODE_HAS_PROP(0, mdm_dtr_gpios)
2729
static const struct gpio_dt_spec dtr_gpio = GPIO_DT_SPEC_INST_GET(0, mdm_dtr_gpios);
2830
#endif
@@ -1203,11 +1205,13 @@ static int modem_init(const struct device *dev)
12031205
goto error;
12041206
}
12051207

1208+
#if DT_INST_NODE_HAS_PROP(0, mdm_reset_gpios)
12061209
ret = gpio_pin_configure_dt(&reset_gpio, GPIO_OUTPUT_LOW);
12071210
if (ret < 0) {
12081211
LOG_ERR("Failed to configure %s pin", "reset");
12091212
goto error;
12101213
}
1214+
#endif
12111215

12121216
#if DT_INST_NODE_HAS_PROP(0, mdm_dtr_gpios)
12131217
ret = gpio_pin_configure_dt(&dtr_gpio, GPIO_OUTPUT_LOW);

dts/bindings/modem/quectel,bg9x.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ properties:
1414

1515
mdm-reset-gpios:
1616
type: phandle-array
17-
required: true
1817

1918
mdm-dtr-gpios:
2019
type: phandle-array

0 commit comments

Comments
 (0)