Skip to content

Commit fca5327

Browse files
committed
Merge tag 'gnss-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss
Pull GNSS updates from Johan Hovold: - add support for claiming and deasserting the safeboot pin found on recent u-blox receivers - fix timepulse pin description in the devicetree binding ... and some related binding updates * tag 'gnss-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss: dt-bindings: gnss: fix timepulse description dt-bindings: gnss: u-blox: use lowercase company name dt-bindings: gnss: u-blox: use open-drain reset and safeboot in example gnss: ubx: add support for the safeboot gpio dt-bindings: gnss: u-blox: add safeboot gpio
2 parents fa5ef10 + f5ef3f7 commit fca5327

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

Documentation/devicetree/bindings/gnss/gnss-common.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ properties:
3131
maxItems: 1
3232

3333
timepulse-gpios:
34-
description: When a timepulse is provided to the GNSS device using a
35-
GPIO line, this is used.
34+
description: Timepulse signal
3635
maxItems: 1
3736

3837
additionalProperties: true

Documentation/devicetree/bindings/gnss/u-blox,neo-6m.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$id: http://devicetree.org/schemas/gnss/u-blox,neo-6m.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: U-blox GNSS Receiver
7+
title: u-blox GNSS receiver
88

99
allOf:
1010
- $ref: gnss-common.yaml#
@@ -14,7 +14,7 @@ maintainers:
1414
- Johan Hovold <johan@kernel.org>
1515

1616
description: >
17-
The U-blox GNSS receivers can use UART, DDC (I2C), SPI and USB interfaces.
17+
The u-blox GNSS receivers can use UART, DDC (I2C), SPI and USB interfaces.
1818
1919
properties:
2020
compatible:
@@ -36,6 +36,9 @@ properties:
3636
reset-gpios:
3737
maxItems: 1
3838

39+
safeboot-gpios:
40+
maxItems: 1
41+
3942
vcc-supply:
4043
description: >
4144
Main voltage regulator
@@ -64,6 +67,7 @@ examples:
6467
compatible = "u-blox,neo-8";
6568
v-bckp-supply = <&gnss_v_bckp_reg>;
6669
vcc-supply = <&gnss_vcc_reg>;
67-
reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
70+
reset-gpios = <&gpio 1 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
71+
safeboot-gpios = <&gpio 2 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
6872
};
6973
};

drivers/gnss/ubx.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ static const struct gnss_serial_ops ubx_gserial_ops = {
6666
static int ubx_probe(struct serdev_device *serdev)
6767
{
6868
struct gnss_serial *gserial;
69+
struct gpio_desc *safeboot;
6970
struct gpio_desc *reset;
7071
struct ubx_data *data;
7172
int ret;
@@ -92,6 +93,13 @@ static int ubx_probe(struct serdev_device *serdev)
9293
if (ret < 0 && ret != -ENODEV)
9394
goto err_free_gserial;
9495

96+
/* Deassert safeboot */
97+
safeboot = devm_gpiod_get_optional(&serdev->dev, "safeboot", GPIOD_OUT_LOW);
98+
if (IS_ERR(safeboot)) {
99+
ret = PTR_ERR(safeboot);
100+
goto err_free_gserial;
101+
}
102+
95103
/* Deassert reset */
96104
reset = devm_gpiod_get_optional(&serdev->dev, "reset", GPIOD_OUT_LOW);
97105
if (IS_ERR(reset)) {

0 commit comments

Comments
 (0)