lkml.org 
[lkml]   [2017]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 2/3] misc: Add w2sg0004 (gps receiver) power control driver
Dear Nikolaus,

On Sun, May 21, 2017 at 12:44:03PM +0200, H. Nikolaus Schaller wrote:
> Add driver for Wi2Wi W2SG0004/84 GPS module connected through uart.
>
> Use serdev API hooks to monitor and forward the UART traffic to /dev/BTn
> and turn on/off the module. It also detects if the module is turned on (sends data)
> but should be off, e.g. if it was already turned on during boot or power-on-reset.
>
> Additionally, rfkill block/unblock can be used to control an external LNA
> (and power down the module if not needed).
>
> The driver concept is based on code developed by NeilBrown <neilb@suse.de>
> but simplified and adapted to use the new serdev API introduced in 4.11.
[snip]
> diff --git a/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt b/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt
> new file mode 100644
> index 000000000000..b7125c7a598c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt
> @@ -0,0 +1,20 @@
> +Wi2Wi GPS module connected through UART
> +
> +Should be a subnode of the SoC UART it is connected to (serdev).
> +
> +Required properties:
> +- compatible: wi2wi,w2sg0004 or wi2wi,w2sg0084
> +- 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:
> +
> +&uart2 {
> + gps: w2sg0004 {
> + compatible = "wi2wi,w2sg0004";
> + lna-supply = <&vsim>; /* LNA regulator */
> + on-off-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>; /* GPIO_145: trigger for turning on/off w2sg0004 */
> + };
> +};

Here it seems is nothing specific to GPS receiver in this driver and
basically UART connected GSM modules could benefit from such functionality
too - as they need power supply, had reset and ignition pin and often
status pin. See for example:
http://simcom.ee/documents/SIM5300E/SIM5300E_Hardware_Design_V1.08.pdf
page 14 or
http://www.robotshop.com/media/files/pdf/datasheet-gsm-tc35.pdf
page 19 for block diagrams.
So I wonder if you would accept making this driver a bit more generic
to cover also GSM modems use case.

Best regards,
ladis

\
 
 \ /
  Last update: 2017-06-12 01:00    [W:0.394 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site