• Milo(Woogyom) Kim's avatar
    leds-lp5521: clean up lp5521_configure() · 94482174
    Milo(Woogyom) Kim authored
     This patch is a preceding step for making common lp55xx init function.
    
     LP5521_REG_R_CURRENT register code moved:
     Chip specific code moved from lp5521_init_device() to lp5521_configure().
    
     Remove engine init function:
     LP5521 has internal program engines which are used for running LED patterns.
     (blinking, ramp up/down and other emotional visual effects)
     Engine initialization is done by reset command in lp5521_init_device().
     Remove this duplicate code.
    
     Return code:
     Do not use 'OR' arithmetic for the result.
     If some error occus, just return it.
    
     Enable latency:
     Use explicit named function, lp5521_wait_enable_done().
     According to the datasheet, 500us is guaranteed time.
     Thus wait time is changed from 1000us to 500us.
    Signed-off-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
    Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
    94482174
leds-lp5521.c 24 KB