From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751032AbdE3XJH (ORCPT ); Tue, 30 May 2017 19:09:07 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:34393 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbdE3XJF (ORCPT ); Tue, 30 May 2017 19:09:05 -0400 Date: Tue, 30 May 2017 18:09:03 -0500 From: Rob Herring To: "H. Nikolaus Schaller" Cc: Mark Rutland , =?iso-8859-1?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: <20170530230903.jrg6ui5xiqfhqyfg@rob-hp-laptop> 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 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. > 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. > +- 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. > + > +Optional properties: > +- lna-suppy: an (optional) LNA regulator that is enabled together with the GPS receiver typo > + > +Example: > + > +&uart2 { > + gps: w2sg0004 { w2sg0004: gps { The node name should be generic. The label can be whatever you like. > + 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