28 Aug, 2015

1 commit

  • 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
    Cc: linux-leds@vger.kernel.org
    Signed-off-by: Milo Kim
    Signed-off-by: Jacek Anaszewski

    Milo Kim
     

31 Mar, 2015

1 commit


10 Jan, 2014

1 commit


23 Oct, 2013

1 commit


27 Aug, 2013

2 commits

  • Use the wrapper function for retrieving the platform data instead of
    accessing dev->platform_data directly.

    Signed-off-by: Jingoo Han
    Signed-off-by: Bryan Wu

    Jingoo Han
     
  • LP8501 can drive up to 9 channels like LP5523.
    LEDs can be controlled directly via the I2C and programmable engines are
    supported.

    LP55xx common driver
    LP8501 is one of LP55xx family device, so LP55xx common code are used.
    Chip specific data is defined in the structure, 'lp55xx_device_config'.

    Differences between LP8501 and LP5523
    Different register layout for LED output control and others.
    LP8501 specific feature for separate output power selection.
    LP8501 doesn't support external clock detection.
    Different programming engine data.

    LP8501 specific feature - output power selection
    Output channels are selected by power selection - Vout or Vdd.
    Separate power for VDD1-6 and VDD7-9 are available.
    It is configurable in the platform data.
    To support this feature, LP55xx DT structure and header are changed.
    Device tree binding is updated as well.

    LED pattern data
    Example pattern data is updated in the driver documentation.

    Signed-off-by: Milo Kim
    Signed-off-by: Bryan Wu

    Kim, Milo