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: 7024811 Return-Path: X-Original-To: patchwork-linux-mmc@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 4AD3C9F358 for ; Mon, 17 Aug 2015 11:58:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B49620644 for ; Mon, 17 Aug 2015 11:58:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9280C20663 for ; Mon, 17 Aug 2015 11:58:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754981AbbHQL6i (ORCPT ); Mon, 17 Aug 2015 07:58:38 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:37419 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752156AbbHQL6h (ORCPT ); Mon, 17 Aug 2015 07:58:37 -0400 Received: by wibhh20 with SMTP id hh20so78949204wib.0 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=mj+zhNRT2FI8qz92xZPezfzEskAb9XTWxWIw11FiAVtUdIIp1YoTHvBgyObIrTCWRj UcwWHHBY8y4sGEJQ6qz7ghNBIcsj3k4mmHJCrkJgJCKuX7o5fqrbvzQA6Xmuk3k3TUT3 x6yjz1buuas5j3b2j55sj4IndO8PDNE+AuKjX9dnS/iUP92lfkeSpyKYo7YuNJt5sYJE o00WdyeWmcgE5FpPlJp7gjs/mR4azOGjN6b5ArX7AI8LoNLVXDTIw/mkj4DyhY/HNmpF g7ryu4STWyxv8Tzsf6Y6y647m6dSRtui3pKTnBDDpydChUnZDW+10djthMr8C2JRyhc8 0PPQ== X-Gm-Message-State: ALoCoQkeyzXUVPBBASJFrhYhtKwWnX+SN1x7be+cRzuol271I9/s/vGUt4NBQ36xS4ESoX/+I82L 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-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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);