04 Oct, 2008

2 commits

  • Check the return value of led_classdev_register and unregister all
    registered devices, if registering one device fails. Also the dynamic
    memory handling is totally bogus. You can't allocate multiple chunks via
    kzalloc() and expect them to be in order later. I wonder how this ever
    worked.

    Signed-off-by: Sven Wegener
    Acked-by: Nate Case
    Tested-by: Nate Case
    Acked-by: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sven Wegener
     
  • On initialization, we first do the ioremap and then register the led devices.
    On deinitialization, we do it in reverse order. This prevents someone calling
    into the brightness_set functions with an invalid latch_address.

    Signed-off-by: Sven Wegener
    Acked-by: Rod Whitby
    Acked-by: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sven Wegener
     

07 Aug, 2008

3 commits


23 Jul, 2008

5 commits

  • Make sure led->trigger is valid before calling trigger->activate

    Signed-off-by: Dmitry Baryshkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Richard Purdie

    Dmitry Baryshkov
     
  • This driver supports the PCA9550, PCA9551, PCA9552, and PCA9553
    LED driver chips.

    Signed-off-by: Nate Case
    Signed-off-by: Andrew Morton
    Signed-off-by: Richard Purdie

    Nate Case
     
  • Fixes the following sparse errors:
    drivers/leds/leds-h1940.c:26:6: warning: symbol 'h1940_greenled_set' was not declared. Should it be static?
    drivers/leds/leds-h1940.c:55:6: warning: symbol 'h1940_redled_set' was not declared. Should it be static?
    drivers/leds/leds-h1940.c:85:6: warning: symbol 'h1940_blueled_set' was not declared. Should it be static?

    Signed-off-by: Ben Dooks
    Signed-off-by: Richard Purdie

    Ben Dooks
     
  • Fix an unsigned value overflow in the error handling code in the
    Atmel PWM driver.

    Signed-off-by: Li Zefan
    Signed-off-by: Richard Purdie

    Li Zefan
     
  • NXP pca9532 is a LED dimmer/controller attached to i2c bus. It allows
    attaching upto 16 leds which can either be on, off or dimmed and/or blinked
    with the two PWM modulators available.

    This driver is a "new-style" i2c driver that adheres to the driver model and
    implements the led framework api. Since the leds connected to the driver are
    platform specific, it is only useful when platform data is passed to the
    driver to define what leds are connected to which pins.

    Signed-off-by: Riku Voipio
    Signed-off-by: Andrew Morton
    Signed-off-by: Richard Purdie

    Riku Voipio
     

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

7 commits


24 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    iwlwifi: Fix built-in compilation of iwlcore
    net: Unexport move_addr_to_{kernel,user}
    rt2x00: Select LEDS_CLASS.
    iwlwifi: Select LEDS_CLASS.
    leds: Do not guard NEW_LEDS with HAS_IOMEM
    [IPSEC]: Fix catch-22 with algorithm IDs above 31
    time: Export set_normalized_timespec.
    tcp: Make use of before macro in tcp_input.c
    hamradio: Remove unneeded and deprecated cli()/sti() calls in dmascc.c
    [NETNS]: Remove empty ->init callback.
    [DCCP]: Convert do_gettimeofday() to getnstimeofday().
    [NETNS]: Don't initialize err variable twice.
    [NETNS]: The ip6_fib_timer can work with garbage on net namespace stop.
    [IPV4]: Convert do_gettimeofday() to getnstimeofday().
    [IPV4]: Make icmp_sk_init() static.
    [IPV6]: Make struct ip6_prohibit_entry_template static.
    tcp: Trivial fix to correct function name in a comment in net/ipv4/tcp.c
    [NET]: Expose netdevice dev_id through sysfs
    skbuff: fix missing kernel-doc notation
    [ROSE]: Fix soft lockup wrt. rose_node_list_lock

    Linus Torvalds
     

23 Apr, 2008

1 commit

  • The LEDS infrastructure itself does not require anything
    that a platform dependant upon HAS_IOMEM.

    The individual drivers do, but they are properly guarded
    with the necessary platform dependencies.

    One can even imagine a hypervisor based LED driver that
    a platform without HAS_IOMEM might have.

    Signed-off-by: David S. Miller

    David S. Miller
     

22 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
    SCSI: convert struct class_device to struct device
    DRM: remove unused dev_class
    IB: rename "dev" to "srp_dev" in srp_host structure
    IB: convert struct class_device to struct device
    memstick: convert struct class_device to struct device
    driver core: replace remaining __FUNCTION__ occurrences
    sysfs: refill attribute buffer when reading from offset 0
    PM: Remove destroy_suspended_device()
    Firmware: add iSCSI iBFT Support
    PM: Remove legacy PM (fix)
    Kobject: Replace list_for_each() with list_for_each_entry().
    SYSFS: Explicitly include required header file slab.h.
    Driver core: make device_is_registered() work for class devices
    PM: Convert wakeup flag accessors to inline functions
    PM: Make wakeup flags available whenever CONFIG_PM is set
    PM: Fix misuse of wakeup flag accessors in serial core
    Driver core: Call device_pm_add() after bus_add_device() in device_add()
    PM: Handle device registrations during suspend/resume
    block: send disk "change" event for rescan_partitions()
    sysdev: detect multiple driver registrations
    ...

    Fixed trivial conflict in include/linux/memory.h due to semaphore header
    file change (made irrelevant by the change to mutex).

    Linus Torvalds
     

20 Apr, 2008

3 commits

  • 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
     
  • Russell King
     
  • Russell King
     

19 Apr, 2008

2 commits


16 Apr, 2008

1 commit

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform
    modalias is prefixed with "platform:". Add MODULE_ALIAS() to the
    hotpluggable platform LED drivers, to re-enable auto loading.

    [dbrownell@users.sourceforge.net: more drivers, registration fixes]
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Acked-by: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

01 Apr, 2008

2 commits


09 Feb, 2008

1 commit

  • This is a LED driver using the PWM on newer SOCs from Atmel; brightness is
    controlled by changing the PWM duty cycle. So for example if you've set up
    two leds labeled "pwm0" and "pwm1":

    echo 0 > /sys/class/leds/pwm2/brightness # off (0%)
    echo 80 > /sys/class/leds/pwm2/brightness
    echo 255 > /sys/class/leds/pwm2/brightness # on (100%)

    Note that "brightness" here isn't linear; maybe that should change. Going
    from 4 to 8 probably doubles perceived brightness, while 244 to 248 is
    imperceptible.

    This is mostly intended to be a simple example of PWM, although it's
    realistic since LCD backlights are often driven with PWM to conserve
    battery power (and offer brightness options).

    Signed-off-by: David Brownell
    Signed-off-by: Haavard Skinnemoen
    Cc: Richard Purdie
    Cc: Andrew Victor
    Cc: Nicolas Ferre
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

07 Feb, 2008

8 commits


06 Feb, 2008

1 commit