From patchwork Fri Jul 25 10:18:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 34272 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8B6D2235AB for ; Fri, 25 Jul 2014 10:20:33 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id m1sf24608873oag.3 for ; Fri, 25 Jul 2014 03:20:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=IHf+wAKw4aBLvBrlmNOPkbagnUBu9IMuOVFgfreL/3E=; b=gdM+H6jaGTj7utduqXcmbcImr26ai8d4+M2ebWV+esuWTWinT2PBVSS9XLg3xlr4GR W5nHA3XkfKEUr8PIoydqfD/aj46IVHoQK8H3ecSF+NRdtiPdeUqGrWV0ujq8xuepMijC xsd6TwV2Xrt3Wa9MpfaCiTMlHUoh6tK5N8QCoBKy2GSQEAm+lZ5J6Z1HqMppTRI07QKf 0tldbTmm2IBO4YujEePdTlWVIVMdgCw8rFUAPXs7Z/O/JzBANxqclDni+NUXA+rBqL65 EF3sDL3YLEdCtHQiyVN+i3Py1J/Ti4HwI9vXc9y4dEB2qVpQqD8rOTNBUYxfs3wK4ywp YWug== X-Gm-Message-State: ALoCoQk3QomnGkuiwT5jhR8tRJf7xUbczwgYcEvN5YQb5LDcQXLQNKG8/p1+sO/lmaTJnCxluJGU X-Received: by 10.182.112.202 with SMTP id is10mr7687954obb.47.1406283633076; Fri, 25 Jul 2014 03:20:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.233 with SMTP id j96ls1208258qgd.80.gmail; Fri, 25 Jul 2014 03:20:32 -0700 (PDT) X-Received: by 10.221.47.9 with SMTP id uq9mr781339vcb.48.1406283632924; Fri, 25 Jul 2014 03:20:32 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id xq7si7068679veb.103.2014.07.25.03.20.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jul 2014 03:20:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so6924499vcb.29 for ; Fri, 25 Jul 2014 03:20:32 -0700 (PDT) X-Received: by 10.52.120.38 with SMTP id kz6mr91950vdb.86.1406283632609; Fri, 25 Jul 2014 03:20:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp26275vcb; Fri, 25 Jul 2014 03:20:32 -0700 (PDT) X-Received: by 10.70.45.97 with SMTP id l1mr1849304pdm.148.1406283631730; Fri, 25 Jul 2014 03:20:31 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id rl10si8681656pbc.161.2014.07.25.03.20.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jul 2014 03:20:31 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1XAcaz-0002e3-NS; Fri, 25 Jul 2014 10:19:25 +0000 Received: from mail-lb0-f171.google.com ([209.85.217.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XAcap-0002M9-SB for linux-arm-kernel@lists.infradead.org; Fri, 25 Jul 2014 10:19:16 +0000 Received: by mail-lb0-f171.google.com with SMTP id l4so3233890lbv.16 for ; Fri, 25 Jul 2014 03:18:52 -0700 (PDT) X-Received: by 10.152.43.227 with SMTP id z3mr15274269lal.1.1406283532156; Fri, 25 Jul 2014 03:18:52 -0700 (PDT) Received: from localhost.localdomain (c83-254-146-69.bredband.comhem.se. [83.254.146.69]) by mx.google.com with ESMTPSA id t5sm2449961laa.26.2014.07.25.03.18.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jul 2014 03:18:51 -0700 (PDT) From: Linus Walleij To: arm@kernel.org Subject: [PATCH] ARM: nomadik: fix up double inversion in DT Date: Fri, 25 Jul 2014 12:18:42 +0200 Message-Id: <1406283522-6764-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140725_031916_088809_BE0D2C5A X-CRM114-Status: GOOD ( 15.10 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.217.171 listed in wl.mailspike.net] Cc: Linus Walleij , Ulf Hansson , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The GPIO pin connected to card detect was inverted twice: once by the argument to the GPIO line itself where it was magically marked as active low by the flag GPIO_ACTIVE_LOW (0x01) in the third cell, and also marked active low AGAIN by explicitly stating "cd-inverted" (a deprecated method). After commit 78f87df2b4f8760954d7d80603d0cfcbd4759683 "mmc: mmci: Use the common mmc DT parser" this results in the line being inverted twice so it was effectively uninverted, while the old code would not have this effect, instead disregarding the flag on the GPIO line altogether, which is a bug. I admit the semantics may be unclear but inverting twice is as good a definition as any on how this should work. So fix up the buggy device tree. Use proper #includes so the DTS is clear and readable. Cc: Ulf Hansson Signed-off-by: Linus Walleij --- ARM SoC folks: please either apply this directly for fixes, and if that is too late, tag it for v3.16+ stable. --- arch/arm/boot/dts/ste-nomadik-s8815.dts | 2 +- arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/ste-nomadik-s8815.dts b/arch/arm/boot/dts/ste-nomadik-s8815.dts index f557feb997f4..90d8b6c7a205 100644 --- a/arch/arm/boot/dts/ste-nomadik-s8815.dts +++ b/arch/arm/boot/dts/ste-nomadik-s8815.dts @@ -4,7 +4,7 @@ */ /dts-v1/; -/include/ "ste-nomadik-stn8815.dtsi" +#include "ste-nomadik-stn8815.dtsi" / { model = "Calao Systems USB-S8815"; diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi index d316c955bd5f..dbcf521b017f 100644 --- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi @@ -1,7 +1,9 @@ /* * Device Tree for the ST-Ericsson Nomadik 8815 STn8815 SoC */ -/include/ "skeleton.dtsi" + +#include +#include "skeleton.dtsi" / { #address-cells = <1>; @@ -842,8 +844,7 @@ bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; - cd-gpios = <&gpio3 15 0x1>; - cd-inverted; + cd-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; vmmc-supply = <&vmmc_regulator>;