From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbdFGHfE (ORCPT ); Wed, 7 Jun 2017 03:35:04 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:51878 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751003AbdFGHfC (ORCPT ); Wed, 7 Jun 2017 03:35:02 -0400 Date: Wed, 7 Jun 2017 09:34:59 +0200 From: Ladislav Michl To: "H. Nikolaus Schaller" Cc: Rob Herring , Mark Rutland , =?iso-8859-2?Q?Beno=EEt?= Cousson , Tony Lindgren , Russell King , Thierry Reding , Jonathan Cameron , Maxime Ripard , Jarkko Sakkinen , 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 Message-ID: <20170607073459.qg4giwqdajtmpy4n@lenoch> References: <24579fa76fbf454526fddabe0b20070e46d488ba.1495363443.git.hns@goldelico.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24579fa76fbf454526fddabe0b20070e46d488ba.1495363443.git.hns@goldelico.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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