From patchwork Mon Aug 17 11:58:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 7024831 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 38A899F358 for ; Mon, 17 Aug 2015 12:00:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B18720644 for ; Mon, 17 Aug 2015 12:00:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 420F52062D for ; Mon, 17 Aug 2015 12:00:53 +0000 (UTC) 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 1ZRJ4A-0004Ub-KO; Mon, 17 Aug 2015 11:59:02 +0000 Received: from mail-wi0-f174.google.com ([209.85.212.174]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZRJ47-0004Ps-EM for linux-arm-kernel@lists.infradead.org; Mon, 17 Aug 2015 11:58:59 +0000 Received: by wicja10 with SMTP id ja10so78762953wic.1 for ; Mon, 17 Aug 2015 04:58:36 -0700 (PDT) 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=RW2pC2WjRqHSQGP8QGqd6U+8+ao2MQvHEx1fjdgUMiQ=; b=nD2P3Dgr0sGd/9GacPcyM8hXSCQheybo41fbG4RfZUBGnw1DjZsTw0JbnHuXYQiDrb tEwjbdz/Ut35wUSPh0ouEQmpK/xBf3j6OPsdBJDxeaAlRUb+3L3jUHTZwiRLZv7XGoba gOgHtUJUtnxCSm//qiw4Zcy2HT76gIESlMX/Z8sC0KwEyUi4Gs1j7fKzS0QgJnftYKcv EToz1fZgjmAVAPF4PTDSwr8A1546g8eX4iUQEjxD7hEeSfPaH5n1+xS7ChEyduR08t1K XXyYc7VITa9o0VWO6D2F42AS48Xj41UhfWwzv3EL5YUz8oTHKh5CKAAwEzt3wcKEKmYg m9vw== X-Gm-Message-State: ALoCoQn6PeRbg6He2+Omph46KHVpZA/giMgXLmhFyxT4Z1dbvxLocxNsXLFqTbXVIWCTxmEkSXA0 X-Received: by 10.180.106.3 with SMTP id gq3mr33136700wib.50.1439812716770; Mon, 17 Aug 2015 04:58:36 -0700 (PDT) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id dz4sm16427128wib.17.2015.08.17.04.58.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Aug 2015 04:58:36 -0700 (PDT) From: Srinivas Kandagatla To: Ulf Hansson , linux-mmc@vger.kernel.org Subject: [PATCH] pwrseq: bind pinctrl pins before using the gpios Date: Mon, 17 Aug 2015 12:58:07 +0100 Message-Id: <1439812687-18259-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150817_045859_636604_B6D45132 X-CRM114-Status: GOOD ( 14.00 ) X-Spam-Score: -2.6 (--) 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-arm-msm@vger.kernel.org, Srinivas Kandagatla , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some of the pin-controllers like the Qualcomms "qcom,pm8921", which require a pinconf to be setup to use pins as gpios. Using the pins directly without pinconf setup would result in incorrect output voltage or load settings. On the other hand pwrseq code does not configure the pinctrl by default as it does not go thru the driver core. This patch adds a call to pinctrl_bind_pins() to bind pins which are going to be used as gpios. Signed-off-by: Srinivas Kandagatla --- drivers/mmc/core/pwrseq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/core/pwrseq.c b/drivers/mmc/core/pwrseq.c index 4c1d175..6e5d8b3 100644 --- a/drivers/mmc/core/pwrseq.c +++ b/drivers/mmc/core/pwrseq.c @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -65,6 +66,10 @@ int mmc_pwrseq_alloc(struct mmc_host *host) goto err; } + ret = pinctrl_bind_pins(&pdev->dev); + if (ret) + goto err; + match = mmc_pwrseq_find(np); if (IS_ERR(match)) { ret = PTR_ERR(match);