lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 17 Oct 2014 10:37:14 +0100
From:	Mark Rutland <mark.rutland@....com>
To:	Marek Belisko <marek@...delico.com>
Cc:	"arnd@...db.de" <arnd@...db.de>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"robh+dt@...nel.org" <robh+dt@...nel.org>,
	Pawel Moll <Pawel.Moll@....com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	"galak@...eaurora.org" <galak@...eaurora.org>,
	"grant.likely@...aro.org" <grant.likely@...aro.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"H. Nikolaus Schaller" <hns@...delico.com>
Subject: Re: [PATCH 2/2] Documentation: devicetree: Add bindings for Wi2Wi
 w2sg0004 gps

On Thu, Oct 16, 2014 at 09:26:23PM +0100, Marek Belisko wrote:
> Signed-off-by: H. Nikolaus Schaller <hns@...delico.com>
> Signed-off-by: Marek Belisko <marek@...delico.com>
> ---
>  .../devicetree/bindings/misc/wi2wi,w2sg0004.txt    | 44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt
> 
> diff --git a/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt b/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt
> new file mode 100644
> index 0000000..e144441
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt
> @@ -0,0 +1,44 @@
> +Wi2Wi GPS module connected through UART
> +
> +Required properties:
> +- compatible: wi2wi,w2sg0004 or wi2wi,w2sg0084
> +- pinctrl: specify two states (default and monitor). One is the default (UART) mode
> +  and the other is for monitoring the RX line by an interrupt
> +- on-off-gpio: the GPIO that controls the module's on-off toggle input
> +
> +Optional properties:
> +- lna-suppy: an (optional) LNA regulator that is enabled together with the GPS receiver
> +
> +example:
> +
> +        gps_receiver: w2sg0004 {
> +                compatible = "wi2wi,w2sg0004";

I couldn't spot "wi2wi" in
Documentation/devicetree/bindings/vendor-prefixes.txt (in mainline).

Could you please add it?

> +                gpio-controller;
> +                #gpio-cells = <2>;

As far as I can see, these properties aren't necessary. This only
consumes a GPIO, it doesn't provide any.

> +
> +                pinctrl-names = "default", "monitor";
> +                pinctrl-0 = <&uart2_pins>;
> +                pinctrl-1 = <&uart2_rx_irq_pins>;
> +
> +                interrupt-parent = <&gpio5>;
> +                interrupts = <19 IRQ_TYPE_EDGE_FALLING>;  /* GPIO_147: RX - trigger on arrival of start bit */

While interrupts is a standard property, please describe above how many
you expect and what their logical function is.

The only part I'm confused about is how the link to the UART is
described. I assume I'm just ignorant of some existing pattern.

Otherwise this looks ok.

Thanks,
Mark.

> +                lna-supply = <&vsim>;	/* LNA regulator */
> +                on-off-gpio = <&gpio5 17 0>;	/* GPIO_145: trigger for turning on/off w2sg0004 */
> +
> +&pinmux {
> +
> +	uart2_pins: pinmux_uart2_pins {
> +		pinctrl-single,pins = <
> +			0x14a (PIN_INPUT | MUX_MODE0)		/* uart2_tx.uart2_rx */
> +			0x148 (PIN_OUTPUT | MUX_MODE0)		/* uart2_tx.uart2_tx */
> +		>;
> +	};
> +
> +	uart2_rx_irq_pins: pinmux_uart2_rx_irq_pins {
> +		pinctrl-single,pins = <
> +			/* switch RX to GPIO so that we can get interrupts by the start bit */
> +			0x14a (PIN_INPUT | MUX_MODE4)		/* uart2_tx.uart2_rx */
> +		>;
> +	};
> +
> +}
> -- 
> 1.9.1
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