Re: mc13xxx-core: kernel hangs after 'regmap_read'

From: Fabio Estevam
Date: Tue May 22 2012 - 22:05:33 EST


On Tue, May 22, 2012 at 10:12 PM, Fabio Estevam <festevam@xxxxxxxxx> wrote:

> The sequence that shows the problem is:
>
> mc13xxx_spi_probe
> mc13xxx_common_init
> mc13xxx_identify
> mc13xxx_reg_read
> regmap_read (kernel hangs)

If I do the following:

--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -72,8 +72,6 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
return -ENOMEM;

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);

Then this allows the kernel to boot at least (of course the mc13xxx
probe will fail in this case).

Mark,

Should the spi->mode and spi->bits_per_word be passed differently?

Maybe via "struct regmap_config" ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/