07 Jan, 2012

1 commit

  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

22 Dec, 2011

1 commit

  • The sysdev.h file should not be needed by any in-kernel code, so remove
    the .h file from these random files that seem to still want to include
    it.

    The sysdev code will be going away soon, so this include needs to be
    removed no matter what.

    Cc: Jiandong Zheng
    Cc: Scott Branden
    Cc: Russell King
    Cc: Kukjin Kim
    Cc: David Brown
    Cc: Daniel Walker
    Cc: Bryan Huntsman
    Cc: Ben Dooks
    Cc: Wan ZongShun
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Guan Xuetao
    Cc: "Venkatesh Pallipadi
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Grant Likely
    Cc: Richard Purdie
    Cc: Matthew Garrett
    Signed-off-by: Kay Sievers

    Kay Sievers
     

16 Nov, 2011

1 commit


01 Nov, 2011

2 commits

  • Depending on the implementation of the hardware blinking function in
    blink_set(), the led can support hardware blinking for some values of
    delay_on and delay_off and fall-back to software blinking for some other
    values.

    Turning off the blink_timer unconditionally before starting to blink
    make sure that a sequence like:

    OFF
    hardware blinking
    software blinking
    hardware blinking

    does not leave the software blinking timer active.

    Signed-off-by: Antonio Ospite
    Reviewed-by: Johannes Berg
    Cc: Richard Purdie
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonio Ospite
     
  • When calling the hardware blinking function implemented by blink_set(),
    the delay_on and delay_off values are not preserved across calls.

    Fix that and make the "timer" trigger work as expected when hardware
    blinking is available.

    BEFORE the fix:
    $ cd /sys/class/leds/someled
    $ echo timer > trigger
    $ cat delay_on delay_off
    0
    0
    $ echo 100 > delay_on
    $ cat delay_on delay_off
    0
    0
    $ echo 100 > delay_off
    $ cat delay_on delay_off
    0
    0

    AFTER the fix:
    $ cd /sys/class/leds/someled
    $ echo timer > trigger
    $ cat delay_on delay_off
    0
    0
    $ echo 100 > delay_on
    $ cat delay_on delay_off
    100
    0
    $ echo 100 > delay_off
    $ cat delay_on delay_off
    100
    100

    Signed-off-by: Antonio Ospite
    Reviewed-by: Johannes Berg
    Cc: Richard Purdie
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonio Ospite
     

25 May, 2011

1 commit

  • By setting initial values blink_delay_on and blink_delay_off in a
    led_classdev struct, this change starts the blinking when the led is
    initialized.

    With this patch, you can initialize blink_delay_on and blink_delay_off in
    led_classdev with default_trigger set to "timer", and the led will start
    up blinking. The current ledtrig-timer implementation ignores any initial
    blink_delay_on/blink_delay_off settings, and requires setting
    blink_delay_on/blink_delay_off (typically from userspace) before the led
    blinks.

    Signed-off-by: Esben Haabendal
    Cc: Richard Purdie
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Esben Haabendal
     

23 Dec, 2010

1 commit

  • When I added led_blink_set I had a typo: the return value of the hw
    offload is a regular error code that is zero when succesful, and in that
    case software emulation should not be used, rather than the other way
    around.

    Signed-off-by: Johannes Berg
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     

12 Nov, 2010

1 commit

  • Currently, blinking LEDs can be awkward because it is not guaranteed that
    all LEDs implement blinking. The trigger that wants it to blink then
    needs to implement its own timer solution.

    Rather than require that, add led_blink_set() API that triggers can use.
    This function will attempt to use hw blinking, but if that fails
    implements a timer for it. To stop blinking again, brightness_set() also
    needs to be wrapped into API that will stop the software blink.

    As a result of this, the timer trigger becomes a very trivial one, and
    hopefully we can finally see triggers using blinking as well because it's
    always easy to use.

    Signed-off-by: Johannes Berg
    Acked-by: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     

26 May, 2010

1 commit


17 Mar, 2010

2 commits

  • If we were to dynamically register/unregister leds and have udev or other
    daemons handle the leds class uevents, we would be notified of the adding of a
    new LED and if the daemon immediately tries to open one of the attributes of
    the led device, it would fail with a "no such file or directory" error since
    this the attributes are not yet created. Fix this by switching attributes to be
    class-wide, such that the driver core will register these attributes with
    device_add_attrs and then emit the kobject_uevent ADD signal.

    Signed-off-by: Fainelli
    Signed-off-by: Richard Purdie

    Florian Fainelli
     
  • As each led device gets registered a kernel message gets printed. In
    an embedded system with a number of leds this can produce a lot
    of output that just looks like noise.

    Change the message type to KERN_DEBUG since it might be useful
    in the dmesg output "after" booting.

    Signed-off-by: H Hartley Sweeten
    Signed-off-by: Richard Purdie

    H Hartley Sweeten
     

