Commit fca5327e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents fa5ef105 f5ef3f72
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -31,8 +31,7 @@ properties:
    maxItems: 1

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

additionalProperties: true
+7 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/gnss/u-blox,neo-6m.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: U-blox GNSS Receiver
title: u-blox GNSS receiver

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

description: >
  The U-blox GNSS receivers can use UART, DDC (I2C), SPI and USB interfaces.
  The u-blox GNSS receivers can use UART, DDC (I2C), SPI and USB interfaces.

properties:
  compatible:
@@ -36,6 +36,9 @@ properties:
  reset-gpios:
    maxItems: 1

  safeboot-gpios:
    maxItems: 1

  vcc-supply:
    description: >
      Main voltage regulator
@@ -64,6 +67,7 @@ examples:
            compatible = "u-blox,neo-8";
            v-bckp-supply = <&gnss_v_bckp_reg>;
            vcc-supply = <&gnss_vcc_reg>;
            reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
            reset-gpios = <&gpio 1 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
            safeboot-gpios = <&gpio 2 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
        };
    };
+8 −0
Original line number Diff line number Diff line
@@ -66,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 *safeboot;
	struct gpio_desc *reset;
	struct ubx_data *data;
	int ret;
@@ -92,6 +93,13 @@ static int ubx_probe(struct serdev_device *serdev)
	if (ret < 0 && ret != -ENODEV)
		goto err_free_gserial;

	/* Deassert safeboot */
	safeboot = devm_gpiod_get_optional(&serdev->dev, "safeboot", GPIOD_OUT_LOW);
	if (IS_ERR(safeboot)) {
		ret = PTR_ERR(safeboot);
		goto err_free_gserial;
	}

	/* Deassert reset */
	reset = devm_gpiod_get_optional(&serdev->dev, "reset", GPIOD_OUT_LOW);
	if (IS_ERR(reset)) {