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: 2110371 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 23EBCDFB7B for ; Thu, 7 Feb 2013 12:06:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757499Ab3BGMGv (ORCPT ); Thu, 7 Feb 2013 07:06:51 -0500 Received: from mail-da0-f42.google.com ([209.85.210.42]:61807 "EHLO mail-da0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756686Ab3BGMGv (ORCPT ); Thu, 7 Feb 2013 07:06:51 -0500 Received: by mail-da0-f42.google.com with SMTP id z17so1186645dal.1 for ; Thu, 07 Feb 2013 04:06:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=dIevW0smJOweAM4WEwIOge2v+953KmmgetJ1ENIGN0s=; b=FNT2LAuobvCwtVnSVakrRb4zj1lImBTlJibFt2IUXGLP5aciR/io7DXSHdaMmfs2c5 eAyYYzRaFxV6pGhpEQH2kV0lMkKVI8LPcf4b06kKTUNBN+hOEZvJjbL0zjbIs9O6b8CB hOPVzD3WjuoAosO86MFKnJKwAll7lFGyVncwwar5hp/3SzGb8Hn/gYv20LC88Uksl1Eu mPutGJ2r6ViRdcB/NdtqnF7bsYR3u//GA9EsU43L8uwck8US3KxPr0LzEi0Q8gB9NBC2 jmtHQXi2oSvfldG9XFhldbdobaxSP2M4ByQV1uU2f4n6rVaokjqHnyhvqGiRP8JhF9Zj 8bvA== 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: ALoCoQmtF6a2gLVocj5yg4PH4kOdaHr6duzuQqCmP0OL8C/t1EQplz6ejv15RGX/wRjUZlhO8XXe Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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);