1. 09 5月, 2017 1 次提交
  2. 04 1月, 2016 1 次提交
  3. 28 8月, 2015 1 次提交
    • M
      leds:lp55xx: use the private data instead of updating I2C device platform data · ed133352
      Milo Kim 提交于
      Currently, lp55xx_of_populate_pdata() allocates lp55xx_platform_data if
      it's null. And it parses the DT and copies values into the
      'client->dev.platform_data'. This may have architectural issue.
      Platform data is configurable through the DT or I2C board info inside the
      platform area. However, lp55xx common driver changes this configuration
      when it is loaded. So 'client->dev.platform_data' is not null anymore.
      Eventually, the driver initialization is not identical when it's unloaded
      and loaded again.
      The lp55xx common driver should use the private data, 'lp55xx_chip->pdata'
      instead of changing the original platform data.
      
      So, lp55xx_of_populate_pdata() is modified as follows.
      * Do not update 'dev->platform_data'. Return the pointer of new allocated
         lp55xx_platform_data. Then the driver points it to private data,
         'lp55xx_chip->pdata'.
      * Each lp55xx driver checks the pointer and handles an error case.
      
      Then, original platform data configuration will be kept regardless of
      loading or unloading the driver.
      The driver allocates the memory and copies them from the DT if it's NULL.
      After the driver is loaded again, 'client->dev.platform_data' is same as
      initial load, so the driver is initialized identically.
      
      Cc: Toshi Kikuchi <toshik@chromium.org>
      Cc: linux-leds@vger.kernel.org
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      ed133352
  4. 26 5月, 2015 1 次提交
  5. 08 5月, 2014 1 次提交
  6. 28 2月, 2014 1 次提交
  7. 28 1月, 2014 1 次提交
    • M
      leds: lp5521/5523: Fix multiple engine usage bug · 28c9266b
      Milo Kim 提交于
      Whenever the engine is loaded by the user-application, the operation mode is
      reset first. But it has a problem in case of multiple engine used because
      previous engine settings are cleared.
      The driver should update not whole 8bits but each engine bit by masking.
      
      On the other hands, whole engines should be reset when the driver is unloaded
      and on initializing the LP5523 driver.
      So, new functions are used for this handling - lp5521/5523_stop_all_engines().
      
      Cc: Pali Rohár <pali.rohar@gmail.com>
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      28c9266b
  8. 11 1月, 2014 1 次提交
  9. 10 1月, 2014 1 次提交
  10. 23 10月, 2013 1 次提交
  11. 27 8月, 2013 5 次提交
    • M
      leds: lp5523: remove unnecessary writing commands · 2f733cad
      Milo Kim 提交于
      This patch reduces the number of programming commands.
      
      (Count of sending commands)
      Old code: 32 + program size (32 counts for clearing program memory)
      New code: 32
      
      Pattern buffer is initialized to 0 in this function.
      Just update new program data and remaining buffers are filled with 0.
      So it's needless to clear whole area.
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      2f733cad
    • M
      leds: lp5523: restore legacy device attributes · 45e611bf
      Milo Kim 提交于
      git commit db6eaf83
      (leds-lp5523: use generic firmware interface) causes an application conflict.
      This interface should be maintained for compatibility.
      
      Restored device attributes are 'engineN_mode', 'engineN_load' and
      'engineN_leds'. (N = 1, 2 or 3)
      A 'selftest' attribute macro is replaced with LP55xx common macro.
      Those are accessed when a LED pattern is run by an application.
      
      Use a mutex in lp5523_update_program_memory()
      : This function is called when an user-application writes a 'engineN_load' file
      or pattern data is loaded from generic firmware interface.
      So, writing program memory should be protected.
      If an error occurs on accessing this area, just it returns as -EINVAL quickly.
      This error code is exact same as old driver function, lp5523_do_store_load()
      because it should be kept for an user-application compatibility.
      Even the driver is changed, we can use the application without re-compiling
      sources.
      Reported-by: NPali Rohár <pali.rohar@gmail.com>
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      45e611bf
    • M
      leds: lp5523: LED MUX configuration on initializing · 22460438
      Milo Kim 提交于
      LED MUX start and stop address should be updated in the program memory
      on LP5523 initialization.
      LED pattern doesn't work without additional MUX address configuration.
      This handling is done by new function, lp5523_init_program_engine().
      Eventually, it's called during device initialization, lp5523_post_init_device().
      
      This is a conflict after git commit 632418bf
      (leds-lp5523: clean up lp5523_configure()).
      So it should be fixed.
      
      Cc: Pali Rohár <pali.rohar@gmail.com>
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      22460438
    • M
      leds: lp5523: make separate API for loading engine · b9e1730b
      Milo Kim 提交于
      lp5523_load_engine()
        It is called whenever the operation mode is changed to 'load'.
        It is used for simple operation mode change.
        It will be used when engine mode and LED selection is updated in later patch.
      
      lp5523_load_engine_and_select_page()
        Change the operation mode to 'load' and select program page number.
        This is used for programming a LED pattern at a time.
        So load_engine() is replaced with new API, load_engine_and_select_page()
        in lp5523_firmware_loaded().
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      b9e1730b
    • J
      leds: use dev_get_platdata() · 87aae1ea
      Jingoo Han 提交于
      Use the wrapper function for retrieving the platform data instead of
      accessing dev->platform_data directly.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      87aae1ea
  12. 21 6月, 2013 2 次提交
  13. 07 2月, 2013 23 次提交