From patchwork Thu Feb 7 11:57:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 14671 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 25F2324195 for ; Thu, 7 Feb 2013 12:06:57 +0000 (UTC) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by fiordland.canonical.com (Postfix) with ESMTP id CE96EA18D93 for ; Thu, 7 Feb 2013 12:06:56 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fl17so1570440vcb.13 for ; Thu, 07 Feb 2013 04:06:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=dIevW0smJOweAM4WEwIOge2v+953KmmgetJ1ENIGN0s=; b=R1ZquWTTDHtDBk/y2uBTNBjYWfO2jNuTIiZaQllyKce05nTlpkFH6YdsNxbUblNtIr c2mswT2yadGE7AKdl9okLJyOAnWVKSSFU4HEz4rrhPSu1URhD8s3Vd13J81iq0/LP23A bbgS/aLVn7z+RwtXRodW5DhW9dZ8ov5ezv1mVkwSVYtj2f5gUObTlCK+SSJ1illfrqPH pLw+0v8ICbZ4b951t/iHspI8VavwVQlQXpOriFOwjGldmWIHDLzNkTinkIqtR5PcZoQ3 OHDMqXoWzwZTrX8beN8IxgCCkNo42wqCRkZJgLmxXSxXAtPmJqbngFm6FOKfdg1jBvrF suow== X-Received: by 10.220.149.200 with SMTP id u8mr1258464vcv.7.1360238813228; Thu, 07 Feb 2013 04:06:53 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp85485vec; Thu, 7 Feb 2013 04:06:52 -0800 (PST) X-Received: by 10.50.88.226 with SMTP id bj2mr2010228igb.105.1360238812311; Thu, 07 Feb 2013 04:06:52 -0800 (PST) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id a6si34448078paw.110.2013.02.07.04.06.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Feb 2013 04:06:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f50.google.com with SMTP id fa11so1403521pad.9 for ; Thu, 07 Feb 2013 04:06:51 -0800 (PST) X-Received: by 10.66.77.200 with SMTP id u8mr5239780paw.43.1360238810392; Thu, 07 Feb 2013 04:06:50 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id d1sm45515427pav.6.2013.02.07.04.06.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 07 Feb 2013 04:06:49 -0800 (PST) From: Sachin Kamat To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, tgih.jun@samsung.com, jh80.chung@samsung.com, sachin.kamat@linaro.org, patches@linaro.org, Thomas Abraham , Linus Walleij Subject: [PATCH 2/2] mmc: dw_mmc: exynos: Add pinctrl support Date: Thu, 7 Feb 2013 17:27:16 +0530 Message-Id: <1360238236-17694-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1360238236-17694-1-git-send-email-sachin.kamat@linaro.org> References: <1360238236-17694-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQno6Sv0Xa12Caa1Nl3CyWHNiWG3yDLe5H9EJmhPOvDHPKCZvWI+T4ZNeU6zEPMbjv6ceTGf Added support for pin configuration using pinctrl subsystem. Cc: Thomas Abraham Cc: Linus Walleij Signed-off-by: Sachin Kamat --- drivers/mmc/host/dw_mmc-exynos.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index f15b4d3..31f5f47 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -11,11 +11,13 @@ #include #include +#include #include #include #include #include #include +#include #include "dw_mmc.h" #include "dw_mmc-pltfm.h" @@ -36,6 +38,8 @@ #define EXYNOS4210_FIXED_CIU_CLK_DIV 2 #define EXYNOS4412_FIXED_CIU_CLK_DIV 4 +static struct pinctrl *pctrl; + /* Variations in Exynos specific dw-mshc controller */ enum dw_mci_exynos_type { DW_MCI_TYPE_EXYNOS4210, @@ -160,6 +164,10 @@ static int dw_mci_exynos_setup_bus(struct dw_mci *host, if (!slot_np) return -EINVAL; + pctrl = devm_pinctrl_get_select_default(host->dev); + if (!IS_ERR(pctrl)) + return 0; + /* cmd + clock + bus-width pins */ for (idx = 0; idx < NUM_PINS(bus_width); idx++) { gpio = of_get_gpio(slot_np, idx);