From patchwork Tue Jan 2 12:44:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 10140497 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 08706601A1 for ; Tue, 2 Jan 2018 12:45:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E72DC28A83 for ; Tue, 2 Jan 2018 12:45:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBD4128B13; Tue, 2 Jan 2018 12:45:14 +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 60A7A28A83 for ; Tue, 2 Jan 2018 12:45:14 +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:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=k9AV32sS7E2TpPSIcBBpLxgNi7GGi0JO5KkyuxGiL5g=; b=i6QFHCtmjRsWxCY3Zd1DnksGL WHsIqyUw5E9E6z5Q54x3VMMZ3YPDXSl8drRjqJDgyCmbMNXItm4RAWAaA+aK3ieaMwZokeJiiufaP zGWWN3O3X4bKnyGJCyZZ/9HjIeEdEZMOXCFHZ5KkUtfuyz16EiMMqo23Y5mGtZR4FHENNtIitvRQN bJpb2/BLDMXo9kKfIaNqofwUAHzqCutYQNQkw1mg9P1qcphA36iUNa8AOlDrmc86ns7gMWPWy+Mvv GOltJSnnKfRMnBHR/2+hjvcK+UFZs7jWcyCXYBbVzXwQWiw04guHeCpfOmqOo6OBoW6XxcIFwMQ4T zOz0+N7bA==; 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 1eWLwO-0005q9-3N; Tue, 02 Jan 2018 12:45:12 +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 1eWLwK-0004Zv-7M for linux-arm-kernel@lists.infradead.org; Tue, 02 Jan 2018 12:45:10 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 8ACC7825B6; Tue, 2 Jan 2018 13:44:51 +0100 (CET) Date: Tue, 2 Jan 2018 13:44:51 +0100 From: Pavel Machek To: Sakari Ailus Subject: [PATCHv2] Device tree binding for Avago APDS990X light sensor Message-ID: <20180102124450.GA18659@amd> References: <20171227091828.GA3307@amd> <20171227180000.6ejpbqmr736nqx5i@kekkonen.localdomain> <20171227200147.GB16799@amd> <20171227211643.nnwtm4j6cyftlm66@kekkonen.localdomain> MIME-Version: 1.0 In-Reply-To: <20171227211643.nnwtm4j6cyftlm66@kekkonen.localdomain> 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-20180102_044508_520391_BB458189 X-CRM114-Status: GOOD ( 12.48 ) 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: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, ivo.g.dimitrov.75@gmail.com, khilman@kernel.org, tony@atomide.com, aaro.koskinen@iki.fi, sre@kernel.org, linux-kernel@vger.kernel.org, martijn@brixit.nl, Filip =?utf-8?Q?Matijevi=C4=87?= , robh+dt@kernel.org, abcloriens@gmail.com, pali.rohar@gmail.com, clayton@craftyguy.net, linux-omap@vger.kernel.org, patrikbachan@gmail.com, linux-arm-kernel , serge@hallyn.com 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 diff --git a/Documentation/devicetree/bindings/misc/avago-apds990x.txt b/Documentation/devicetree/bindings/misc/avago-apds990x.txt new file mode 100644 index 0000000..480c0b1 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/avago-apds990x.txt @@ -0,0 +1,41 @@ +Avago APDS990X driver + +https://docs.broadcom.com/docs/AV02-2867EN + +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 +- avago,ga: Glass attenuation +- avago,cf1: Clear channel factor 1 +- avago,irf1: IR channel factor 1 +- avago,cf2: Clear channel factor 2 +- avago,irf2: IR channel factor 2 +- avago,df: Device factor +- avago,pdrive: IR current, one of APDS_IRLED_CURR_XXXmA values +- avago,ppcount: Proximity pulse count + +Example (Nokia N9): + + als_ps@39 { + compatible = "avago,apds990x"; + reg = <0x39>; + + interrupt-parent = <&gpio3>; + interrupts = <19 (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_LEVEL_LOW)>; /* gpio_83 */ + + vdd-supply = <&vaux1>; + vled-supply = <&vbat>; + + avago,ga = <168834>; + avago,cf1 = <4096>; + avago,irf1 = <7824>; + avago,cf2 = <877>; + avago,irf2 = <1575>; + avago,df = <52>; + + avago,pdrive = <0x2>; /* APDS_IRLED_CURR_25mA */ + avago,ppcount = <5>; + };