linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mfd: mc13xxx: Honor designed SPI mode
@ 2014-03-02  7:44 Alexander Shiyan
  2014-03-02  7:44 ` [PATCH 2/4] mfd: mc13xxx: Limit maximum SPI speed Alexander Shiyan
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Alexander Shiyan @ 2014-03-02  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

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 <shc_work@mail.ru>
---
 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, &regmap_mc13xxx_bus,
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-03-05 11:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02  7:44 [PATCH 1/4] mfd: mc13xxx: Honor designed SPI mode Alexander Shiyan
2014-03-02  7:44 ` [PATCH 2/4] mfd: mc13xxx: Limit maximum SPI speed Alexander Shiyan
2014-03-03  7:36   ` Lee Jones
2014-03-02  7:44 ` [PATCH 3/4] mfd: mc13xxx: Add missing spi_setup() Alexander Shiyan
2014-03-03  7:37   ` Lee Jones
2014-03-02  7:44 ` [PATCH 4/4] regulator: mc13xxx: Fix probing with DT Alexander Shiyan
2014-03-03  1:58   ` Mark Brown
2014-03-03  7:35 ` [PATCH 1/4] mfd: mc13xxx: Honor designed SPI mode Lee Jones
2014-03-03  7:55   ` Alexander Shiyan
2014-03-03  9:23     ` Lee Jones
2014-03-03  9:41 ` Sascha Hauer
2014-03-03  9:51   ` Alexander Shiyan
2014-03-04 20:13     ` Sascha Hauer
2014-03-04 20:51       ` Alexander Shiyan
2014-03-05 11:57         ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).