From patchwork Fri Oct 12 10:58:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 1586331 Return-Path: X-Original-To: patchwork-linux-omap@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 14E30DFF71 for ; Fri, 12 Oct 2012 10:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754151Ab2JLK6y (ORCPT ); Fri, 12 Oct 2012 06:58:54 -0400 Received: from svenfoo.org ([82.94.215.22]:32913 "EHLO mail.zonque.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753175Ab2JLK6s (ORCPT ); Fri, 12 Oct 2012 06:58:48 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.zonque.de (Postfix) with ESMTP id CF155C01C1; Fri, 12 Oct 2012 12:58:46 +0200 (CEST) Received: from mail.zonque.de ([127.0.0.1]) by localhost (rambrand.bugwerft.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pfiY8Ho32NNE; Fri, 12 Oct 2012 12:58:46 +0200 (CEST) Received: from tamtam.taperay.com (i59F7770D.versanet.de [89.247.119.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.zonque.de (Postfix) with ESMTPSA id 4E560C00DC; Fri, 12 Oct 2012 12:58:46 +0200 (CEST) From: Daniel Mack To: linux-mmc@vger.kernel.org Cc: Daniel Mack , Venkatraman S , Chris Ball , Grant Likely , Rob Herring , Linus Walleij , linux-omap@vger.kernel.org Subject: [PATCH 3/4] MMC: omap_hsmmc: claim pinctrl at probe time Date: Fri, 12 Oct 2012 12:58:14 +0200 Message-Id: <1350039495-360-4-git-send-email-zonque@gmail.com> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1350039495-360-1-git-send-email-zonque@gmail.com> References: <1350039495-360-1-git-send-email-zonque@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 --- 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 2c57b0d..86f0759 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 @@ -1722,6 +1723,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) { @@ -1948,6 +1950,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);