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: 10140493 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 32C88601A1 for ; Tue, 2 Jan 2018 12:45:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BF4B28AC2 for ; Tue, 2 Jan 2018 12:45:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E92228B2A; Tue, 2 Jan 2018 12:45:11 +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 0F50C28AC2 for ; Tue, 2 Jan 2018 12:45:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbeABMoz (ORCPT ); Tue, 2 Jan 2018 07:44:55 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:39463 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750736AbeABMoy (ORCPT ); Tue, 2 Jan 2018 07:44:54 -0500 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 Cc: 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, Filip =?utf-8?Q?Matijevi=C4=87?= 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 Content-Disposition: inline In-Reply-To: <20171227211643.nnwtm4j6cyftlm66@kekkonen.localdomain> 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 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>; + };