lkml.org 
[lkml]   [2015]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/8] mfd: arizona: Add support for WM8998 and WM1814
On Wed, Apr 22, 2015 at 12:08:08PM +0100, Mark Brown wrote:
> On Tue, Apr 21, 2015 at 01:33:51PM +0100, Richard Fitzgerald wrote:
>
> > + switch (arizona->type) {
> > + case WM8998:
> > + case WM1814:
> > + /* Some bits are shifted on WM8998,
> > + * rearrange to match the standard bit layout
> > + */
> > + val[0] = ((val[0] & 0x60e0) >> 1) |
> > + ((val[0] & 0x1e00) >> 2) |
> > + (val[0] & 0x000f);
> > + break;
>
> Are you sure this approach is going to scale (and avoid confusion)?

It's a total one-off for the WM8998/WM1814, no other codecs have
this shifted-bit-position problem. This shouldn't happen for any
future codecs, so I don't feel like it's worth over-complicating it.


\
 
 \ /
  Last update: 2015-04-27 15:01    [W:1.243 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site