11 Jan, 2012

1 commit

  • Factor out some boilerplate code for i2c driver registration
    into module_i2c_driver.

    Signed-off-by: Axel Lin
    Cc: Haojian Zhuang
    Cc: Mark Brown
    Cc: Richard Purdie
    Cc: Michael Hennerich
    Cc: Mike Rapoport
    Cc: Guennadi Liakhovetski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

01 Nov, 2011

2 commits

  • Make sure that the reset is successful by issuing a dummy read to R
    channel current register and check its default value. On some platforms,
    without this dummy read, any further access to {R/G/B}_EXEC will not have
    any impact.

    [akpm@linux-foundation.org: fix up code comment]
    Signed-off-by: srinidhi kasagar
    Tested-by: Naga Radhesh
    Acked-by: Linus Walleij
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Srinidhi KASAGAR
     
  • If lp5521_read fails, engine_state variable is not initialized.
    If lp5521_read fails, we should return error.
    This patch fixes below warning.

    CC drivers/leds/leds-lp5521.o
    drivers/leds/leds-lp5521.c: In function 'lp5521_set_engine_mode':
    drivers/leds/leds-lp5521.c:168: warning: 'engine_state' may be used uninitialized in this function

    [akpm@linux-foundation.org: remove unneeded "ret |="]
    Signed-off-by: Axel Lin
    Cc: Samu Onkalo
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

26 Jul, 2011

1 commit


28 Jun, 2011

1 commit

  • Fix this section mismatch:

    WARNING: drivers/leds/leds-lp5521.o(.text+0xf2c): Section mismatch in reference from the function lp5521_probe() to the function .init.text:lp5521_init_led()
    The function lp5521_probe() references
    the function __init lp5521_init_led().
    This is often because lp5521_probe lacks a __init
    annotation or the annotation of lp5521_init_led is wrong.

    Fixing this mismatch triggers one more mismatch, fix that one as well.

    Signed-off-by: Ralf Baechle
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     

23 Mar, 2011

1 commit


14 Jan, 2011

3 commits

  • Currently the led device name is fetched from the device_type in
    I2C_BOARD_INFO which comes from the platform data. This name is in turn
    used to create an entry in sysfs.

    If there exists two or more lp5521 on a particular platform, the
    device_type in I2C_BOARD_INFO has to be the same, else lp5521 driver probe
    wont be called and if used so, results in run time warning "cannot create
    sysfs with same name" and hence a failure.

    The name that is used to create sysfs entry is to be passed by the struct
    led_platform_data. Hence adding an element of type const char * and
    change in lp5521 driver to use this name in creating the led device if
    present else use the name obtained by I2C_BOARD_INFO.

    Signed-off-by: Arun Murthy
    Acked-by: Samu Onkalo
    Cc: Ilkka Koskinen
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Murthy
     
  • Driver contained possibility for circular locking.

    One lock is held by sysfs-core and another one by the driver itself. This
    happened when the driver created or removed sysfs entries dynamically.
    There is no real need to do those operations. Now all the sysfs entries
    are created at probe and removed at removal. Engine load sysfs entries
    are now visible all the time. However, access to the entries fails if the
    engine is disabled or running.

    Signed-off-by: Samu Onkalo
    Cc: Arun Murthy
    Reviewed-by: Ilkka Koskinen
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • The code doesn't check first sscanf() return value. If first sscanf()
    failed then c contains some garbage. It might lead to reading
    uninitialised stack data in the second sscanf() call.

    Signed-off-by: Vasiliy Kulikov
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vasiliy Kulikov
     

25 Nov, 2010

3 commits


12 Nov, 2010

1 commit

  • This patchset provides support for LP5521 and LP5523 LED driver chips from
    National Semicondutor. Both drivers supports programmable engines and
    naturally LED class features.

    Documentation is provided as a part of the patchset. I created "leds"
    subdirectory under Documentation. Perhaps the rest of the leds*
    documentation should be moved there.

    Datasheets are freely available at National Semiconductor www pages.

    This patch:

    LP5521 chip is three channel led driver with programmable engines. Driver
    provides support for that chip for direct access via led class or via
    programmable engines.

    Signed-off-by: Samu Onkalo
    Cc: Richard Purdie
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo