From patchwork Fri Jan 25 17:50:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10781767 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06D86746 for ; Fri, 25 Jan 2019 17:51:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB2DD3031A for ; Fri, 25 Jan 2019 17:51:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D13243030A; Fri, 25 Jan 2019 17:51:00 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 75883300C5 for ; Fri, 25 Jan 2019 17:51:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729413AbfAYRu7 (ORCPT ); Fri, 25 Jan 2019 12:50:59 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39817 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729385AbfAYRu6 (ORCPT ); Fri, 25 Jan 2019 12:50:58 -0500 Received: by mail-lj1-f193.google.com with SMTP id t9-v6so9070064ljh.6; Fri, 25 Jan 2019 09:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+CYllznRYt133KTflL22y4PX2RmV6ZawSJvxIL4oFhI=; b=B3YV4XDWHgZ3WJWKjy56eilIMuCNkNAe0setxKIu7hH78elM5xmPC9Sc6n9MxnGO9D aIu+LLW4aPwsP5n2oB3Fh1EtgE1m0IHO7N2Xj3q1MhjrtnmjxCqHcpaA/NnP10mDNIWB niLglWg+YDTQl8gCMvO8mxN1+yD8KLFp+iCQNeC3uq6+FAiRVQTBXYX7j1CTGjeAgMRJ 3VRZvevDHvvAtoTZe7aIJ5T+XIb+/7SMbGu2hZzZ3aU5is1mbP3HW3/bDzu2qHhZb+r6 2s6e6AzTfevp3ZZ3UpoDa3B/BoCgORuTsLohhbLqEpQn/WTeHNPH3u+MDLvPPXv03A3B pckw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+CYllznRYt133KTflL22y4PX2RmV6ZawSJvxIL4oFhI=; b=R7v6l9kd7NJhw1n084nlfqbAbLwB6m2n0oJ/9z6iDj26c3X985K1dCR9X82zAPb/k1 bKAE/H71dULDvWDlxj6WBOrbhijBo5QpRGlfoaFRwlzr2+1ah/5K06pUJYxlE+B9NXxx jvLSFsYi77ulgxaQVmEW9C13pYoBaoNScYP/8U96nbIKW1F126PrUQyRlFYoyp6D3vbq PO+EOCBUWCdqL/RC1l1v6k2AAOUtEJpwbLxlTmJ5lKFlPLH8fpGtKpJd7g5nSpBEPhTE ezdFtN/4bcItImW7SiVEyvatVRblWELbR0zqFdlKPaRB+lShPYmEguJypOvFPub4RgoI h5Uw== X-Gm-Message-State: AJcUukeeQAhh+4ObLM7NXfEw5zjyADp3KuaKlSrjOc6LJKG8k76qlglM 2h7tepid9kX4D3PHfcxXYrI= X-Google-Smtp-Source: ALg8bN4ZoDLupjfEqshy8up98rOi636cGtoFBdatp7hFnV7CO27XwPFdkXdw5MOeuLLkp2/uT4xhAw== X-Received: by 2002:a2e:8951:: with SMTP id b17-v6mr10570925ljk.142.1548438655548; Fri, 25 Jan 2019 09:50:55 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:6921:1f1d:2918:d853]) by smtp.googlemail.com with ESMTPSA id l21-v6sm1575606ljj.48.2019.01.25.09.50.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 09:50:54 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, mchehab+samsung@kernel.org, colyli@suse.de, ckeepax@opensource.wolfsonmicro.com, andrew.smirnov@gmail.com, arnd@arndb.de, xiaotong.lu@spreadtrum.com, xc-racer2@live.ca, pawel.mikolaj.chmiel@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 4/4] dt-bindings: input: Add documentation for gp2a sensor Date: Fri, 25 Jan 2019 18:50:45 +0100 Message-Id: <20190125175045.22576-5-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125175045.22576-1-pawel.mikolaj.chmiel@gmail.com> References: <20190125175045.22576-1-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jonathan Bakker This commit adds documentation for Sharp GP2AP002A00F. It's Proximity/Opto Sensor connected over i2c. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel --- .../bindings/input/sharp,gp2ap002a00f.txt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/sharp,gp2ap002a00f.txt diff --git a/Documentation/devicetree/bindings/input/sharp,gp2ap002a00f.txt b/Documentation/devicetree/bindings/input/sharp,gp2ap002a00f.txt new file mode 100644 index 000000000000..c524eb7d3d60 --- /dev/null +++ b/Documentation/devicetree/bindings/input/sharp,gp2ap002a00f.txt @@ -0,0 +1,29 @@ +* Sharp GP2AP002A00F I2C Proximity/Opto Sensor + +Required properties: +- compatible : Should be "sharp,gp2ap002a00f" +- reg : The I2C address of the sensor +- vout-gpio : The gpio connected to the vout pin +- interrupt-parent : should be the phandle for the interrupt controller +- interrupts : Interrupt mapping for GPIO IRQ, it should by configured with + flags IRQ_TYPE_EDGE_BOTH + +Optional properties: +- wakeup : If the device is capable of waking up the system +- io-channels : Phandle to an ADC channel connected to the light sensor +- io-channel-names = "light"; +- poll-interval : Poll interval time in milliseconds, default 500ms +- light-adc-max : Maximum light value reported, default 4096 +- light-adc-fuzz : Fuzz value for reported light value, default 80 + +Example: + +gp2a@44 { + compatible = "sharp,gp2ap002a00f"; + reg = <0x44>; + vout-gpio = <&gph0 2 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&gph0>; + interrupts = <2 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&adc 9>; + io-channel-names = "light"; +};