1. 15 9月, 2016 1 次提交
    • V
      leds: add driver for Mellanox systems LEDs · be4fdf99
      Vadim Pasternak 提交于
      This makes it possible to create a set of LEDs for Mellanox systems:
      "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
      "msb7800", "msn2740", "msn2100".
      
      Driver obtains LED devices according to system configuration, provided
      through system DMI data, like mlxcpld:fan1:green, mlxcpld:fan1:red and
      creates devices in form: "devicename:colour:function".
      
      LED setting is controlled through on board CPLD Lattice device.
      For setting particular LED off, solid, blink:
      echo 0 > /sys/class/leds/mlxcpld\:status\:green/brightness
      echo 1 > /sys/class/leds/mlxcpld\:status\:green/brightness
      echo timer > /sys/class/leds/mlxcpld\:status\:green/trigger
      
      On module probing all LEDs are set green, on removing - off.
      
      Last setting overwrites previous, f.e. sequence for
      changing LED from green - red - green:
      echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness
      echo 1 > /sys/class/leds/mlxcpld\:psu\:red/brightness
      echo 1 > /sys/class/leds/mlxcpld\:psu\:green/brightness
      Note: LEDs cannot be turned on/off simultaneously.
      
      The Kconfig currently controlling compilation of this code is:
      drivers/leds/Kconfig:config LEDS_MLXCPLD
      Signed-off-by: NVadim Pasternak <vadimp@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      be4fdf99
  2. 17 8月, 2016 1 次提交
  3. 15 8月, 2016 1 次提交
    • H
      leds: is31fl319x: 1/3/6/9-channel light effect led driver · 8c40b7d0
      H. Nikolaus Schaller 提交于
      This is a driver for the Integrated Silicon Solution Inc. LED driver
      chips series IS31FL319x. They can drive 1, 3, 6  or up to 9
      LEDs.
      
      Each LED is individually controllable in brightness (through pwm)
      in 256 steps so that RGB LEDs can show any of ca. 16 Mio colors.
      
      The maximum current of the LEDs can be programmed and limited to
      5 .. 40mA through a device tree property.
      
      The chip is connected through I2C and can have one of 4 addresses
      in the range 0x64 .. 0x67 depending on how the AD pin is connected. The
      address is defined by the reg property as usual.
      
      The chip also has a shutdown input which could be connected to a GPIO,
      but this driver uses software shutdown if all LEDs are inactivated.
      
      The chip also has breathing and audio features which are not fully
      supported by this driver.
      
      Tested-on: OMAP5 based Pyra handheld prototype.
      Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com>
      Signed-off-by: NAndrey Utkin <andrey_utkin@fastmail.com>
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      8c40b7d0
  4. 18 7月, 2016 1 次提交
  5. 14 3月, 2016 1 次提交
    • D
      leds: Add driver for the ISSI IS31FL32xx family of LED controllers · 9d7cffaf
      David Rivshin 提交于
      The IS31FL32xx family of LED controllers are I2C devices with multiple
      constant-current channels, each with independent 256-level PWM control.
      
      Datasheets: http://www.issi.com/US/product-analog-fxled-driver.shtml
      
      This has been tested on the IS31FL3236 and IS31FL3216, on an ARM
      (TI am335x) platform.
      
      The programming paradigm of these devices is similar in the following
      ways:
       - All registers are 8 bit
       - All LED control registers are write-only
       - Each LED channel has a PWM register (0-255)
       - PWM register writes are shadowed until an Update register is poked
       - All have a concept of Software Shutdown, which disables output
      
      However, there are some differences in devices:
       - 3236/3235 have a separate Control register for each LED,
         (3218/3216 pack the enable bits into fewer registers)
       - 3236/3235 have a per-channel current divisor setting
       - 3236/3235 have a Global Control register that can turn off all LEDs
       - 3216 is unique in a number of ways
          - OUT9-OUT16 can be configured as GPIOs instead of LED controls
          - LEDs can be programmed with an 8-frame animation, with
            programmable delay between frames
          - LEDs can be modulated by an input audio signal
          - Max output current can be adjusted from 1/4 to 2x globally
          - Has a Configuration register instead of a Shutdown register
      
      This driver currently only supports the base PWM control function
      of these devices. The following features of these devices are not
      implemented, although it should be possible to add them in the future:
       - All devices are capable of going into a lower-power "software
         shutdown" mode.
       - The is31fl3236 and is31fl3235 can reduce the max output current
         per-channel with a divisor of 1, 2, 3, or 4.
       - The is31fl3216 can use some LED channels as GPIOs instead.
       - The is31fl3216 can animate LEDs in hardware.
       - The is31fl3216 can modulate LEDs according to an audio input.
       - The is31fl3216 can reduce/increase max output current globally.
      Signed-off-by: NDavid Rivshin <drivshin@allworx.com>
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      9d7cffaf
  6. 03 11月, 2015 1 次提交
  7. 25 8月, 2015 1 次提交
  8. 20 8月, 2015 1 次提交
    • V
      leds/powernv: Add driver for PowerNV platform · 84ad6e5c
      Vasant Hegde 提交于
      This patch implements LED driver for PowerNV platform using the existing
      generic LED class framework.
      
      PowerNV platform has below type of LEDs:
        - System attention
            Indicates there is a problem with the system that needs attention.
        - Identify
            Helps the user locate/identify a particular FRU or resource in the
            system.
        - Fault
            Indicates there is a problem with the FRU or resource at the
            location with which the indicator is associated.
      
      We register classdev structures for all individual LEDs detected on the
      system through LED specific device tree nodes. Device tree nodes specify
      what all kind of LEDs present on the same location code. It registers
      LED classdev structure for each of them.
      
      All the system LEDs can be found in the same regular path /sys/class/leds/.
      We don't use LED colors. We use LED node and led-types property to form
      LED classdev. Our LEDs have names in this format.
      
              <location_code>:<attention|identify|fault>
      
      Any positive brightness value would turn on the LED and a zero value would
      turn off the LED. The driver will return LED_FULL (255) for any turned on
      LED and LED_OFF (0) for any turned off LED.
      
      The platform level implementation of LED get and set state has been
      achieved through OPAL calls. These calls are made available for the
      driver by exporting from architecture specific codes.
      Signed-off-by: NVasant Hegde <hegdevasant@linux.vnet.ibm.com>
      Signed-off-by: NAnshuman Khandual <khandual@linux.vnet.ibm.com>
      Acked-by: NStewart Smith <stewart@linux.vnet.ibm.com>
      Tested-by: NStewart Smith <stewart@linux.vnet.ibm.com>
      Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      84ad6e5c
  9. 26 5月, 2015 2 次提交
  10. 05 5月, 2015 4 次提交
  11. 31 3月, 2015 1 次提交
  12. 27 1月, 2015 1 次提交
    • J
      leds: Add LED Flash class extension to the LED subsystem · 7aea8389
      Jacek Anaszewski 提交于
      Some LED devices support two operation modes - torch and flash.
      This patch provides support for flash LED devices in the LED subsystem
      by introducing new sysfs attributes and kernel internal interface.
      The attributes being introduced are: flash_brightness, flash_strobe,
      flash_timeout, max_flash_timeout, max_flash_brightness, flash_fault,
      flash_sync_strobe and available_sync_leds. All the flash related
      features are placed in a separate module.
      
      The modifications aim to be compatible with V4L2 framework requirements
      related to the flash devices management. The design assumes that V4L2
      sub-device can take of the LED class device control and communicate
      with it through the kernel internal interface. When V4L2 Flash sub-device
      file is opened, the LED class device sysfs interface is made
      unavailable.
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Acked-by: NKyungmin Park <kyungmin.park@samsung.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      7aea8389
  13. 20 11月, 2014 1 次提交
  14. 26 9月, 2014 1 次提交
  15. 24 9月, 2014 1 次提交
  16. 24 7月, 2014 1 次提交
  17. 09 7月, 2014 1 次提交
  18. 08 5月, 2014 1 次提交
  19. 28 3月, 2014 1 次提交
  20. 23 10月, 2013 1 次提交
  21. 27 8月, 2013 2 次提交
    • R
      leds-pca9633: Rename to leds-pca963x · 56a1740c
      Ricardo Ribalda Delgado 提交于
      The driver now supports the chips pca9633 and pca9634, therefore we
      rename the files to more generic and meaningul names
      Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      56a1740c
    • K
      leds: support new LP8501 device - another LP55xx common · 33b3a561
      Kim, Milo 提交于
      LP8501 can drive up to 9 channels like LP5523.
      LEDs can be controlled directly via the I2C and programmable engines are
      supported.
      
      LP55xx common driver
       LP8501 is one of LP55xx family device, so LP55xx common code are used.
       Chip specific data is defined in the structure, 'lp55xx_device_config'.
      
      Differences between LP8501 and LP5523
       Different register layout for LED output control and others.
       LP8501 specific feature for separate output power selection.
       LP8501 doesn't support external clock detection.
       Different programming engine data.
      
      LP8501 specific feature - output power selection
       Output channels are selected by power selection - Vout or Vdd.
       Separate power for VDD1-6 and VDD7-9 are available.
       It is configurable in the platform data.
       To support this feature, LP55xx DT structure and header are changed.
       Device tree binding is updated as well.
      
      LED pattern data
       Example pattern data is updated in the driver documentation.
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      33b3a561
  22. 22 7月, 2013 1 次提交
  23. 02 4月, 2013 2 次提交
    • K
      leds: move LED trigger drivers into new subdirectory · f07fb521
      Kim, Milo 提交于
      For better driver management, new subdirectory, 'trigger' is created.
      All LED trigger drivers are moved into this directory.
      
      Internal header, 'leds.h' is included in each LED trigger drivers.
      Fix the location of header file, "leds.h" -> "../leds.h" in driver files.
      One exception is here, 'ledtrig-timer.c'.
      There is no need to include 'leds.h'. so '#include "leds.h"' line was removed.
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      f07fb521
    • K
      leds: add new LP5562 LED driver · ff45262a
      Kim, Milo 提交于
      LP5562 can drive up to 4 channels, RGB and White.
      LEDs can be controlled directly via the led class control interface.
      
       LP55xx common driver
        LP5562 is one of LP55xx family device, so LP55xx common code are used.
        On the other hand, chip specific configuration is defined in the structure
        'lp55xx_device_config'
      
       LED pattern data
        LP5562 has also internal program memory which is used for running various LED
        patterns. LP5562 driver supports the firmware interface and the predefined
        pattern data as well.
      
       LP5562 device attributes: 'led_pattern' and 'engine_mux'
        A 'led_pattern' is an index code which runs the predefined pattern data.
        And 'engine_mux' is updated with the firmware interface is activated.
        Detailed description has been updated in the documentation files,
        'leds-lp55xx.txt' and 'leds-lp5562.txt'.
      
       Changes on the header file
        LP5562 configurable definitions are added.
        Pattern RGB data is fixed as constant value.
        (No side effect on other devices, LP5521 or LP5523.)
      
      (cooloney@gmail.com: remove redundant mutex_unlock(). Reported by Dan
      Carpenter <dan.carpenter@oracle.com>)
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      ff45262a
  24. 07 2月, 2013 1 次提交
    • M
      leds-lp55xx: add new common driver for lp5521/5523 · c93d08fa
      Milo(Woogyom) Kim 提交于
       This patch supports basic common driver code for LP5521, LP5523/55231 devices.
      
       ( Driver Structure Data )
      
       lp55xx_led and lp55xx_chip
       In lp55xx common driver, two different data structure is used.
       o lp55xx_led
         control multi output LED channels such as led current, channel index.
       o lp55xx_chip
         general chip control such like the I2C and platform data.
      
       For example, LP5521 has maximum 3 LED channels.
       LP5523/55231 has 9 output channels.
      
       lp55xx_chip for LP5521 ... lp55xx_led #1
                                  lp55xx_led #2
                                  lp55xx_led #3
      
       lp55xx_chip for LP5523 ... lp55xx_led #1
                                  lp55xx_led #2
                                  .
                                  .
                                  lp55xx_led #9
      
       ( Platform Data )
      
       LP5521 and LP5523/55231 have own specific platform data.
       However, this data can be handled with just one platform data structure.
       The lp55xx platform data is declared in the header.
       This structure is derived from leds-lp5521.h and leds-lp5523.h
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      c93d08fa
  25. 13 9月, 2012 1 次提交
  26. 11 9月, 2012 1 次提交
    • G
      leds: Add new LED driver for lm355x chips · b98d13c7
      G.Shark Jeong 提交于
      This driver is a general version for LM355x,lm3554 and lm3556,led chips of TI.
      
      LM3554 :
      The LM3554 is a 2 MHz fixed-frequency synchronous boost
      converter with 1.2A dual high side led drivers.
      Datasheet: www.ti.com/lit/ds/symlink/lm3554.pdf
      
      LM3556 :
      The LM3556 is a 4 MHz fixed-frequency synchronous boost
      converter plus 1.5A constant current driver for a high-current white LED.
      Datasheet: www.national.com/ds/LM/LM3556.pdf
      
      (bryan.wu@canonical.com: use flush_work() to replace flush_work_sync() which is
      deprecated)
      Signed-off-by: NG.Shark Jeong <gshark.jeong@gmail.com>
      Signed-off-by: NBryan Wu <bryan.wu@canonical.com>
      b98d13c7
  27. 31 7月, 2012 1 次提交
  28. 26 7月, 2012 1 次提交
    • K
      leds: add new lp8788 led driver · eb80411b
      Kim, Milo 提交于
      TI LP8788 PMU has the current sink as the keyboard led driver.
      The brightness is controlled by the i2c commands.
      Configurable parameters can be defined in the platform side.
      
      Patch v2.
      (a) use workqueue on changing the brightness
      
      (b) use mutex_lock/unlock when the brightness is set
          and the led block of lp8788 device is enabled
      
      (c) remove err_dev on _probe()
          : just return as returned value if any errors
      
      (d) replace module_init/exit() with module_platform_driver()
      
      (e) add led configuration structure and loading them by default
          if platform data is null
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NBryan Wu <bryan.wu@canonical.com>
      eb80411b
  29. 24 7月, 2012 3 次提交
  30. 30 5月, 2012 3 次提交
    • J
      leds: add LM3533 LED driver · 401dea7f
      Johan Hovold 提交于
      Add sub-driver for the LEDs on National Semiconductor / TI LM3533 lighting
      power chips.
      
      The chip provides 256 brightness levels, hardware accelerated blinking as
      well as ambient-light-sensor and pwm input control.
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Rob Landley <rob@landley.net>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      401dea7f
    • S
      leds: add new transient trigger for one shot timer activation · 44e1e9f8
      Shuah Khan 提交于
      The leds timer trigger does not currently have an interface to activate a
      one shot timer.  The current support allows for setting two timers, one
      for specifying how long a state to be on, and the second for how long the
      state to be off.  The delay_on value specifies the time period an LED
      should stay in on state, followed by a delay_off value that specifies how
      long the LED should stay in off state.  The on and off cycle repeats until
      the trigger gets deactivated.  There is no provision for one time
      activation to implement features that require an on or off state to be
      held just once and then stay in the original state forever.
      
      Without one shot timer interface, user space can still use timer trigger
      to set a timer to hold a state, however when user space application
      crashes or goes away without deactivating the timer, the hardware will be
      left in that state permanently.
      
      As a specific example of this use-case, let's look at vibrate feature on
      phones.  Vibrate function on phones is implemented using PWM pins on SoC
      or PMIC.  There is a need to activate one shot timer to control the
      vibrate feature, to prevent user space crashes leaving the phone in
      vibrate mode permanently causing the battery to drain.
      
      This trigger exports three properties, activate, state, and duration When
      transient trigger is activated these properties are set to default values.
      
      - duration allows setting timer value in msecs. The initial value is 0.
      - activate allows activating and deactivating the timer specified by
        duration as needed. The initial and default value is 0.  This will allow
        duration to be set after trigger activation.
      - state allows user to specify a transient state to be held for the specified
        duration.
      Signed-off-by: NShuah Khan <shuahkhan@gmail.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: NeilBrown <neilb@suse.de>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      44e1e9f8
    • D
      leds: driver for DA9052/53 PMIC v2 · 5ba73631
      David Dajun Chen 提交于
      LED Driver for Dialog Semiconductor DA9052/53 PMICs.
      
      [akpm@linux-foundation.org: make led_reg static]
      Signed-off-by: NDavid Dajun Chen <dchen@diasemi.com>
      Signed-off-by: NAshish Jangam <ashish.jangam@kpitcummins.com>
      Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5ba73631