mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 23:32:14 +02:00
src: add udev watcher to improve modem recovery
Most of the modem issues follow a (incomplete) USB device reset. Instead of relying solely on the existing timer, this patch adds a udev monitor which resets the modem as soon as its associated USB device is reset, which greatly improves recovery time.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include <gpiod.h>
|
||||
#include <gudev/gudev.h>
|
||||
#include <libmm-glib.h>
|
||||
|
||||
enum EG25State {
|
||||
@@ -44,6 +45,7 @@ struct EG25Manager {
|
||||
int suspend_inhibit_fd;
|
||||
guint suspend_source;
|
||||
|
||||
GUdevClient *udev;
|
||||
|
||||
struct gpiod_chip *gpiochip[2];
|
||||
struct gpiod_line *gpio_out[5];
|
||||
|
Reference in New Issue
Block a user