11 Sep, 2012

1 commit


24 Jul, 2012

5 commits

  • drivers/leds/led-core.c:56:6: sparse: symbol 'led_blink_setup' was not declared. Should it be static?
    drivers/leds/led-triggers.c:233:6: sparse: symbol 'led_trigger_blink_setup' was not declared. Should it be static?

    Reported-by: Fengguang Wu
    Signed-off-by: Bryan Wu

    Bryan Wu
     
  • Rename leds external interface led_brightness_set() to led_set_brightness().
    This is the second phase of the change to reduce confusion between the
    leds internal and external interfaces that set brightness. With this change,
    now the external interface is led_set_brightness(). The first phase renamed
    the internal interface led_set_brightness() to __led_set_brightness().
    There are no changes to the interface implementations.

    Signed-off-by: Shuah Khan
    Signed-off-by: Bryan Wu

    Shuah Khan
     
  • Rename leds internal interface led_set_brightness() to __led_set_brightness()
    to reduce confusion between led_set_brightness() and the external interface
    led_brightness_set(). led_brightness_set() cancels the timer and then calls
    led_set_brightness().

    Signed-off-by: Shuah Khan
    Signed-off-by: Bryan Wu

    Shuah Khan
     
  • Move led_stop_software_blink() code into led_brightness_set() to ensure
    software blink timer is stopped and cleared when changing trigger.

    Also use led_set_brightness() instead of calling
    led_cdev->brightness_set() directly to keep led_cdev->brightness
    consistent with current LED status.

    This ensure proper cleaning when changing triggers, as without this fix
    a LED may be turned off while leaving it's led_cdev->brightness = 1,
    leading to an erratic software-blink behaviour.

    The problem was easy to reproduce by changing the trigger from "timer"
    to "oneshot".

    Signed-off-by: Fabio Baltieri
    Signed-off-by: Bryan Wu

    Fabio Baltieri
     
  • Add two new functions, led_blink_set_oneshot and
    led_trigger_blink_oneshot, to be used by triggers for one-shot blink of
    led devices.

    This is implemented extending the existing software-blink code, and uses
    the same timer and handler function.

    The behavior of the code is to do a blink-on, blink-off sequence when
    the function is called, ignoring other calls until the sequence is
    completed so that the leds keep blinking at constant rate if the
    functions are called repeatedly.

    This is meant to be used by drivers which needs to trigger on sporadic
    event, but doesn't have clear busy/idle trigger points.

    After the blink sequence the led remains off. This behavior can be
    inverted setting the "invert" argument, which blink the led off, than on
    and leave the led on after the sequence.

    (bryan.wu@canonical.com: rebase to commit 'leds: don't disable blinking
    when writing the same value to delay_on or delay_off')

    Signed-off-by: Fabio Baltieri
    Acked-by: Shuah Khan
    Signed-off-by: Bryan Wu

    Fabio Baltieri
     

12 Jun, 2012

1 commit

  • Function led_set_software_blink() assumes that blink timer is still running,
    but commit 488bc35bf40df89d37486c1826b178a2fba36ce7 introduced disabling
    of blink timer before each call to led_set_software_blink().

    Correct led_software_blink():
    1) remove protection against reprogramming blink timer to the same values,
    because it only disables blinking now,
    2) remove unnecessary call to led_stop_software_blink().

    Signed-off-by: Rafal Prylowski
    Cc: Richard Purdie
    Signed-off-by: Bryan Wu

    Rafal Prylowski
     

24 Mar, 2012

1 commit


25 Apr, 2008

1 commit

  • Break the lines which were more than 80 characters into more
    lines; replace SPACEs with TABs; correct ident at switch-case;
    change character encoding from ISO-8859-2 to UTF-8.

    The order of the functions in led-triggers.c changed in order
    the similar functions can still be together under titles
    "Used by LED Class", "LED Trigger Interface" and "Simple
    LED Tigger Interface" as was grouped before when exported
    with EXPORT_SYMBOL.

    Signed-off-by: Márton Németh
    Signed-off-by: Richard Purdie

    Németh Márton
     

01 Jan, 2008

1 commit


28 Jun, 2006

1 commit

  • locking init cleanups:

    - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK()
    - convert rwlocks in a similar manner

    this patch was generated automatically.

    Motivation:

    - cleanliness
    - lockdep needs control of lock initialization, which the open-coded
    variants do not give
    - it's also useful for -rt and for lock debugging in general

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

01 Apr, 2006

1 commit

  • Add the foundations of a new LEDs subsystem. This patch adds a class which
    presents LED devices within sysfs and allows their brightness to be
    controlled.

    Signed-off-by: Richard Purdie
    Cc: Russell King
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie