From patchwork Wed Dec 7 13:49:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 87109 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp323965qgi; Wed, 7 Dec 2016 05:49:28 -0800 (PST) X-Received: by 10.84.169.169 with SMTP id h38mr147685239plb.48.1481118568486; Wed, 07 Dec 2016 05:49:28 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h75si24143929pfk.290.2016.12.07.05.49.28; Wed, 07 Dec 2016 05:49:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751654AbcLGNt1 (ORCPT + 7 others); Wed, 7 Dec 2016 08:49:27 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37798 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014AbcLGNt0 (ORCPT ); Wed, 7 Dec 2016 08:49:26 -0500 Received: by mail-wm0-f50.google.com with SMTP id t79so167680278wmt.0 for ; Wed, 07 Dec 2016 05:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jDc4QfOHhC6en2i/JE2TmwodXA3h0KUUC6YnmGwH1oo=; b=jePOIbqyrGw8SjCWYF4lSlEQhNkjSfvsQrhYWM7/IivMahxZ0c7PAUw3GI+DyBdbpS IePyzaH/hnOLRfDxKaY4xXkQuhknAxKGPpR1PaxuHhogW/Po9+gy3yBim1KKd765tiuG 5OYOzSgD3kcvGwyb47GHgwlkz9VlB5qgF1XHE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jDc4QfOHhC6en2i/JE2TmwodXA3h0KUUC6YnmGwH1oo=; b=aKCwtGkdLQd7Nj1bbi4DEpTpRD0CcKbvvfAvFU1ULUq2sK+5SKMAe0zomaW6mxu4t9 85sKQmYK/uOWhordvDam0bv0nxZNZyk7JIu0W8sl+/lOUzNsdLfG4dDiAC231fKRb1fm zFtKxRSHP9uosIXCDI2aer/kxcvcj7qC11qVXlMX8PMj8m618t3fKgf8FA1XLs64uzL+ 4fffGXvBp/AGY4Od6Bx+UljAjgTYgANn1pRX/ahJLV9ypG0Bg9nWEDZYpGGRIRRuxj41 Bg5BCDGf6cBIcAuwHDXbEeM6pcyJLNsIiw7PMAXDZfsRNx2OYdCKGoxCMN90Mlx2oTLk jQlg== X-Gm-Message-State: AKaTC03BGUrRQz8R2369Gz4uv4DFXEioT01KBa7D76ksvbYRBtxIrVh1Mtawgfti6XazpFWY X-Received: by 10.25.242.75 with SMTP id d11mr10432031lfk.169.1481118564754; Wed, 07 Dec 2016 05:49:24 -0800 (PST) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m129sm4757240lfe.6.2016.12.07.05.49.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Dec 2016 05:49:24 -0800 (PST) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Linus Walleij , devicetree@vger.kernel.org, Capella Microsystems , Kevin Tsai Subject: [PATCH 1/2] iio: light: add DT bindings for Capella CM3605 Date: Wed, 7 Dec 2016 14:49:18 +0100 Message-Id: <1481118558-8016-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds device tree bindings for the Capella Microsystems CM3605 ambient light sensor and short range proximity sensor. Cc: devicetree@vger.kernel.org Cc: Capella Microsystems Cc: Kevin Tsai Signed-off-by: Linus Walleij --- .../devicetree/bindings/iio/light/cm3605.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/cm3605.txt -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/light/cm3605.txt b/Documentation/devicetree/bindings/iio/light/cm3605.txt new file mode 100644 index 000000000000..f0152559bdb9 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/cm3605.txt @@ -0,0 +1,41 @@ +Capella Microsystems CM3605 +Ambient Light and Short Distance Proximity Sensor + +The CM3605 is an entirely analog part which however require quite a bit of +software logic to interface a host operating system. + +This ALS and proximity sensor was one of the very first deployed in mobile +handsets, notably it is used in the very first Nexus One Android phone from +2010. + +Required properties: +- compatible: must be: "capella,cm3605" +- aset-gpios: GPIO line controlling the ASET line (drive low + to activate the ALS, should be flagged GPIO_ACTIVE_LOW) +- interrupts: the IRQ line (such as a GPIO) that is connected to + the POUT (proximity sensor out) line. The edge detection must + be set to IRQ_TYPE_EDGE_BOTH so as to detect movements toward + and away from the proximity sensor. +- io-channels: the ADC channel used for converting the voltage from + AOUT to a digital representation. +- io-channel-names: must be "aout" + +Optional properties: +- vdd-supply: regulator supplying VDD power to the component. +- capella,aset-resistance: the sensitivity calibration resistance, + in Ohms. Valid values are: 50000, 100000, 300000 and 600000, + as these are the resistance values that we are supplied with + calibration curves for. If not supplied, 100 kOhm will be assumed + but it is strongly recommended to supply this. + +Example: + +cm3605 { + compatible = "capella,cm3605"; + vdd-supply = <&foo_reg>; + aset-gpios = <&foo_gpio 1 GPIO_ACTIVE_LOW>; + capella,aset-resistance = <100000>; // Ohms + interrupts = <1 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&adc 0x01>; + io-channel-names = "aout"; +};