[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120524073315.GE7843@S2100-06.ap.freescale.net>
Date: Thu, 24 May 2012 15:33:16 +0800
From: Shawn Guo <shawn.guo@...escale.com>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
CC: Fabio Estevam <festevam@...il.com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
<marc@...esign.com.au>, Samuel Ortiz <sameo@...ux.intel.com>,
Sascha Hauer <kernel@...gutronix.de>,
Philippe Rétornaz <philippe.retornaz@...l.ch>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: mc13xxx-core: kernel hangs after 'regmap_read'
On Thu, May 24, 2012 at 08:46:35AM +0200, Uwe Kleine-König wrote:
> Hello,
>
> On Thu, May 24, 2012 at 02:39:00PM +0800, Shawn Guo wrote:
> > On Thu, May 24, 2012 at 01:07:43AM -0300, Fabio Estevam wrote:
> > > I am trying to understand why mx31pdk still fails.
> > >
> > So different from imx51-babbage which uses MC13892, mx31pdk uses
> > MC13783? But both chips should have the same regmap, right?
> They are similar. One difference is the protocol used. MC13783 only
> speaks spi, MC13892 can do both, spi and i2c. Does someone has a working
> MC13892 that uses spi?
>
I do. With the following patch applied on top of linux-next, it works
on my imx51-babbage board.
Regards,
Shawn
diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
index 3fcdab3..5d1969f 100644
--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -49,6 +49,7 @@ static struct regmap_config mc13xxx_regmap_spi_config = {
.reg_bits = 7,
.pad_bits = 1,
.val_bits = 24,
+ .write_flag_mask = 0x80,
.max_register = MC13XXX_NUMREGS,
@@ -73,7 +74,6 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
dev_set_drvdata(&spi->dev, mc13xxx);
spi->mode = SPI_MODE_0 | SPI_CS_HIGH;
- spi->bits_per_word = 32;
mc13xxx->dev = &spi->dev;
mutex_init(&mc13xxx->lock);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists