From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751522AbdFFSuq (ORCPT ); Tue, 6 Jun 2017 14:50:46 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]:11561 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751431AbdFFSuh (ORCPT ); Tue, 6 Jun 2017 14:50:37 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcecEarQROEYabkiUo6mSAGQ+qKIDcoID097Q== X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [RFC 2/3] misc: Add w2sg0004 (gps receiver) power control driver From: "H. Nikolaus Schaller" In-Reply-To: <20170530230903.jrg6ui5xiqfhqyfg@rob-hp-laptop> Date: Tue, 6 Jun 2017 20:50:28 +0200 Cc: Mark Rutland , =?utf-8?Q?Beno=C3=AEt_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 Message-Id: <0A8889BB-8238-42C9-9F35-879F0677B403@goldelico.com> References: <24579fa76fbf454526fddabe0b20070e46d488ba.1495363443.git.hns@goldelico.com> <20170530230903.jrg6ui5xiqfhqyfg@rob-hp-laptop> To: Rob Herring X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v56IqxqW031741 > Am 31.05.2017 um 01:09 schrieb Rob Herring : > > 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. >> >> Signed-off-by: H. Nikolaus Schaller >> --- >> .../devicetree/bindings/misc/wi2wi,w2sg0004.txt | 20 + >> .../devicetree/bindings/vendor-prefixes.txt | 1 + > > Please split binding patches. Yes, will do. We thought that it gives better understanding if kept together with the code in a single patch for this RFC. > >> drivers/misc/Kconfig | 16 + >> drivers/misc/Makefile | 1 + >> drivers/misc/w2sg0004.c | 646 +++++++++++++++++++++ >> include/linux/w2sg0004.h | 27 + >> 6 files changed, 711 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/misc/wi2wi,w2sg0004.txt >> create mode 100644 drivers/misc/w2sg0004.c >> create mode 100644 include/linux/w2sg0004.h >> >> 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 > > Reformat to one per line. Ok. > >> +- on-off-gpio: the GPIO that controls the module's on-off toggle input > > Does enable-gpios or powerdown-gpios work as those are semi-standard > names. Also, need to state the active state. Ok. > >> + >> +Optional properties: >> +- lna-suppy: an (optional) LNA regulator that is enabled together with the GPS receiver > > typo tnx :) > >> + >> +Example: >> + >> +&uart2 { >> + gps: w2sg0004 { > > w2sg0004: gps { > > The node name should be generic. The label can be whatever you like. Ok. That comes from thoughtless copying very old stuff (I think we started with trying to get this chip DT based around 3.14 kernels...) > >> + compatible = "wi2wi,w2sg0004"; >> + lna-supply = <&vsim>; /* LNA regulator */ >> + on-off-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>; /* GPIO_145: trigger for turning on/off w2sg0004 */ >> + }; >> +}; >> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt >> index c03d20140366..c56b3181b266 100644 >> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt >> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt >> @@ -345,6 +345,7 @@ voipac Voipac Technologies s.r.o. >> wd Western Digital Corp. >> wetek WeTek Electronics, limited. >> wexler Wexler >> +wi2wi Wi2Wi, Inc. >> winbond Winbond Electronics corp. >> winstar Winstar Display Corp. >> wlf Wolfson Microelectronics