From patchwork Tue Oct 25 14:15:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 79185 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp3138431qge; Tue, 25 Oct 2016 07:16:06 -0700 (PDT) X-Received: by 10.98.88.5 with SMTP id m5mr4087950pfb.9.1477404966420; Tue, 25 Oct 2016 07:16:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si20981692pgg.154.2016.10.25.07.16.06; Tue, 25 Oct 2016 07:16:06 -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 S1754181AbcJYOQF (ORCPT + 7 others); Tue, 25 Oct 2016 10:16:05 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:37765 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754097AbcJYOQE (ORCPT ); Tue, 25 Oct 2016 10:16:04 -0400 Received: by mail-lf0-f54.google.com with SMTP id m193so15323361lfm.4 for ; Tue, 25 Oct 2016 07:16:03 -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=zsf8JX6bQK8yPZPbqV5ouletImmf4ddxaj6yT+C2QJo=; b=ZoymQ5kUlFHrHIHgo1DWgT0/C1bXj02u49gHMr98hMNZBxicNlaWb+BJCd2fdu1NLB Jm0IgzrHEoGZ0dG/DL1zuCNgALDgfB3LExErVGH/kFJAyy7azmn05iv+Dt2mxi9/E4Sm lbtSjwg00xx3aeD9KAvkLqibbu3gEAl/sOHLc= 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=zsf8JX6bQK8yPZPbqV5ouletImmf4ddxaj6yT+C2QJo=; b=ECW7fsj2Pz32nOYnGDXspoRKBobT0ptmMw+dTbP5OIjiDpcMvXBnr+l7leXSx+NdmC 4fPyJIZk42TTX/mQUYmcWmHbd4Rie1oM/xqUhmiD+xcCi5vEoGHbWX9c2a4JzmaSj+QL fX8Ajk25wG+lnsQlRQqX7RsrBLREv2F3mkZ2xvg9UXVQqtFlwz4kYEIwAIhLPYzvugSF PfYwp0gBgd4Y0j+UBPoCxKu/bLXGDsjkPPIFj1qDL9LRs/tJWjaTJMvI3M5twV3ToVOu BH2AnW+qovkjdysJGVVCPMO7rlrP+GsaHzA8RThzOc3Dqtwp197kKX9Vxo8mcTBtqSPL YgSQ== X-Gm-Message-State: ABUngvdejm6Uwicq6l13EGLrhfculvJ0PzS7EnPSr8W6BM9hWN4ntUtUQYqxHa6BClPae02X X-Received: by 10.25.25.84 with SMTP id 81mr9102838lfz.26.1477404962194; Tue, 25 Oct 2016 07:16:02 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 35sm3937349lfp.5.2016.10.25.07.16.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 07:16:01 -0700 (PDT) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Linus Walleij , devicetree@vger.kernel.org, Peter Rosin Subject: [PATCH 1/2 v6] iio: gyro: Add MPU-3050 device tree bindings Date: Tue, 25 Oct 2016 16:15:53 +0200 Message-Id: <1477404954-3942-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 Acked-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v5->v6: - No changes, just reposting. ChangeLog v4->v5: - No changes, just reposting. ChangeLog v3->v4: - No changes, just reposting. If we agree on these bindings and since the dependent I2C bindings are merged, this patch should be merge material now I guess. ChangeLog v2->v3: - Augmented device tree bindings to reflect Peter Rosins now merged I2C gate bindings. ChangeLog v1->v2: - Not yet convered to use i2c-gate as I'm waiting for that patch set to stabilize. --- .../bindings/iio/gyroscope/invensense,mpu3050.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 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..b0d3b59966bc --- /dev/null +++ b/Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.txt @@ -0,0 +1,46 @@ +Invensense MPU-3050 Gyroscope device tree bindings + +Required properties: + - compatible : should be "invensense,mpu3050" + - reg : the I2C address of the sensor + +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 gate node. For details see: i2c/i2c-gate.txt + +Example: + +mpu3050@68 { + compatible = "invensense,mpu3050"; + reg = <0x68>; + interrupt-parent = <&foo>; + interrupts = <12 IRQ_TYPE_EDGE_FALLING>; + vdd-supply = <&bar>; + vlogic-supply = <&baz>; + + /* External I2C interface */ + i2c-gate { + #address-cells = <1>; + #size-cells = <0>; + + fnord@18 { + compatible = "fnord"; + reg = <0x18>; + interrupt-parent = <&foo>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + }; + }; +};