public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: "Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Thierry Reding" <treding@nvidia.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Maxime Ripard" <maxime.ripard@free-electrons.com>,
	"Jarkko Sakkinen" <jarkko.sakkinen@linux.intel.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, letux-kernel@openphoenux.org,
	kernel@pyra-handheld.com
Subject: Re: [RFC 2/3] misc: Add w2sg0004 (gps receiver) power control driver
Date: Wed, 7 Jun 2017 09:34:59 +0200	[thread overview]
Message-ID: <20170607073459.qg4giwqdajtmpy4n@lenoch> (raw)
In-Reply-To: <24579fa76fbf454526fddabe0b20070e46d488ba.1495363443.git.hns@goldelico.com>

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

  parent reply	other threads:[~2017-06-07  7:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 10:44 [RFC 0/3] misc: new serdev based drivers for w2sg00x4 GPS module and w2cbw003 wifi/bluetooth H. Nikolaus Schaller
     [not found] ` <cover.1495363443.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2017-05-21 10:44   ` [RFC 1/3] DTS: gta04: add serdev nodes for w2sg00x4, w2cbw etc H. Nikolaus Schaller
2017-05-23  2:26   ` [RFC 0/3] misc: new serdev based drivers for w2sg00x4 GPS module and w2cbw003 wifi/bluetooth Rob Herring
     [not found]     ` <CAL_Jsq+fmi2QwE7J8xv47ece1b+jqnOo99NghfjtocnrRvBkPg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-23  5:43       ` H. Nikolaus Schaller
2017-05-23 12:28         ` Rob Herring
2017-05-23 12:48           ` H. Nikolaus Schaller
2017-05-23 13:10             ` Rob Herring
2017-05-23 13:49               ` H. Nikolaus Schaller
2017-05-25 12:48                 ` Rob Herring
2017-06-06 18:50                   ` H. Nikolaus Schaller
2017-05-25 17:05                 ` Pavel Machek
2017-05-21 10:44 ` [RFC 2/3] misc: Add w2sg0004 (gps receiver) power control driver H. Nikolaus Schaller
     [not found]   ` <24579fa76fbf454526fddabe0b20070e46d488ba.1495363443.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2017-05-21 10:48     ` H. Nikolaus Schaller
2017-05-30 23:09     ` Rob Herring
2017-06-06 18:50       ` H. Nikolaus Schaller
2017-06-07  7:34   ` Ladislav Michl [this message]
2017-06-07 10:08     ` H. Nikolaus Schaller
2017-05-21 10:44 ` [RFC 3/3] misc: Add w2cbw003 (wifi/bluetooth) " H. Nikolaus Schaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170607073459.qg4giwqdajtmpy4n@lenoch \
    --to=ladis@linux-mips.org \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hns@goldelico.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jic23@kernel.org \
    --cc=kernel@pyra-handheld.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.com \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox