From patchwork Thu Apr 14 08:48:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 65781 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp472477qge; Thu, 14 Apr 2016 01:50:29 -0700 (PDT) X-Received: by 10.98.71.203 with SMTP id p72mr19347600pfi.165.1460623829032; Thu, 14 Apr 2016 01:50:29 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id yp3si6630895pac.120.2016.04.14.01.50.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Apr 2016 01:50:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aqcxo-0008H6-D6; Thu, 14 Apr 2016 08:49:24 +0000 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aqcxX-0007wh-3S for linux-arm-kernel@lists.infradead.org; Thu, 14 Apr 2016 08:49:08 +0000 Received: by mail-lf0-x234.google.com with SMTP id e190so100758759lfe.0 for ; Thu, 14 Apr 2016 01:48: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=HQVpdh33P2sjvxkywLfLIMlvTDjyWILZ+n6p44kJ5Q4=; b=Odh6vcB8Drm04PcA8CLQCeO0ONM3zwcyEh3hWL2UCavzoKvunXJfBP/i+ireJY73Vm /wUuUC5gZW14NtGC0FIy4rXK+oqmRfHg1P9BWBpaDBMYI0NQWOVEWvP/VS5Jtzpws6r6 qF2akzDHixuR1KFTmxeUSbPJbaMSaNQSyJuE8= 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=HQVpdh33P2sjvxkywLfLIMlvTDjyWILZ+n6p44kJ5Q4=; b=ATNPG9W29rhzRrqqwu7Eo7YrNJJHN91jhwrz0zyzD0FPMNQFrZZdzyTe3/ox5Q1vzM UOTmSSM1YMVHHuBELAmNEjr67DCkWjWy91jm1eEbzKPaDClWQDZooWaVu43pBAKZz7b6 OB0lPyaSEThYt2J5lxanpPtfqOT8kjpE0D3WfOq8SEd2pOF/qxoZ4bXdw2VrS4ZXWfTT je6/HzC9ORc4Bar68ZQVendAYDW911r/NhXLSFPMnMu8eit/VO9anKbaZqOYBuQsmdYG PXupUndAwwYxf6QOnNC9ZEbhtEYfuRYea1UKmTQBGFrP2tHZM8e7+PJp6bDxkz2Qa1mc cAyA== X-Gm-Message-State: AOPr4FXa4sIYDI2sgIRAMxJCyQK/qe9dFWQ4XT93ucV3JyUFUdrn56QXJwQqYVGvxlqov05b X-Received: by 10.25.163.211 with SMTP id m202mr2833176lfe.73.1460623725046; Thu, 14 Apr 2016 01:48:45 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id mz2sm6775730lbb.18.2016.04.14.01.48.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Apr 2016 01:48:44 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] ARM: dts: ux500: configure the accelerometers open drain Date: Thu, 14 Apr 2016 10:48:40 +0200 Message-Id: <1460623720-8965-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160414_014907_686879_D424D77D X-CRM114-Status: GOOD ( 13.99 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:234 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-iio@vger.kernel.org, Linus Walleij , Jonathan Cameron MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Configure the two accelerometers sharing GPIO line 82 as: - Open drain so that they can share the same interrupt line. Configure the corresponding interrupt pin: - Trigger on the falling edge since open drain implies that we do not actively drive the line high, but we will actively drive it low to generate interrupts and then it moves from high to low i.e. a falling edge. - Pulled up so the line will be biased to high unless an IRQ is active on any device on the line, and thus it goes high again after the interrupt is deasserted. Cc: linux-iio@vger.kernel.org Cc: Jonathan Cameron Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Switch to using the drive-mode-open-drain; setting --- arch/arm/boot/dts/ste-href-tvk1281618.dtsi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) -- 2.4.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi index 55f9d0cc90f3..aec816c8ecb6 100644 --- a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi +++ b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi @@ -93,14 +93,15 @@ /* Accelerometer */ compatible = "st,lsm303dlh-accel"; st,drdy-int-pin = <1>; + drive-open-drain; reg = <0x18>; vdd-supply = <&ab8500_ldo_aux1_reg>; vddio-supply = <&db8500_vsmps2_reg>; pinctrl-names = "default"; pinctrl-0 = <&accel_tvk_mode>; interrupt-parent = <&gpio2>; - interrupts = <18 IRQ_TYPE_EDGE_RISING>, - <19 IRQ_TYPE_EDGE_RISING>; + interrupts = <18 IRQ_TYPE_EDGE_FALLING>, + <19 IRQ_TYPE_EDGE_FALLING>; }; lsm303dlh@1e { /* @@ -118,14 +119,15 @@ /* Accelerometer */ compatible = "st,lis331dl-accel"; st,drdy-int-pin = <1>; + drive-open-drain; reg = <0x1c>; vdd-supply = <&ab8500_ldo_aux1_reg>; vddio-supply = <&db8500_vsmps2_reg>; pinctrl-names = "default"; pinctrl-0 = <&accel_tvk_mode>; interrupt-parent = <&gpio2>; - interrupts = <18 IRQ_TYPE_EDGE_RISING>, - <19 IRQ_TYPE_EDGE_RISING>; + interrupts = <18 IRQ_TYPE_EDGE_FALLING>, + <19 IRQ_TYPE_EDGE_FALLING>; }; ak8974@0f { /* Magnetometer */ @@ -216,7 +218,7 @@ /* Accelerometer interrupt lines 1 & 2 */ tvk_cfg { pins = "GPIO82_C1", "GPIO83_D3"; - ste,config = <&gpio_in_pd>; + ste,config = <&gpio_in_pu>; }; }; };