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: 10133523 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 EE5766020A for ; Wed, 27 Dec 2017 09:18:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2B482DB5B for ; Wed, 27 Dec 2017 09:18:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6D302DB71; Wed, 27 Dec 2017 09:18:54 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6D9382DB5B for ; Wed, 27 Dec 2017 09:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=cATtnzUyVQ7i1UDzo8btGDNV0zpCSNlZCwAufaguIUY=; b=Lm/ wg2xaEbp6gKE71ZUS7Et8eEmcZs4k70AQ9TIrI1jLZE8wW3CyCBb8nYCi9f2rGzwg3ijVgh7qo+HT HVk5ATWa/sVaIM/+yLDGTarILPfjCyR5uS8SmSUgz7ZkatqsaGrEC0Pwfb3Q+pBlCwe9ZPg/MXXFR b8feX0LVjYB7NBnvRq4hQroSQw+j0o8FBXrUbDMq8v5iwHLPiWA1O3JwvsiWQgAtHI6oSOTPmykJJ reh8BlGKpsHDNHlQTKgiew9kSqtfll1+ypfJE92Jn0ebfkVyIq/SZ+7qAKWHL+ibLXNKNt/3xgZGI k0Z/yGWjniieTXONg8QnVGCnDM48KRw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eU7rO-0008DD-V2; Wed, 27 Dec 2017 09:18:50 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eU7rJ-0008BA-Vw for linux-arm-kernel@lists.infradead.org; Wed, 27 Dec 2017 09:18:48 +0000 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 User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171227_011846_283936_7720A32A X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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>; + };