diff --git a/drivers/gnss/ubx.c b/drivers/gnss/ubx.c index 9b76b101ba5e..92402f6082c4 100644 --- a/drivers/gnss/ubx.c +++ b/drivers/gnss/ubx.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -65,6 +66,7 @@ static const struct gnss_serial_ops ubx_gserial_ops = { static int ubx_probe(struct serdev_device *serdev) { struct gnss_serial *gserial; + struct gpio_desc *reset; struct ubx_data *data; int ret; @@ -90,6 +92,13 @@ static int ubx_probe(struct serdev_device *serdev) if (ret < 0 && ret != -ENODEV) goto err_free_gserial; + /* Deassert reset */ + reset = devm_gpiod_get_optional(&serdev->dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(reset)) { + ret = PTR_ERR(reset); + goto err_free_gserial; + } + ret = gnss_serial_register(gserial); if (ret) goto err_free_gserial;