mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 15:22:20 +02:00
gpio: disable airplane mode when starting the modem
I'm not sure why this was being done when disabling the modem, move it to the powerup sequence for more consistency.
This commit is contained in:
@@ -74,6 +74,10 @@ int gpio_line_set_value(struct EG25Manager *manager, int line, enum gpiod_line_v
|
|||||||
|
|
||||||
int gpio_sequence_poweron(struct EG25Manager *manager)
|
int gpio_sequence_poweron(struct EG25Manager *manager)
|
||||||
{
|
{
|
||||||
|
/* Disable airplane mode in case it was enabled by other software. The
|
||||||
|
* W_DISABLE pin is active-low, so we set it to high here. */
|
||||||
|
gpio_line_set_value(manager, GPIO_OUT_DISABLE, GPIOD_LINE_VALUE_ACTIVE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Force the modem to poweroff using the RESET_N pin before attempting to
|
* Force the modem to poweroff using the RESET_N pin before attempting to
|
||||||
* boot in case the it got into a bad state.
|
* boot in case the it got into a bad state.
|
||||||
@@ -110,8 +114,6 @@ int gpio_sequence_poweron(struct EG25Manager *manager)
|
|||||||
|
|
||||||
int gpio_sequence_shutdown(struct EG25Manager *manager)
|
int gpio_sequence_shutdown(struct EG25Manager *manager)
|
||||||
{
|
{
|
||||||
gpio_line_set_value(manager, GPIO_OUT_DISABLE, GPIOD_LINE_VALUE_ACTIVE);
|
|
||||||
|
|
||||||
gpio_line_set_value(manager, GPIO_OUT_PWRKEY, GPIOD_LINE_VALUE_ACTIVE);
|
gpio_line_set_value(manager, GPIO_OUT_PWRKEY, GPIOD_LINE_VALUE_ACTIVE);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
gpio_line_set_value(manager, GPIO_OUT_PWRKEY, GPIOD_LINE_VALUE_INACTIVE);
|
gpio_line_set_value(manager, GPIO_OUT_PWRKEY, GPIOD_LINE_VALUE_INACTIVE);
|
||||||
|
Reference in New Issue
Block a user