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

From: Fabio Estevam
Date: Wed May 23 2012 - 15:32:34 EST


On Wed, May 23, 2012 at 2:36 PM, Mark Brown
<broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> The data sent should be however many bits of register address are
> specified, followed by however many padding bits are specified, followed
> by the data. ÂThe shift there will be some combination of the padding
> and register address.

Ok, from the mc13783 datasheet:

"Both SPI ports are configured to utilize 32-bit serial data words,
using 1 read/write bit, 6 address bits, 1
null bit, and 24 data bits. The SPI portsâ 64 registers correspond to
the 6 address bits."

,and we have the struct regmap_config as:

.reg_bits = 7,
.pad_bits = 1,
.val_bits = 24,

>From the bootloader I read PMIC register 0 as 0x00081000.

In the kernel all the PMIC registers accesses are read as: 0x00000810

So it looks when I read a register via SPI through regmap the register
address field is not being updated correctly (like as it was always
reading from register 0) and there is also a shift by 8 in there.
--
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/