From patchwork Sun Dec 18 21:55:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 88392 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp876829qgi; Sun, 18 Dec 2016 13:56:58 -0800 (PST) X-Received: by 10.99.196.70 with SMTP id m6mr23996567pgg.118.1482098218407; Sun, 18 Dec 2016 13:56:58 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t61si16192333plb.276.2016.12.18.13.56.57; Sun, 18 Dec 2016 13:56:58 -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 S1753840AbcLRV4E (ORCPT + 7 others); Sun, 18 Dec 2016 16:56:04 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:35642 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753716AbcLRV4D (ORCPT ); Sun, 18 Dec 2016 16:56:03 -0500 Received: by mail-lf0-f52.google.com with SMTP id b14so42336487lfg.2 for ; Sun, 18 Dec 2016 13:56:02 -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=9Kmz/9qPaOxH1QRk0S+g8+gTzgzDJtcAnofbWR+qh4Q=; b=jdhOrw9Mn/IM5C4f02bOlL29lXrrQcFkWdBsWlFcLDf0PMJdLtoDJQcUvhI6nOq6mg Redx5E07urmk2IkxHbmXgzohlQT/u6h8mXTPf/jpzcgjfKXzcTDMtiPlGzoKu3JaHr8e XcLUwHlo6ircZv+QdO2VSKe+NS2sW3vcdFkKI= 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; bh=9Kmz/9qPaOxH1QRk0S+g8+gTzgzDJtcAnofbWR+qh4Q=; b=RfGLE9YCzLfgS5n18Q0b1b3cJkAzDLkzZRFaqIN4vJKXXI7AF+fhfHRM+4XmAUCcl8 9tC4D8EUiy6gLlTY/wbfrZ7BvSA/4fhwSjd+QqSBeru3uGDZCnyfEhVOu3Mi78/t4Wnb 2LKnRc2VM2+adom0Cf3IISxE7dPq6CyEBXOQOU2SCTGGgDfNHkRYix7lTyYmc1vTMwfe kpe1VNgQVwb4GBWOoMyYW+Td+AyMNA7bfeEI40LYcayA/yzxVuIC/WVkE1XLOCBy7iiy t3noKoCbYMqnFvbsY+XpD9UR6Lx/0fCBQA2ZQOQDRek4KBIIdncinKqS9MMHkNzh+oi3 +LIA== X-Gm-Message-State: AKaTC00+DkwT4zdiWD6np4Iq1PGQYR+lA7gaJ0NsIT/2NjdK+GTLrud3Xz6mfjqdmYMXZucZ X-Received: by 10.25.196.136 with SMTP id u130mr4372063lff.62.1482098161623; Sun, 18 Dec 2016 13:56:01 -0800 (PST) Received: from localhost.localdomain.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id 10sm3273339ljh.11.2016.12.18.13.56.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Dec 2016 13:56:00 -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 v2] iio: light: add DT bindings for Capella CM3605 Date: Sun, 18 Dec 2016 22:55:55 +0100 Message-Id: <1482098155-16148-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 Acked-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rename aset-resistance to aset-resistance-ohms --- .../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 diff --git a/Documentation/devicetree/bindings/iio/light/cm3605.txt b/Documentation/devicetree/bindings/iio/light/cm3605.txt new file mode 100644 index 000000000000..56331a79f9ab --- /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-ohms: 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-ohms = <100000>; + interrupts = <1 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&adc 0x01>; + io-channel-names = "aout"; +};