From patchwork Mon Oct 15 16:05:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatraman S X-Patchwork-Id: 1594531 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id F3CAF3FD86 for ; Mon, 15 Oct 2012 16:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752639Ab2JOQFT (ORCPT ); Mon, 15 Oct 2012 12:05:19 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:54138 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304Ab2JOQFS (ORCPT ); Mon, 15 Oct 2012 12:05:18 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9FG5EGZ023006; Mon, 15 Oct 2012 11:05:14 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9FG5ERm015028; Mon, 15 Oct 2012 11:05:14 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Mon, 15 Oct 2012 11:05:14 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9FG5EAg001593; Mon, 15 Oct 2012 11:05:14 -0500 Received: from localhost (ltuba0393540.apr.dhcp.ti.com [172.24.136.231]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q9FG5Bw03000; Mon, 15 Oct 2012 11:05:12 -0500 (CDT) From: Venkatraman S To: , CC: , Daniel Mack , Venkatraman S , Grant Likely , Rob Herring , Linus Walleij Subject: [PATCH 1/4] MMC: omap_hsmmc: claim pinctrl at probe time Date: Mon, 15 Oct 2012 21:35:05 +0530 Message-ID: <1350317108-10657-1-git-send-email-svenkatr@ti.com> X-Mailer: git-send-email 1.7.11.1.25.g0e18bef MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Daniel Mack This allows DT-driven board to set up the pin mux only when the driver is in use. Signed-off-by: Daniel Mack Cc: Venkatraman S Cc: Chris Ball Cc: Grant Likely Cc: Rob Herring Cc: Linus Walleij Cc: linux-omap@vger.kernel.org Acked-by: Linus Walleij Signed-off-by: Venkatraman S --- drivers/mmc/host/omap_hsmmc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 54bfd0c..01eeeae 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1720,6 +1721,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) const struct of_device_id *match; dma_cap_mask_t mask; unsigned tx_req, rx_req; + struct pinctrl *pinctrl; match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev); if (match) { @@ -1923,6 +1925,11 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) omap_hsmmc_disable_irq(host); + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) + dev_warn(&pdev->dev, + "pins are not configured from the driver\n"); + omap_hsmmc_protect_card(host); mmc_add_host(mmc);