[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5B__g46hzbMg5XSw69Fh=Gb313YJen=x8MLckyfmK8Luw@mail.gmail.com>
Date: Wed, 23 May 2012 16:32:37 -0300
From: Fabio Estevam <festevam@...il.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: 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 Wed, May 23, 2012 at 2:36 PM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> 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@...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