16 Dec, 2009

1 commit

  • Makes use of skip_spaces() defined in lib/string.c for removing leading
    spaces from strings all over the tree.

    It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
    text data bss dec hex filename
    64688 584 592 65864 10148 (TOTALS-BEFORE)
    64641 584 592 65817 10119 (TOTALS-AFTER)

    Also, while at it, if we see (*str && isspace(*str)), we can be sure to
    remove the first condition (*str) as the second one (isspace(*str)) also
    evaluates to 0 whenever *str == 0, making it redundant. In other words,
    "a char equals zero is never a space".

    Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
    and found occurrences of this pattern on 3 more files:
    drivers/leds/led-class.c
    drivers/leds/ledtrig-timer.c
    drivers/video/output.c

    @@
    expression str;
    @@

    ( // ignore skip_spaces cases
    while (*str && isspace(*str)) { \(str++;\|++str;\) }
    |
    - *str &&
    isspace(*str)
    )

    Signed-off-by: André Goddard Rosa
    Cc: Julia Lawall
    Cc: Martin Schwidefsky
    Cc: Jeff Dike
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Richard Purdie
    Cc: Neil Brown
    Cc: Kyle McMartin
    Cc: Henrique de Moraes Holschuh
    Cc: David Howells
    Cc:
    Cc: Samuel Ortiz
    Cc: Patrick McHardy
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    André Goddard Rosa
     

06 Apr, 2009

1 commit


09 Jan, 2009

1 commit


08 Jan, 2009

1 commit


21 Oct, 2008

3 commits


17 Oct, 2008

1 commit


21 May, 2008

1 commit

  • There is a race from when a device is created with device_create() and
    then the drvdata is set with a call to dev_set_drvdata() in which a
    sysfs file could be open, yet the drvdata will be NULL, causing all
    sorts of bad things to happen.

    This patch fixes the problem by using the new function,
    device_create_drvdata().

    Cc: Kay Sievers
    Cc: Richard Purdie
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 Apr, 2008

1 commit

  • Some drivers have duplicated unlikely() macros. IS_ERR() already has
    unlikely() in itself.

    This patch cleans up such pointless code.

    Signed-off-by: Hirofumi Nakagawa
    Acked-by: David S. Miller
    Acked-by: Jeff Garzik
    Cc: Paul Clements
    Cc: Richard Purdie
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: James Bottomley
    Cc: Michael Halcrow
    Cc: Anton Altaparmakov
    Cc: Al Viro
    Cc: Carsten Otte
    Cc: Patrick McHardy
    Cc: Paul Mundt
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirofumi Nakagawa
     

25 Apr, 2008

2 commits

  • Some led hardware allows drivers to query the led state, and this patch
    adds a hook to let the led class take advantage of that information when
    available.

    Without this functionality, when access to the led hardware is not
    exclusive (i.e. firmware or hardware might change its state behind the
    kernel's back), reality goes out of sync with the led class' idea of what
    the led is doing, which is annoying at best.

    Behaviour for drivers that do not or cannot read the led status is
    unchanged.

    Signed-off-by: Henrique de Moraes Holschuh
    Signed-off-by: Richard Purdie

    Henrique de Moraes Holschuh
     
  • Disable any active triggers when the brightness attribute is
    set to zero.

    Signed-off-by: Henrique de Moraes Holschuh
    Signed-off-by: Márton Németh
    Signed-off-by: Richard Purdie

    Németh Márton
     

20 Apr, 2008

1 commit

  • After 2.6.24 there was a plan to make the PM core acquire all device
    semaphores during a suspend/hibernation to protect itself from
    concurrent operations involving device objects. That proved to be
    too heavy-handed and we found a better way to achieve the goal, but
    before it happened, we had introduced the functions
    device_pm_schedule_removal() and destroy_suspended_device() to allow
    drivers to "safely" destroy a suspended device and we had adapted some
    drivers to use them. Now that these functions are no longer necessary,
    it seems reasonable to remove them and modify their users to use the
    normal device unregistration instead.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

06 Feb, 2008

1 commit


01 Jan, 2008

1 commit


07 Dec, 2007

1 commit


16 Jul, 2007

1 commit


17 Oct, 2006

1 commit


04 Oct, 2006

1 commit


01 Jul, 2006

1 commit


16 May, 2006

1 commit


01 Apr, 2006

2 commits

  • Add support for LED triggers to the LED subsystem. "Triggers" are events
    which change the state of an LED. Two kinds of trigger are available, simple
    ones which can be added to exising code with minimum disruption and complex
    ones for implementing new or more complex functionality.

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

    Richard Purdie
     
  • 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