lkml.org 
[lkml]   [2012]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] mfd: add an AS3711 PMIC MFD driver
    On Wed, Nov 21, 2012 at 07:21:02PM +0100, Guennadi Liakhovetski wrote:

    > + regmap_read(as3711->regmap, AS3711_ASIC_ID_1, &id1);
    > + regmap_read(as3711->regmap, AS3711_ASIC_ID_2, &id2);
    > + dev_info(as3711->dev, "AS3711 detected: %x:%x\n", id1, id2);
    > + if (id1 != 0x8b)
    > + return -ENODEV;

    This looks odd - you're printing the "AS3711 detected" message prior to
    checking the device ID which will be a bit confusing if there's a
    problem. Should probably do this after the ID check (and ideally also
    check the return value of regmap_read(), it's especially important
    during device identification where someone might've typoed the address).

    Otherwise this looks good.
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2012-11-22 21:21    [W:3.072 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site