From patchwork Tue Apr 12 13:05:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 65614 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1909724qge; Tue, 12 Apr 2016 06:07:29 -0700 (PDT) X-Received: by 10.98.89.22 with SMTP id n22mr4484667pfb.55.1460466449924; Tue, 12 Apr 2016 06:07:29 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id co4si10239090pad.101.2016.04.12.06.07.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Apr 2016 06:07: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 1apy1I-0001w0-DQ; Tue, 12 Apr 2016 13:06:16 +0000 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1apy1D-0001pe-DA for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2016 13:06:12 +0000 Received: by mail-lf0-x22d.google.com with SMTP id j11so24159668lfb.1 for ; Tue, 12 Apr 2016 06:05:50 -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=getAnGmP49wwXB+Jgf/J18Cyf23C0RfMeubsVAi5g54=; b=NPAjd9lOM1WWpy/+DkvEYmhabXA4loAOlrOHrNDKIt7KjVTiw+ZVqZaKnZoX4KZo/F skNPtmDRCoZmjTNWQTwa0+idiahaKROEvaw8UylBou5ESOejBp1buaDdSAv7WmV1ItKA i4BQFOkfLMdbxXpWWXtj6FNadNHHtgOallXUg= 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=getAnGmP49wwXB+Jgf/J18Cyf23C0RfMeubsVAi5g54=; b=RsZ8mtnkXUn8tXy974tVzhwu5CRvSov0olFIQzFbFYYOAa21CDSD8Nlt7bzZeD6tXS 2EUwAjthxtplAOKY1oFSDQejSEZO1L02JcMkWk/FHHZp3LjKh6vpj/D4aI9T/iMReJdy brZmdpGDnGJWvtn259kpndwr8BhzqX0XCwwvmmJvwr+2n9uMiD8w+qTyhVCVd2Fe7ojb Ut0My5ZHgVCRvcJCnOxWyZ95ocQhwcXILUpyzPZKE0p/qHnyq4Uw14mRggWTG/bpBXdo /PCC765/8m7OYyJei/KbyFABOZ/h9ztkUO5ZpvzY91bepBptjTiulFODKZjXJhUFx0UO czyQ== X-Gm-Message-State: AOPr4FXciJ49jukiztRIUocnORKJRALis03J8KnvLMQHhw6Wwmni1/ggvZrHW3syaqT4F5Ld X-Received: by 10.112.144.202 with SMTP id so10mr1359815lbb.108.1460466349222; Tue, 12 Apr 2016 06:05:49 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id i204sm5353711lfg.47.2016.04.12.06.05.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Apr 2016 06:05:48 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: dts: ux500: configure the accelerometers open drain Date: Tue, 12 Apr 2016 15:05:44 +0200 Message-Id: <1460466344-17516-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-20160412_060611_711372_5C07A07F X-CRM114-Status: GOOD ( 14.39 ) 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:22d 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 --- 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..4e94a4197b18 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>; + int-pin-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>; + int-pin-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>; }; }; };