From patchwork Tue Sep 18 12:01:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 1472301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C2B993FCFC for ; Tue, 18 Sep 2012 12:03:17 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TDwT9-0002a4-Mz; Tue, 18 Sep 2012 11:59:59 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TDwT7-0002Zq-6U for linux-arm-kernel@lists.infradead.org; Tue, 18 Sep 2012 11:59:57 +0000 Received: by iaai1 with SMTP id i1so6580716iaa.36 for ; Tue, 18 Sep 2012 04:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=HUk+qi9zB/Mw4bAle9SUbzvVKCuYUsrytsY66z56H1c=; b=ILRh+hbvNo+Df6bhkj2rsuF5DChZSizPrLgKzKBba79vx528Tm+nDZdEsCTIkdDqTs lQiVNOMfvcynYM5pSAxDyqt97Oh7GJRSZsBYI4uDRBqmN3Mihjr1YaRTOotWpr51zOL2 XJwsVtHY9vDs7ch5m5dWuHwa5cKWa5Cx8PTAebl6zj1LZsqU8vs9t6BA7+nHiuHqc96O kYJJDJSyHPhF7iSnuBFxNShGWEDFQBDOytBP0t7xdqLVBtMPMQjznE2jQcetzvgFCb9A XeJ915vWluBubpeveQOgwSNSsLLkqulSDyKID4r24xF4rUgo2IOEgFewh5NQ7H9ucYer nkSw== Received: by 10.50.196.231 with SMTP id ip7mr10265173igc.7.1347969595137; Tue, 18 Sep 2012 04:59:55 -0700 (PDT) Received: from beef.ohporter.com (cpe-24-166-64-7.neo.res.rr.com. [24.166.64.7]) by mx.google.com with ESMTPS id uq6sm10392836igb.14.2012.09.18.04.59.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Sep 2012 04:59:53 -0700 (PDT) From: Matt Porter To: Linux OMAP List , Linux SPI Devel List , Grant Likely , Tony Lindgren Subject: [REPOST PATCH v2 1/2] spi: omap2-mcspi: add pinctrl support Date: Tue, 18 Sep 2012 08:01:25 -0400 Message-Id: <1347969685-15571-1-git-send-email-mporter@ti.com> X-Mailer: git-send-email 1.7.9.5 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ohiomdp[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: AnilKumar , Mark Brown , Linux Kernel Mailing List , Linux ARM Kernel List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Adds pinctrl support to support OMAP platforms that boot from DT and rely on pinctrl support to set pinmuxes. Signed-off-by: Matt Porter Acked-by: Shubhrajyoti D Acked-by: Tony Lindgren --- drivers/spi/spi-omap2-mcspi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index b2fb141..9502566 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include @@ -1124,6 +1126,7 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) static int bus_num = 1; struct device_node *node = pdev->dev.of_node; const struct of_device_id *match; + struct pinctrl *pinctrl; master = spi_alloc_master(&pdev->dev, sizeof *mcspi); if (master == NULL) { @@ -1219,6 +1222,11 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) if (status < 0) goto dma_chnl_free; + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) + dev_warn(&pdev->dev, + "pins are not configured from the driver\n"); + pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT); pm_runtime_enable(&pdev->dev);