Skip to content

Commit 38c8d47

Browse files
rerickson1nashif
authored andcommitted
modem: hl7800: remove DTR control
Using DTR to control sleep modes is a legacy mode of operation. Remove control of DTR IO. Signed-off-by: Ryan Erickson <[email protected]>
1 parent 982c072 commit 38c8d47

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

drivers/modem/hl7800.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ enum mdm_control_pins {
147147
MDM_WAKE,
148148
MDM_PWR_ON,
149149
MDM_FAST_SHUTD,
150-
MDM_UART_DTR,
151150
MDM_VGPIO,
152151
MDM_UART_DSR,
153152
MDM_UART_CTS,
@@ -207,10 +206,6 @@ static const struct mdm_control_pinconfig pinconfig[] = {
207206
DT_INST_GPIO_PIN(0, mdm_fast_shutd_gpios),
208207
(GPIO_OUTPUT | GPIO_OPEN_DRAIN)),
209208

210-
/* MDM_UART_DTR */
211-
PINCONFIG(DT_INST_GPIO_LABEL(0, mdm_uart_dtr_gpios),
212-
DT_INST_GPIO_PIN(0, mdm_uart_dtr_gpios), GPIO_OUTPUT),
213-
214209
/* MDM_VGPIO */
215210
PINCONFIG(DT_INST_GPIO_LABEL(0, mdm_vgpio_gpios),
216211
DT_INST_GPIO_PIN(0, mdm_vgpio_gpios),
@@ -242,8 +237,6 @@ static const struct mdm_control_pinconfig pinconfig[] = {
242237
#define MDM_PWR_ON_NOT_ASSERTED 1
243238
#define MDM_FAST_SHUTD_ASSERTED 0
244239
#define MDM_FAST_SHUTD_NOT_ASSERTED 1
245-
#define MDM_UART_DTR_ASSERTED 0 /* Asserted keeps the module awake */
246-
#define MDM_UART_DTR_NOT_ASSERTED 1
247240

248241
#define MDM_SEND_OK_ENABLED 0
249242
#define MDM_SEND_OK_DISABLED 1
@@ -812,28 +805,12 @@ static void modem_assert_fast_shutd(bool assert)
812805
}
813806
}
814807

815-
static void modem_assert_uart_dtr(bool assert)
816-
{
817-
if (assert) {
818-
HL7800_IO_DBG_LOG("MDM_UART_DTR -> ASSERTED");
819-
gpio_pin_set(ictx.gpio_port_dev[MDM_UART_DTR],
820-
pinconfig[MDM_UART_DTR].pin,
821-
MDM_UART_DTR_ASSERTED);
822-
} else {
823-
HL7800_IO_DBG_LOG("MDM_UART_DTR -> NOT_ASSERTED");
824-
gpio_pin_set(ictx.gpio_port_dev[MDM_UART_DTR],
825-
pinconfig[MDM_UART_DTR].pin,
826-
MDM_UART_DTR_NOT_ASSERTED);
827-
}
828-
}
829-
830808
static void allow_sleep_work_callback(struct k_work *item)
831809
{
832810
ARG_UNUSED(item);
833811
LOG_DBG("Allow sleep");
834812
ictx.allow_sleep = true;
835813
modem_assert_wake(false);
836-
modem_assert_uart_dtr(false);
837814
}
838815

839816
static void allow_sleep(bool allow)
@@ -848,7 +825,6 @@ static void allow_sleep(bool allow)
848825
k_work_cancel_delayable(&ictx.allow_sleep_work);
849826
ictx.allow_sleep = false;
850827
modem_assert_wake(true);
851-
modem_assert_uart_dtr(true);
852828
}
853829
#endif
854830
}
@@ -4319,7 +4295,6 @@ static void prepare_io_for_reset(void)
43194295
{
43204296
HL7800_IO_DBG_LOG("Preparing IO for reset/sleep");
43214297
shutdown_uart();
4322-
modem_assert_uart_dtr(true);
43234298
modem_assert_wake(false);
43244299
modem_assert_pwr_on(false);
43254300
modem_assert_fast_shutd(false);
@@ -5647,7 +5622,6 @@ static int hl7800_init(const struct device *dev)
56475622
ictx.uart_on = true;
56485623

56495624
modem_assert_wake(false);
5650-
modem_assert_uart_dtr(false);
56515625
modem_assert_pwr_on(false);
56525626
modem_assert_fast_shutd(false);
56535627

0 commit comments

Comments
 (0)