From patchwork Mon Aug 15 18:37: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: 73927 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1583593qga; Mon, 15 Aug 2016 11:38:06 -0700 (PDT) X-Received: by 10.98.35.145 with SMTP id q17mr56604746pfj.42.1471286286262; Mon, 15 Aug 2016 11:38:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zr3si27684750pac.131.2016.08.15.11.38.06; Mon, 15 Aug 2016 11:38: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 S1752837AbcHOSiF (ORCPT + 7 others); Mon, 15 Aug 2016 14:38:05 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35778 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752842AbcHOSiE (ORCPT ); Mon, 15 Aug 2016 14:38:04 -0400 Received: by mail-wm0-f48.google.com with SMTP id f65so103341219wmi.0 for ; Mon, 15 Aug 2016 11:38: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=jVKMph9Hf388MYVBJk4IO53vcrXHXoCvGMcVdzphmxM=; b=cnEzQDmJwvApgM/3ahmdvIzzw7lMjEQQ8LI/XeofXwsrdN2j/YOMTMKJw5NkgD1+I1 xmy34xuvfTZ3dKZdPb7VIYR5fAJDMk+DYB702INaXunhA44zWhQeKae9Tl88WmySykLU kOE/U030FOFkEFwb+EBwPUSRea5Kd8gA7q4/s= 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=jVKMph9Hf388MYVBJk4IO53vcrXHXoCvGMcVdzphmxM=; b=c7/GH8uwSs28zQDTaRLihUJIpUjuPoiBM+5TZOcjOu0wxEmoI9tg8rvGAYZl/eG5PM pLKhgVUziy+qVcvi8cScFW9ltyhrupFtlzp4H09+SLOre9eufmY4jP23WPYczArFDZBW uiR53y1j7GJMDTkdhtwSoaIRifoZcfjj6IOIwzenF+fvJ6pvRMi+x9m0hkJJsl1W8TOq PjIcDOwZUVPiN+hpIZBsEhau9wFcW3br+tOKmTKmC/tWiMuhRSzmzcp9caQe8UO1muLM jv5YyVQs+MKbJ0Xy6yG0RAeZf6tJc6pTNSVWITUEC8+KwzlnS1Llo9/SVHk7/1ZfMYC/ hc5A== X-Gm-Message-State: AEkoout06+WjzsFv3U27wNifkbcO4Yns9dPTYi+GtK3bNgYnQujD1jRPPsNsX+F3S50r6tHK X-Received: by 10.25.15.98 with SMTP id e95mr5029368lfi.55.1471286282578; Mon, 15 Aug 2016 11:38:02 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id f64sm3555357lfi.36.2016.08.15.11.38.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Aug 2016 11:38:01 -0700 (PDT) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 1/2] iio: gyro: Add MPU-3050 device tree bindings Date: Mon, 15 Aug 2016 20:37:55 +0200 Message-Id: <1471286275-25024-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 Signed-off-by: Linus Walleij --- .../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>; + }; + }; +};