From patchwork Thu Aug 25 13:16:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 74686 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp836002qga; Thu, 25 Aug 2016 06:16:49 -0700 (PDT) X-Received: by 10.98.88.131 with SMTP id m125mr15910010pfb.63.1472131009261; Thu, 25 Aug 2016 06:16:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b72si15573253pfd.24.2016.08.25.06.16.48; Thu, 25 Aug 2016 06:16:49 -0700 (PDT) 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 S1753877AbcHYNQr (ORCPT + 7 others); Thu, 25 Aug 2016 09:16:47 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:34995 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754479AbcHYNQr (ORCPT ); Thu, 25 Aug 2016 09:16:47 -0400 Received: by mail-lf0-f54.google.com with SMTP id f93so34412170lfi.2 for ; Thu, 25 Aug 2016 06:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=qOTWGVphAxMyEkRTGo+c5jdgFmFiSRJ8jsN6JJXPixI=; b=AHattAPkCPZYFcAsnAXznfPwdycqO47jsGqgOjX526fzF6gW/GYfQdMB+1sBXHanc8 3uIgCC6p1HjeTjPjBraD/10FxoEsfoiPTx9Ij64GnmtkncgWfs6dWUiWpJCzQu8bf5CQ IQEH575ENNjGLSCaV28aopNb4jTg6KZSBwUnM= 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=qOTWGVphAxMyEkRTGo+c5jdgFmFiSRJ8jsN6JJXPixI=; b=ehaijUKSjliwDPhsA6cQV97VzPZHBNIREOIdTadeNc4rmyQA5sHUCa+yjuA2s7K2yC FAipgooKTq+YCeabwd7zNidJWcUnz8bvjQx7OuQIcc7Dl/kDzQ+CmoOGeAtapt3/PES3 338wcOU/UWOOmr03cOhqw8Li1UCe+6g3XF0N4Qu3NEJ+dL+Z1keQg56O+Z6Vx9y0p6M3 zWBgu4h3pnH8kabKZlybv1sZZylF/SxbaNjVvWBNY4jzeZXjTCNClvWtKqZhYTGq9Xvo 3a5IKBbkIuo59P9o2/6Zn56kP9rL8VPTIHqrdQwdoBOUwPmUnS71zy4QrQhFuP2qQCN8 7mVA== X-Gm-Message-State: AEkoout9qFCWVTtFHaqCHIsV7ykLKAvwCEtLBWmTnukOu0rVUQ1G4Lbl+ntyC3fNEciZMiGV X-Received: by 10.46.5.9 with SMTP id 9mr2489809ljf.17.1472131004921; Thu, 25 Aug 2016 06:16:44 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id h68sm3032082ljh.38.2016.08.25.06.16.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Aug 2016 06:16:44 -0700 (PDT) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org, Crestez Dan Leonard Cc: Linus Walleij , devicetree@vger.kernel.org, Peter Rosin Subject: [PATCH 1/2 v2] iio: gyro: Add MPU-3050 device tree bindings Date: Thu, 25 Aug 2016 15:16:36 +0200 Message-Id: <1472130997-27198-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 MPU-3050 gyroscope. Since it is the first set of bindings for a gyroscope, the folder for it is also created. Cc: devicetree@vger.kernel.org Cc: Peter Rosin Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Not yet convered to use i2c-gate as I'm waiting for that patch set to stabilize. - No changes, just reposting to keep the series together. --- .../bindings/iio/gyroscope/invensense,mpu3050.txt | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.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/gyroscope/invensense,mpu3050.txt b/Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.txt new file mode 100644 index 000000000000..e17231a5f4b5 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.txt @@ -0,0 +1,54 @@ +Invensense MPU-3050 Gyroscope device tree bindings + +Required properties: + - compatible : should be "invensense,mpu3050" + - reg : the I2C address of the sensor + - #address-cells : should be <1>, used to indicate the optional + I2C mux node + - #size-cells : should be <0> + +Optional properties: + - interrupt-parent : should be the phandle for the interrupt controller + - interrupts : interrupt mapping for the trigger interrupt from the + internal oscillator. The following IRQ modes are supported: + IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_HIGH and + IRQ_TYPE_LEVEL_LOW. The driver should detect and configure the hardware + for the desired interrupt type. + - vdd-supply : supply regulator for the main power voltage. + - vlogic-supply : supply regulator for the signal voltage. + - mount-matrix : see iio/mount-matrix.txt + +Optional subnodes: + - The MPU-3050 will pass through and forward the I2C signals from the + incoming I2C bus, alternatively drive traffic to a slave device (usually + an accelerometer) on its own initiative. Therefore is supports a subnode + i2c master node. This node is like any I2C master and should contain: + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + +Example: + +mpu3050@68 { + compatible = "invensense,mpu3050"; + reg = <0x68>; + #address-cells = <1>; + #size-cells = <0>; + interrupt-parent = <&foo>; + interrupts = <12 IRQ_TYPE_EDGE_FALLING>; + vdd-supply = <&bar>; + vlogic-supply = <&baz>; + + /* External I2C interface */ + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + fnord@18 { + compatible = "fnord"; + reg = <0x18>; + interrupt-parent = <&foo>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + }; + }; +};