From patchwork Sun Mar 2 07:44:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 3748781 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7ADC79F35F for ; Sun, 2 Mar 2014 07:47:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E39D2037D for ; Sun, 2 Mar 2014 07:47:27 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9BA320357 for ; Sun, 2 Mar 2014 07:47:26 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WK15u-0004lh-JN; Sun, 02 Mar 2014 07:45:55 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WK15b-0003pn-Ix; Sun, 02 Mar 2014 07:45:35 +0000 Received: from smtp37.i.mail.ru ([94.100.177.97]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WK15E-0003n1-6h for linux-arm-kernel@lists.infradead.org; Sun, 02 Mar 2014 07:45:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Message-Id:Date:Subject:Cc:To:From; bh=uo8abmAAbPrHE74hxU8QAROOrz7czE1gswchcTXlwfw=; b=ajK0MiGpoSq+aBQHgwT36e2g6uksk26adiAel3jpv/hmYh4SEVtSICVocQGd3BA+P7gkj5RalBWtjZw5rAMvf3YACzdTK94BGz7+TdAI0zR1zuDRWxsY8Zdxi/GDlN1p0eVMd+VCeSBEPNAPoGCaDiLpZWkhIsyOII621mzT+M4=; Received: from [188.134.40.128] (port=54763 helo=shc.zet) by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1WK14q-0000v7-4T; Sun, 02 Mar 2014 11:44:48 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] mfd: mc13xxx: Honor designed SPI mode Date: Sun, 2 Mar 2014 11:44:32 +0400 Message-Id: <1393746275-9253-1-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.3.2 X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140302_024512_812267_6A238FD2 X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -2.0 (--) Cc: Samuel Ortiz , Alexander Shiyan , Liam Girdwood , Mark Brown , Sascha Hauer , Shawn Guo , Lee Jones X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of using hard coded SPI mode, use mode described in devicetree or defined for the board. Additionally, patch updates all users of this PMIC to use correct SPI mode. Signed-off-by: Alexander Shiyan --- arch/arm/mach-imx/mach-mx31lilly.c | 1 + arch/arm/mach-imx/mach-mx31lite.c | 1 + drivers/mfd/mc13xxx-spi.c | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index 832b1e2..16c688e 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c @@ -231,6 +231,7 @@ static struct spi_board_info mc13783_dev __initdata = { .bus_num = 1, .chip_select = 0, .platform_data = &mc13783_pdata, + .mode = SPI_MODE_0 | SPI_CS_HIGH, /* irq number is run-time assigned */ }; diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index bea0729..bf3e61e 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c @@ -121,6 +121,7 @@ static struct spi_board_info mc13783_spi_dev __initdata = { .bus_num = 1, .chip_select = 0, .platform_data = &mc13783_pdata, + .mode = SPI_MODE_0 | SPI_CS_HIGH, /* irq number is run-time assigned */ }; diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c index 38ab678..f88087f 100644 --- a/drivers/mfd/mc13xxx-spi.c +++ b/drivers/mfd/mc13xxx-spi.c @@ -136,8 +136,6 @@ static int mc13xxx_spi_probe(struct spi_device *spi) dev_set_drvdata(&spi->dev, mc13xxx); - spi->mode = SPI_MODE_0 | SPI_CS_HIGH; - mc13xxx->irq = spi->irq; mc13xxx->regmap = devm_regmap_init(&spi->dev, ®map_mc13xxx_bus,