01 Nov, 2011

11 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
     
  • 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
     
  • I get the following warning:

    ------------[ cut here ]------------
    WARNING: at drivers/gpio/gpiolib.c:1559 __gpio_get_value+0x90/0x98()
    Modules linked in:
    Call Trace:
    [] dump_stack+0x8/0x34
    [] warn_slowpath_common+0x78/0xa0
    [] __gpio_get_value+0x90/0x98
    [] create_gpio_led+0xdc/0x194
    [] gpio_led_probe+0x290/0x36c
    [] driver_probe_device+0x78/0x1b0
    [] __driver_attach+0xc0/0xc8
    [] bus_for_each_dev+0x64/0xb0
    [] bus_add_driver+0x1c8/0x2a8
    [] driver_register+0x90/0x180
    [] do_one_initcall+0x38/0x160

    ---[ end trace ee38723fbefcd65c ]---

    My GPIOs are on an I2C port expander, so we must use the *_cansleep()
    variant of the GPIO functions. This is was not being done in
    create_gpio_led().

    We can change gpio_get_value() to gpio_get_value_cansleep() because it is
    only called from the platform_driver probe function, which is a context
    where we can sleep.

    Only tested on my gpio_cansleep() system, but it seems safe for all
    systems.

    Signed-off-by: David Daney
    Cc: Richard Purdie
    Acked-by: Trent Piepho
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Daney
     
  • According to the comments in include/linux/init.h:

    "Pointers to __devexit functions must use __devexit_p(function_name), the
    wrapper will insert either the function_name or NULL, depending on the config
    options."

    We have __devexit annotation for lm3530_remove(), so add __devexit_p to
    the `struct i2c_driver'.

    Signed-off-by: Axel Lin
    Cc: Shreshtha Kumar SAHU
    Cc: Richard Purdie
    Acked-by: Linus Walleij
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • 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
     
  • Use the platform_data include directory for the TPU LED driver, as
    suggested by Paul Mundt.

    Signed-off-by: Magnus Damm
    Cc: Paul Mundt
    Cc: Richard Purdie
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     
  • Use a workqueue in the Renesas TPU LED driver to allow the Runtime PM code
    to sleep.

    Signed-off-by: Magnus Damm
    Cc: Paul Mundt
    Cc: Richard Purdie
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     
  • A few new i2c-drivers came into the kernel which clear the
    clientdata-pointer on exit or error. This is obsolete meanwhile, the core
    will do it.

    Signed-off-by: Wolfram Sang
    Cc: Richard Purdie
    Acked-by: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     
  • The memory for struct led_trigger should be kfreed in the
    led_trigger_register() error path. Also this function should return NULL
    on error.

    Signed-off-by: Masakazu Mokuno
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masakazu Mokuno
     
  • Add V2 of the LED driver for a single timer channel for the TPU hardware
    block commonly found in Renesas SoCs.

    The driver has been written with optimal Power Management in mind, so to
    save power the LED is driven as a regular GPIO pin in case of maximum
    brightness and power off which allows the TPU hardware to be idle and
    which in turn allows the clocks to be stopped and the power domain to be
    turned off transparently.

    Any other brightness level requires use of the TPU hardware in PWM mode.
    TPU hardware device clocks and power are managed through Runtime PM.
    System suspend and resume is known to be working - during suspend the LED
    is set to off by the generic LED code.

    The TPU hardware timer is equipeed with a 16-bit counter together with an
    up-to-divide-by-64 prescaler which makes the hardware suitable for
    brightness control. Hardware blink is unsupported.

    The LED PWM waveform has been verified with a Fluke 123 Scope meter on a
    sh7372 Mackerel board. Tested with experimental sh7372 A3SP power domain
    patches. Platform device bind/unbind tested ok.

    V2 has been tested on the DS2 LED of the sh73a0-based AG5EVM.

    [axel.lin@gmail.com: include linux/module.h]
    Signed-off-by: Magnus Damm
    Cc: Paul Mundt
    Cc: Richard Purdie
    Cc: Grant Likely
    Signed-off-by: Axel Lin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     

28 Oct, 2011

1 commit


28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

21 Sep, 2011

1 commit

  • This new driver replaces the old PCEngines Alix 2/3 LED driver with a
    new driver that controls the LEDs through the leds-gpio driver. The
    old driver accessed GPIOs directly, which created a conflict and
    prevented also loading the cs5535-gpio driver to read other GPIOs on
    the Alix board. With this new driver, we hook into leds-gpio which in
    turn uses GPIO to control the LEDs and therefore it's possible to
    control both the LEDs and access onboard GPIOs

    Driver is moved to platform/geode as requested by Grant and any other
    geode initialisation modules should move here also

    This driver is inspired by leds-net5501.c by Alessandro Zummo.

    Ideally, leds-net5501.c should also be moved to platform/geode.
    Additionally the driver relies on parts of the patch: 7f131cf3ed ("leds:
    leds-alix2c - take port address from MSR) by Daniel Mack to perform
    detection of the Alix board.

    [akpm@linux-foundation.org: include module.h]

    Signed-off-by: Ed Wildgoose
    Cc: git@wildgooses.com
    Cc: Alessandro Zummo
    Cc: Daniel Mack
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Richard Purdie
    Reviewed-by: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Thomas Gleixner

    Ed Wildgoose
     

15 Sep, 2011

1 commit

  • Fix regression introduced by commit 5ada28bf7675 ("led-class: always
    implement blinking") which broke sysfs delay handling by not storing the
    updated value. Consequently it was only possible to set one of the delays
    through the sysfs interface as the other delay was automatically restored
    to it's default value. Reading the parameters always gave the defaults.

    Signed-off-by: Johan Hovold
    Acked-by: Florian Fainelli
    Acked-by: Richard Purdie
    Cc: [2.6.37+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     

26 Aug, 2011

2 commits


26 Jul, 2011

4 commits

  • Provide the support for auto calibration of ALS Zone boundaries based on
    min/max ALS input voltage.

    Signed-off-by: Shreshtha Kumar Sahu
    Signed-off-by: Linus Walleij
    Cc: Richard Purdie
    Cc: Lee Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shreshtha Kumar Sahu
     
  • We call led_classdev_register/led_classdev_unregister in
    create_netxbig_led/delete_netxbig_led, thus make LEDS_NETXBIG depend on
    LEDS_CLASS.

    This patch fixes below build error if LEDS_CLASS is not configured.

    LD .tmp_vmlinux1
    drivers/built-in.o: In function `create_netxbig_led':
    drivers/leds/leds-netxbig.c:350: undefined reference to `led_classdev_register'
    drivers/leds/leds-netxbig.c:361: undefined reference to `led_classdev_unregister'
    drivers/built-in.o: In function `delete_netxbig_led':
    drivers/leds/leds-netxbig.c:313: undefined reference to `led_classdev_unregister'

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Acked-by: Simon Guinot
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • - return -ENOMEM if kzalloc fails, rather than the current -EINVAL

    - fix a memory leak in the case of goto out_unregister_led_cdevs

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Tag the and remove() function as __devexit respectively.

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

    Linus Walleij
     

