Re: regmap: Question about devices with unequal register sizes

From: Mark Brown
Date: Mon May 06 2013 - 15:37:08 EST


On Mon, May 06, 2013 at 06:32:12PM +0200, Daniel Mack wrote:
> On 17.02.2013 17:23, Mark Brown wrote:

> > The regmap I/O code isn't making any effort to support such devices, the
> > hardware is just too crazy to worry about. The best you can do is use
> > the no-bus support and open code your physical I/O so you can still use
> > the cache.

> So it turns out I need to write these registers now on the TAS5086
> codec, which has such a strange layout. I wonder how I can possibly open
> code the physical I/O with registers that are up to 20 bytes in size,
> while the reg_write callback in struct regmap_config assumes an unsigned
> int suffices for the data? Any example you can point me to?

There's just no attempt being made in regmap to cater for such devices.
I'm not sure it's worth bothering, sorry, though if you come up with a
non-intrusive way of handling such hardware of course it'd be worth
considering.

Using the no-bus support, having that take a lock and then bypassing it
completely to do the 20 byte writes would probably work.

Attachment: signature.asc
Description: Digital signature