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: 52473 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 9259D22DB1 for ; Mon, 17 Aug 2015 11:58:43 +0000 (UTC) Received: by labia3 with SMTP id ia3sf47034160lab.1 for ; Mon, 17 Aug 2015 04:58:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=tE67nKMMZyuoNiVJTWO+YMbV7SKPcyYafsmN/ukPaDw=; b=N1t11W+I4GjRvBHMFC32hOpWFhfjvxA4UvL8VTcdl/iMnxoEtKjQzzPQn8u7xkNhRL x3Uk2Ee3qaizsYHFvFu77XXH/pUeOqyGKwrIdZ/vVIFsrKmJWx+6Ci8cY0BPqkpVh2I1 FjoMm1OKwsmR59ArpWxQGRbjRKqYNSIvYLitpLmXXXn1n1dc43KOpbCXF39VUGNVN3Ls yep2i4Hyl8CsiTLtPervSOgMhtlgcfnYccNHpzLhV/Hp3tuf7juQOWmFEreR7GEy04Yz wPBxxpqmOWbbNFhMCyTmra+0ciUjiUh2cWCGOUeSJMk7QudX35w6JWHu6YmyJu/Kl8dO SrAA== X-Gm-Message-State: ALoCoQnEK9+1rTp76gUHnxsUyy6FB+aP+yLT45vDjzLp0lYsVUP09KOYmE869/WqOxa19UeuTg/3 X-Received: by 10.152.1.164 with SMTP id 4mr302485lan.2.1439812722121; Mon, 17 Aug 2015 04:58:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.169 with SMTP id f9ls626226lam.93.gmail; Mon, 17 Aug 2015 04:58:41 -0700 (PDT) X-Received: by 10.152.23.167 with SMTP id n7mr857362laf.108.1439812721855; Mon, 17 Aug 2015 04:58:41 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id zs5si11549680lbb.37.2015.08.17.04.58.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Aug 2015 04:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbpu9 with SMTP id pu9so80500699lbb.3 for ; Mon, 17 Aug 2015 04:58:41 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr877597lbb.56.1439812721640; Mon, 17 Aug 2015 04:58:41 -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.112.7.198 with SMTP id l6csp1398822lba; Mon, 17 Aug 2015 04:58:40 -0700 (PDT) X-Received: by 10.68.182.3 with SMTP id ea3mr2027370pbc.126.1439812720604; Mon, 17 Aug 2015 04:58:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si24307982pds.29.2015.08.17.04.58.39; Mon, 17 Aug 2015 04:58:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752156AbbHQL6j (ORCPT + 6 others); Mon, 17 Aug 2015 07:58:39 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:34053 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754946AbbHQL6h (ORCPT ); Mon, 17 Aug 2015 07:58:37 -0400 Received: by wicne3 with SMTP id ne3so72938005wic.1 for ; Mon, 17 Aug 2015 04:58:36 -0700 (PDT) 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 Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla 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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@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.217.176 as permitted sender) smtp.mailfrom=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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);