[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/3] regmap: Properly round reg_bytes and val_bytes
On Sat, Jan 28, 2012 at 02:14:03AM +0100, Wolfram Sang wrote:

> 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...

Clearly we *can* but there's other bits (chiefly the cache code once we
acquire the ability to do block operations from cache) which really want
stuff to be 8 bit aligned. I deliberately chose to make things byte
aligned so we have to think about this stuff before we do things that
make byte aligned stuff hard, it felt like if we were going to take a
complexity hit we probably want it to be on the odd register formats as
pretty much all of the more demanding modern devices seem to be going
for multiples of 8 bits.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2012-01-30 14:23    [W:0.042 / U:4.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site