From patchwork Tue Sep 11 17:46:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 1439261 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 3A888DFAF3 for ; Tue, 11 Sep 2012 17:46:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757276Ab2IKRp7 (ORCPT ); Tue, 11 Sep 2012 13:45:59 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:64113 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753002Ab2IKRpf (ORCPT ); Tue, 11 Sep 2012 13:45:35 -0400 Received: by yenl14 with SMTP id l14so155274yen.19 for ; Tue, 11 Sep 2012 10:45:34 -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:in-reply-to :references; bh=kt7qmESjdz2AZokzKSo7ZtqVq4X2ptIe3viHT4KTrPg=; b=BUHCT07d71wFuDBPiQDpr9Mm/RaDGPbzmYVzYvaLLgDbQlVSYKh/SOXEFCflYdcsgN dDnmer8BgaFGFTsZ+rkHS71nnYJZEnHQuGHFD/FUH2p1AqcJHyZ5JkkjeU7oScZtkL4/ EkGpfoapZWJW5JPmdC/Tj09kx53isaYonJa1XETTgMoTVRbJKDeogEOpc26vmagsDSIq BNt8NLbeMpCQ8Su69I1JlMdY2h5Vj4rOx+4sw48zcLOHoItXUevDQgNKfuwNHvhkBp+O haexdtvk1pjHORjbXZlcQaaEykgMGKIF26WEA4YhmaSOlnR4rXIhRxgJ+ezvoltnrvBx 8jXQ== Received: by 10.101.175.37 with SMTP id c37mr5161873anp.39.1347385534743; Tue, 11 Sep 2012 10:45:34 -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 x4sm31156071yhh.2.2012.09.11.10.45.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Sep 2012 10:45:34 -0700 (PDT) From: Matt Porter To: Linux OMAP List , Linux SPI Devel List , Grant Likely , Tony Lindgren Cc: Linux Kernel Mailing List , Linux ARM Kernel List , AnilKumar Subject: [PATCH 1/2] spi: omap2-mcspi: add pinctrl support Date: Tue, 11 Sep 2012 13:46:38 -0400 Message-Id: <1347385599-27558-2-git-send-email-mporter@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1347385599-27558-1-git-send-email-mporter@ti.com> References: <1347385599-27558-1-git-send-email-mporter@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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 --- drivers/spi/spi-omap2-mcspi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index b2fb141..6c67cdb 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,12 @@ 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)) { + status = PTR_ERR(pinctrl); + goto dma_chnl_free; + } + pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT); pm_runtime_enable(&pdev->dev);