23 Jul, 2011

1 commit

  • * 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: (61 commits)
    gpio/mxc/mxs: fix build error introduced by the irq_gc_ack() renaming
    mcp23s08: add i2c support
    mcp23s08: isolate spi specific parts
    mcp23s08: get rid of setup/teardown callbacks
    gpio/tegra: dt: add binding for gpio polarity
    mcp23s08: remove unused work queue
    gpio/da9052: remove a redundant assignment for gpio->da9052
    gpio/mxc: add device tree probe support
    ARM: mxc: use ARCH_NR_GPIOS to define gpio number
    gpio/mxc: get rid of the uses of cpu_is_mx()
    gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables
    gpio: Move mpc5200 gpio driver to drivers/gpio
    GPIO: DA9052 GPIO module v3
    gpio/tegra: Use engineering names in DT compatible property
    of/gpio: Add new method for getting gpios under different property names
    gpio/dt: Refine GPIO device tree binding
    gpio/ml-ioh: fix off-by-one for displaying variable i in dev_err
    gpio/pca953x: Deprecate meaningless device-tree bindings
    gpio/pca953x: Remove dynamic platform data pointer
    gpio/pca953x: Fix IRQ support.
    ...

    Linus Torvalds
     

09 Jul, 2011

1 commit

  • This driver handles the variants pca9530-pca9533, so it chose the name
    "pca953x". However, there is a gpio driver which decided on the same
    name. As a result, those two can't be loaded at the same time. Add a
    subsystem prefix to make the driver name unique. Device matching will not
    suffer, because both are I2C drivers which match using a
    i2c_device_id-table which is not altered.

    Signed-off-by: Wolfram Sang
    Acked-by: Jean Delvare
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     

