[alsa-devel] [PATCH 1/3] regmap: Properly round reg_bytes and val_bytes

Wolfram Sang w.sang at pengutronix.de
Sat Jan 28 02:14:03 CET 2012


On Fri, Jan 27, 2012 at 04:28:37PM +0000, Mark Brown wrote:
> On Fri, Jan 27, 2012 at 04:10:21PM +0100, Wolfram Sang wrote:
> > For the upcoming 2/6-format, we don't see debugfs output otherwise,
> > since the current division results in 0. I'd think 10/14 is broken
> > currently, too.
> 
> This looks good but could you please rebase on top of topic/core, it
> conflicts with the support for padding bytes.  It's not really entirely
> incorrect, the bytes values aren't terribly well defined for register
> sizes that aren't integer numbers of bytes as they were never intended
> to be used then.  The assumption did leak out into debugfs though.

I wondered if you'd save reg_bits and val_bits there (converting to *_bytes
when needed), you could replace all the format_x_y-functions with a few generic
functions doing (reg << y) | val. Unsure if it is worth it...

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120128/96ba4314/attachment.sig 


More information about the Alsa-devel mailing list