lkml.org 
[lkml]   [2012]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] regmap: Properly round reg_bytes and val_bytes
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/ |
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-01-28 02:17    [W:0.060 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site