lkml.org 
[lkml]   [2010]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] ASoC: Add max98088 CODEC driver
    On Tue, Oct 12, 2010 at 06:47:52PM -0700, Joe Perches wrote:
    > On Tue, 2010-10-12 at 18:20 -0700, Peter Hsiang wrote:

    > > +static struct {
    > > + int readable;
    > > + int writable;
    > > + int vol;
    > > +} max98088_access[M98088_REG_CNT] = {

    > bool instead?

    > static struct {
    > bool readable;
    > bool writable,
    > bool vol;
    > } etc...

    The readable and writable fields are being used as bitmasks:

    | + { 0x1F, 0x1F, 1 }, /* 03 battery voltage */

    so this discards data which we may wish to use in future.

    > readable isn't used anywhere, writeable is used as bool
    > vol isn't a good name as it's easy to confuse with
    > volume. Maybe volatile_register?

    vol is traditionally used for this throughout the subsystem. It's
    unfortuante that volatile is a keyword.


    \
     
     \ /
      Last update: 2010-10-13 10:27    [W:4.564 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site