28 Jun, 2011

2 commits

  • Fix this section mismatch:

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

    Fixing this one 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
     
  • 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
     

16 Jun, 2011

3 commits

  • Seems when a config option does not have a dependency of the menuconfig,
    it messes the display of the rest configs, even if it's a hidden one.

    Signed-off-by: Eric Miao
    Cc: Richard Purdie
    Cc: Valdis Kletnieks
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Miao
     
  • Commit 4440673a95e6 ("leds: provide helper to register "leds-gpio"
    devices") broke the display of the NEW_LEDS menu as it didn't depend on
    NEW_LEDS and so made "LED drivers" and "LED Triggers" appear at the same
    level as "LED Support" instead of below it as it was before 4440673a.

    Moving LEDS_GPIO_REGISTER out of the menuconfig NEW_LEDS fixes this
    unintended side effect.

    Reported-by: Axel Lin
    Signed-off-by: Uwe Kleine-König
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • We call led_classdev_unregister/led_classdev_register in
    asic3_led_remove/asic3_led_probe, thus make LEDS_ASIC3 depend on
    LEDS_CLASS.

    This patch fixes below build error if LEDS_CLASS is not configured.

    LD .tmp_vmlinux1
    drivers/built-in.o: In function `asic3_led_remove':
    clkdev.c:(.devexit.text+0x1860): undefined reference to `led_classdev_unregister'
    drivers/built-in.o: In function `asic3_led_probe':
    clkdev.c:(.devinit.text+0xcee8): undefined reference to `led_classdev_register'
    make: *** [.tmp_vmlinux1] Error 1

    Signed-off-by: Axel Lin
    Cc: Paul Parsons
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

04 Jun, 2011

1 commit


27 May, 2011

3 commits

  • Add LED support for the HTC ASIC3. Underlying support is provided by the mfd/asic3 and leds/leds-asic3 drivers. An example configuration is provided by the pxa/hx4700 platform.

    Signed-off-by: Paul Parsons
    Signed-off-by: Samuel Ortiz

    Paul Parsons
     
  • With the addition of a platform device mfd_cell pointer, MFD drivers
    can go back to passing platform back to their sub drivers.
    This allows for an mfd_cell->mfd_data removal and thus keep the
    sub drivers MFD agnostic. This is mostly needed for non MFD aware
    sub drivers.

    Cc: Mark Brown
    Cc: Liam Girdwood
    Cc: Richard Purdie
    Acked-by: Haojian Zhuang
    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     
  • With the addition of a platform device mfd_cell pointer, MFD drivers
    can go back to passing platform data back to their sub drivers.
    This allows for an mfd_cell->mfd_data removal and thus keep the
    sub drivers MFD agnostic. This is mostly needed for non MFD aware
    sub drivers.

    Cc: Mark Brown
    Cc: Liam Girdwood
    Acked-by: Uwe Kleine-König
    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     

25 May, 2011

6 commits

  • This function makes a deep copy of the platform data to allow it to live
    in init memory. For a kernel that supports several machines and so
    includes the definition for several leds-gpio devices this saves quite
    some memory because all but one definition can be free'd after boot.

    As the function is used by arch code it must be builtin and so cannot go
    into leds-gpio.c.

    [akpm@linux-foundation.org: s/CONFIG_LED_REGISTER_GPIO/CONFIG_LEDS_REGISTER_GPIO/]
    Signed-off-by: Uwe Kleine-König
    Cc: Russell King
    Acked-by: Richard Purdie
    Cc: Fabio Estevam
    Cc: Sascha Hauer
    Tested-by: H Hartley Sweeten
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • Add add regulator support to lm3530 driver. The lm3530 driver needs to
    get proper regulator during device probe and enable it before accessing
    the device. Also it disables the regulator in case of brightness ==
    LED_OFF, and puts it back during driver removal.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Shreshtha Kumar Sahu
    Cc: Lee Jones
    Cc: Shreshtha Kumar Sahu
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shreshtha Kumar Sahu
     
  • The H1940 machine now uses leds-gpio and leds-h1940 has no users anymore.

    Signed-off-by: Vasily Khoruzhick
    Cc: "Arnaud Patard (Rtp)"
    Cc: Ben Dooks
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vasily Khoruzhick
     
  • The pca953x family are only different in number of leds and register
    layout Adding chipinfo to use driver with whole pca953x family Rename
    driver to pca953x, but left files and platformflags named pca9532.

    Tested with pca9530 and pca9533

    Tested-by: Juergen Kilb
    Signed-off-by: Jan Weitzel
    Acked-by: Joachim Eastwood
    Tested-by: Joachim Eastwood
    Cc: Wolfram Sang
    Cc: H Hartley Sweeten
    Cc: Richard Purdie
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Weitzel
     
  • Allow unused leds on pca9532 to be used as gpio. The board I am working
    on now has no less than 6 pca9532 chips. One chips is used for only leds,
    one has 14 leds and 2 gpio and the rest of the chips are gpio only.

    There is also one board in mainline which could use this capabilty;
    arch/arm/mach-iop32x/n2100.c
    232 { .type = PCA9532_TYPE_NONE }, /* power OFF gpio */
    233 { .type = PCA9532_TYPE_NONE }, /* reset gpio */

    This patch defines a new pin type, PCA9532_TYPE_GPIO, and registers a
    gpiochip if any pin has this type set. The gpio will registers all chip
    pins but will filter on gpio_request.

    [randy.dunlap@oracle.com: fix build when GPIOLIB is not enabled]
    Signed-off-by: Joachim Eastwood
    Reviewed-by: Wolfram Sang
    Reviewed-by: H Hartley Sweeten
    Cc: Richard Purdie
    Cc: Grant Likely
    Signed-off-by: Randy Dunlap
    Cc: Jan Weitzel
    Cc: Juergen Kilb
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joachim Eastwood
     
  • 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
     

24 May, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    b43: fix comment typo reqest -> request
    Haavard Skinnemoen has left Atmel
    cris: typo in mach-fs Makefile
    Kconfig: fix copy/paste-ism for dell-wmi-aio driver
    doc: timers-howto: fix a typo ("unsgined")
    perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
    md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
    treewide: fix a few typos in comments
    regulator: change debug statement be consistent with the style of the rest
    Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
    audit: acquire creds selectively to reduce atomic op overhead
    rtlwifi: don't touch with treewide double semicolon removal
    treewide: cleanup continuations and remove logging message whitespace
    ath9k_hw: don't touch with treewide double semicolon removal
    include/linux/leds-regulator.h: fix syntax in example code
    tty: fix typo in descripton of tty_termios_encode_baud_rate
    xtensa: remove obsolete BKL kernel option from defconfig
    m68k: fix comment typo 'occcured'
    arch:Kconfig.locks Remove unused config option.
    treewide: remove extra semicolons
    ...

    Linus Torvalds
     

18 May, 2011

1 commit