• Kim, Milo's avatar
    backlight: lp855x_bl: introduce device configuration flow · 68853bc2
    Kim, Milo authored
    At this moment, LP855x device driver has fixed register configuration.
    For example, fixed register addresses and values are set on the device
    initialization.  But new device of LP855x family, LP8557 has different
    register map and initialization sequence.  To support new device
    architecture, initialization process should be changed.
    
     Introduce new structure: lp855x_device_config
     =============================================
     With lp855x_device_config, device specific features are configurable.
     Use configurable function calls and register addresses rather than fixed values.
    
     Change on device initialization
     ===============================
     In old LP855x driver architecture, the device initialization was simple.
     - Just update the brightness/device control register/ROM area(optional).
     In new LP855x driver architecture, two more works are added - pre_init and
     post_init.
     Those init functions are optional, used for new device LP8557.
    
     New device initialization flow: generic sequence
     =================================================
     1) pre_init_device()
     2) update the brightness register
     3) update the device control register
     4) update ROM area if need
     5) post_init_device()
    
     Name change
     ===========
     Use generic name 'lp855x_configure()' instead of 'lp855x_init_registers()'.
    Signed-off-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
    Acked-by: default avatarJingoo Han <jg1.han@samsung.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    68853bc2
lp855x_bl.c 8.56 KB