• NeilBrown's avatar
    twl4030_charger: allow fine control of charger current. · 1098cb58
    NeilBrown authored
    The twl4030 allows control of the incoming current.
    Part of this control is a 'CGAIN' setting which doubles
    the range for half the precision.  This control affects
    several different current setting, so all need to be updated
    at once when CGAIN is changed.
    
    With this patch, all of these current setting are managed
    by the driver, but most are left at their default settings.
    
    The current drawn is set to 500mA if the allow_usb module parameter is
    set, and to 100mA otherwise.
    More fine control will appear in later patches.
    Acked-by: default avatarPavel Machek <pavel@ucw.cz>
    Signed-off-by: default avatarNeilBrown <neil@brown.name>
    Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
    1098cb58
twl4030_charger.c 21.2 KB