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 <ryan.erickson@lairdconnect.com>
This commit is contained in:
parent
982c072221
commit
38c8d4729f
1 changed files with 0 additions and 26 deletions
|
@ -147,7 +147,6 @@ enum mdm_control_pins {
|
||||||
MDM_WAKE,
|
MDM_WAKE,
|
||||||
MDM_PWR_ON,
|
MDM_PWR_ON,
|
||||||
MDM_FAST_SHUTD,
|
MDM_FAST_SHUTD,
|
||||||
MDM_UART_DTR,
|
|
||||||
MDM_VGPIO,
|
MDM_VGPIO,
|
||||||
MDM_UART_DSR,
|
MDM_UART_DSR,
|
||||||
MDM_UART_CTS,
|
MDM_UART_CTS,
|
||||||
|
@ -207,10 +206,6 @@ static const struct mdm_control_pinconfig pinconfig[] = {
|
||||||
DT_INST_GPIO_PIN(0, mdm_fast_shutd_gpios),
|
DT_INST_GPIO_PIN(0, mdm_fast_shutd_gpios),
|
||||||
(GPIO_OUTPUT | GPIO_OPEN_DRAIN)),
|
(GPIO_OUTPUT | GPIO_OPEN_DRAIN)),
|
||||||
|
|
||||||
/* MDM_UART_DTR */
|
|
||||||
PINCONFIG(DT_INST_GPIO_LABEL(0, mdm_uart_dtr_gpios),
|
|
||||||
DT_INST_GPIO_PIN(0, mdm_uart_dtr_gpios), GPIO_OUTPUT),
|
|
||||||
|
|
||||||
/* MDM_VGPIO */
|
/* MDM_VGPIO */
|
||||||
PINCONFIG(DT_INST_GPIO_LABEL(0, mdm_vgpio_gpios),
|
PINCONFIG(DT_INST_GPIO_LABEL(0, mdm_vgpio_gpios),
|
||||||
DT_INST_GPIO_PIN(0, mdm_vgpio_gpios),
|
DT_INST_GPIO_PIN(0, mdm_vgpio_gpios),
|
||||||
|
@ -242,8 +237,6 @@ static const struct mdm_control_pinconfig pinconfig[] = {
|
||||||
#define MDM_PWR_ON_NOT_ASSERTED 1
|
#define MDM_PWR_ON_NOT_ASSERTED 1
|
||||||
#define MDM_FAST_SHUTD_ASSERTED 0
|
#define MDM_FAST_SHUTD_ASSERTED 0
|
||||||
#define MDM_FAST_SHUTD_NOT_ASSERTED 1
|
#define MDM_FAST_SHUTD_NOT_ASSERTED 1
|
||||||
#define MDM_UART_DTR_ASSERTED 0 /* Asserted keeps the module awake */
|
|
||||||
#define MDM_UART_DTR_NOT_ASSERTED 1
|
|
||||||
|
|
||||||
#define MDM_SEND_OK_ENABLED 0
|
#define MDM_SEND_OK_ENABLED 0
|
||||||
#define MDM_SEND_OK_DISABLED 1
|
#define MDM_SEND_OK_DISABLED 1
|
||||||
|
@ -812,28 +805,12 @@ static void modem_assert_fast_shutd(bool assert)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void modem_assert_uart_dtr(bool assert)
|
|
||||||
{
|
|
||||||
if (assert) {
|
|
||||||
HL7800_IO_DBG_LOG("MDM_UART_DTR -> ASSERTED");
|
|
||||||
gpio_pin_set(ictx.gpio_port_dev[MDM_UART_DTR],
|
|
||||||
pinconfig[MDM_UART_DTR].pin,
|
|
||||||
MDM_UART_DTR_ASSERTED);
|
|
||||||
} else {
|
|
||||||
HL7800_IO_DBG_LOG("MDM_UART_DTR -> NOT_ASSERTED");
|
|
||||||
gpio_pin_set(ictx.gpio_port_dev[MDM_UART_DTR],
|
|
||||||
pinconfig[MDM_UART_DTR].pin,
|
|
||||||
MDM_UART_DTR_NOT_ASSERTED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void allow_sleep_work_callback(struct k_work *item)
|
static void allow_sleep_work_callback(struct k_work *item)
|
||||||
{
|
{
|
||||||
ARG_UNUSED(item);
|
ARG_UNUSED(item);
|
||||||
LOG_DBG("Allow sleep");
|
LOG_DBG("Allow sleep");
|
||||||
ictx.allow_sleep = true;
|
ictx.allow_sleep = true;
|
||||||
modem_assert_wake(false);
|
modem_assert_wake(false);
|
||||||
modem_assert_uart_dtr(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void allow_sleep(bool allow)
|
static void allow_sleep(bool allow)
|
||||||
|
@ -848,7 +825,6 @@ static void allow_sleep(bool allow)
|
||||||
k_work_cancel_delayable(&ictx.allow_sleep_work);
|
k_work_cancel_delayable(&ictx.allow_sleep_work);
|
||||||
ictx.allow_sleep = false;
|
ictx.allow_sleep = false;
|
||||||
modem_assert_wake(true);
|
modem_assert_wake(true);
|
||||||
modem_assert_uart_dtr(true);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -4319,7 +4295,6 @@ static void prepare_io_for_reset(void)
|
||||||
{
|
{
|
||||||
HL7800_IO_DBG_LOG("Preparing IO for reset/sleep");
|
HL7800_IO_DBG_LOG("Preparing IO for reset/sleep");
|
||||||
shutdown_uart();
|
shutdown_uart();
|
||||||
modem_assert_uart_dtr(true);
|
|
||||||
modem_assert_wake(false);
|
modem_assert_wake(false);
|
||||||
modem_assert_pwr_on(false);
|
modem_assert_pwr_on(false);
|
||||||
modem_assert_fast_shutd(false);
|
modem_assert_fast_shutd(false);
|
||||||
|
@ -5647,7 +5622,6 @@ static int hl7800_init(const struct device *dev)
|
||||||
ictx.uart_on = true;
|
ictx.uart_on = true;
|
||||||
|
|
||||||
modem_assert_wake(false);
|
modem_assert_wake(false);
|
||||||
modem_assert_uart_dtr(false);
|
|
||||||
modem_assert_pwr_on(false);
|
modem_assert_pwr_on(false);
|
||||||
modem_assert_fast_shutd(false);
|
modem_assert_fast_shutd(false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue