From patchwork Wed Dec 27 09:18:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 10133519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF03F6020A for ; Wed, 27 Dec 2017 09:18:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7F7A2DB4E for ; Wed, 27 Dec 2017 09:18:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CADD22DB78; Wed, 27 Dec 2017 09:18:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE94C2DB4E for ; Wed, 27 Dec 2017 09:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750947AbdL0JSc (ORCPT ); Wed, 27 Dec 2017 04:18:32 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:54590 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbdL0JSb (ORCPT ); Wed, 27 Dec 2017 04:18:31 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 037F38130B; Wed, 27 Dec 2017 10:18:28 +0100 (CET) Date: Wed, 27 Dec 2017 10:18:28 +0100 From: Pavel Machek To: robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, pali.rohar@gmail.com, sre@kernel.org, linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, patrikbachan@gmail.com, serge@hallyn.com, abcloriens@gmail.com, clayton@craftyguy.net, martijn@brixit.nl, sakari.ailus@linux.intel.com, Filip =?utf-8?Q?Matijevi=C4=87?= Subject: [PATCH] Device tree binding for Avago APDS990X light sensor Message-ID: <20171227091828.GA3307@amd> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Filip Matijević This prepares binding for light sensor used in Nokia N9. Signed-off-by: Filip Matijević Signed-off-by: Pavel machek --- Patches to convert APDS990X driver to device tree and to switch to iio are available. diff --git a/Documentation/devicetree/bindings/misc/avago-apds990x.txt b/Documentation/devicetree/bindings/misc/avago-apds990x.txt new file mode 100644 index 0000000..e038146 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/avago-apds990x.txt @@ -0,0 +1,39 @@ +Avago APDS990X driver + +Required properties: +- compatible: "avago,apds990x" +- reg: address on the I2C bus +- interrupts: external interrupt line number +- Vdd-supply: power supply for VDD +- Vled-supply: power supply for LEDA +- ga: Glass attenuation +- cf1: Clear channel factor 1 +- irf1: IR channel factor 1 +- cf2: Clear channel factor 2 +- irf2: IR channel factor 2 +- df: Device factor +- pdrive: IR current, one of APDS_IRLED_CURR_XXXmA values +- ppcount: Proximity pulse count + +Example (Nokia N9): + + als_ps@39 { + compatible = "avago,apds990x"; + reg = <0x39>; + + interrupt-parent = <&gpio3>; + interrupts = <19 10>; /* gpio_83, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW */ + + Vdd-supply = <&vaux1>; + Vled-supply = <&vbat>; + + ga = <168834>; + cf1 = <4096>; + irf1 = <7824>; + cf2 = <877>; + irf2 = <1575>; + df = <52>; + + pdrive = <0x2>; /* APDS_IRLED_CURR_25mA */ + ppcount = <5>; + };