1. 02 4月, 2013 2 次提交
    • K
      leds: add camera LED triggers · 48a1d032
      Kim, Milo 提交于
      Some LED devices support flash/torch functionality through the LED subsystem.
      This patch enables direct LED trigger controls by the driver.
      Flash on/off and torch on/off can be done simply by other driver space.
      Two trigger APIs are added, ledtrig_flash_ctrl() and ledtrig_torch_ctrl().
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      48a1d032
    • K
      leds: trigger: use inline functions instead of macros · 39f7e08a
      Kim, Milo 提交于
      Macros are used in case that an inline function doesn't work.
      Otherwise, use an empty inline function.
      
      (a) Case of !CONFIG_LEDS_TRIGGERS
      Following macros are replaced with inline functions.
        led_trigger_register_simple()
        led_trigger_unregister_simple()
        led_trigger_event()
      To make inline types, the structure, 'led_trigger' should be defined.
      This structure has no member at all.
      
      (b) Case of !CONFIG_LEDS_TRIGGER_IDE_DISK
      ledtrig_ide_activity() macro is replaced with an inline function as well.
      
      (c) DEFINE_LED_TRIGGER() and DEFINE_LED_TRIGGER_GLOBAL()
      Struct 'led_trigger' is defined both cases, with CONFIG_LEDS_TRIGGERS and
      without CONFIG_LEDS_TRIGGERS.
      Those macros are moved out of CONFIG_LED_TRIGGERS because of no-dependency
      on CONFIG_LEDS_TRIGGERS.
      
      (d) Fix build errors in mmc-core driver
      After replacing macros with inline functions, following build errors occur.
      (condition: CONFIG_LEDS_TRIGGERS is not set)
      
        drivers/mmc/core/core.c: In function 'mmc_request_done':
        drivers/mmc/core/core.c:164:25: error: 'struct mmc_host' has no member named 'led'
        drivers/mmc/core/core.c: In function 'mmc_start_request':
        drivers/mmc/core/core.c:254:24: error: 'struct mmc_host' has no member named 'led'
        make[3]: *** [drivers/mmc/core/core.o] Error 1
      
      The reason of these errors is non-existent member variable, 'led'.
      It is only valid when CONFIG_LEDS_TRIGGERS is set.
      But now, it can be used without this dependency.
      To fix build errors, member 'led' is always used without its config option in
      'include/linux/mmc/host.h'.
      Signed-off-by: NMilo(Woogyom) Kim <milo.kim@ti.com>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      39f7e08a
  2. 27 11月, 2012 2 次提交
  3. 11 9月, 2012 1 次提交
  4. 31 7月, 2012 1 次提交
  5. 24 7月, 2012 2 次提交
    • S
      leds: Rename led_brightness_set() to led_set_brightness() · 19cd67e2
      Shuah Khan 提交于
      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: NShuah Khan <shuahkhan@gmail.com>
      Signed-off-by: NBryan Wu <bryan.wu@canonical.com>
      19cd67e2
    • F
      leds: add oneshot blink functions · 5bb629c5
      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: NFabio Baltieri <fabio.baltieri@gmail.com>
      Acked-by: NShuah Khan <shuahkhan@gmail.com>
      Signed-off-by: NBryan Wu <bryan.wu@canonical.com>
      5bb629c5
  6. 30 5月, 2012 1 次提交
  7. 25 5月, 2011 1 次提交
  8. 23 3月, 2011 1 次提交
  9. 31 1月, 2011 1 次提交
  10. 12 11月, 2010 1 次提交
  11. 26 5月, 2010 1 次提交
  12. 24 6月, 2009 3 次提交
    • R
      leds: Futher document blink_set · a1dd8c61
      Richard Purdie 提交于
      Futher document blink_set function pointer
      Signed-off-by: NRichard Purdie <rpurdie@linux.intel.com>
      a1dd8c61
    • T
      leds: Add options to have GPIO LEDs start on or keep their state · ed88bae6
      Trent Piepho 提交于
      There already is a "default-on" trigger but there are problems with it.
      
      For one, it's a inefficient way to do it and requires led trigger support
      to be compiled in.
      
      But the real reason is that is produces a glitch on the LED.  The GPIO is
      allocate with the LED *off*, then *later* when the trigger runs it is
      turned back on.  If the LED was already on via the GPIO's reset default or
      action of the firmware, this produces a glitch where the LED goes from on
      to off to on.  While normally this is fast enough that it wouldn't be
      noticeable to a human observer, there are still serious problems.
      
      One is that there may be something else on the GPIO line, like a hardware
      alarm or watchdog, that is fast enough to notice the glitch.
      
      Another is that the kernel may panic before the LED is turned back on, thus
      hanging with the LED in the wrong state.  This is not just speculation, but
      actually happened to me with an embedded system that has an LED which
      should turn off when the kernel finishes booting, which was left in the
      incorrect state due to a bug in the OF LED binding code.
      
      We also let GPIO LEDs get their initial value from whatever the current
      state of the GPIO line is.  On some systems the LEDs are put into some
      state by the firmware or hardware before Linux boots, and it is desired to
      have them keep this state which is otherwise unknown to Linux.
      
      This requires that the underlying GPIO driver support reading the value of
      output GPIOs.  Some drivers support this and some do not.
      
      The platform device binding gains a field in the platform data
      "default_state" that controls this.  There are three constants defined to
      select from on, off, or keeping the current state.  The OpenFirmware
      binding uses a property named "default-state" that can be set to "on",
      "off", or "keep".  The default if the property isn't present is off.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NWolfram Sang <w.sang@pengutronix.de>
      Acked-by: NSean MacLennan <smaclennan@pikatech.com>
      Signed-off-by: NRichard Purdie <rpurdie@linux.intel.com>
      ed88bae6
    • M
      leds: Further document parameters for blink_set() · 92722b1b
      Mark Brown 提交于
      The documentation for the parameters of blink_set() was a bit hard
      to find so put some where I'd expected to find it.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NRichard Purdie <rpurdie@linux.intel.com>
      92722b1b
  13. 06 4月, 2009 2 次提交
  14. 09 1月, 2009 1 次提交
    • R
      leds: Add suspend/resume to the core class · 859cb7f2
      Richard Purdie 提交于
      Add suspend/resume to the core class and remove all the now unneeded
      code from various drivers. Originally the class code couldn't support
      suspend/resume but since class_device can there is no reason for
      each driver doing its own suspend/resume anymore.
      859cb7f2
  15. 08 1月, 2009 1 次提交
  16. 21 10月, 2008 1 次提交
    • T
      leds: Make default trigger fields const · 326bb8a5
      Trent Piepho 提交于
      The default_trigger fields of struct gpio_led and thus struct
      led_classdev are pretty much always assigned from a string literal,
      which means the string can't be modified.  Which is fine, since there is
      no reason to modify the string and in fact it never is.
      
      But they should be marked const to prevent such code from being added,
      to prevent warnings if -Wwrite-strings is used, when assigned from a
      constant string other than a string literal (which produces a warning
      under current kernel compiler flags), and for general good coding
      practices.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NRichard Purdie <rpurdie@linux.intel.com>
      326bb8a5
  17. 23 7月, 2008 2 次提交
  18. 25 4月, 2008 3 次提交
  19. 20 4月, 2008 1 次提交
    • R
      PM: Remove destroy_suspended_device() · b844eba2
      Rafael J. Wysocki 提交于
      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: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b844eba2
  20. 07 2月, 2008 1 次提交
  21. 06 2月, 2008 1 次提交
  22. 07 12月, 2007 1 次提交
  23. 12 9月, 2007 1 次提交
  24. 17 7月, 2007 1 次提交
  25. 16 7月, 2007 2 次提交
  26. 30 9月, 2006 1 次提交
  27. 11 4月, 2006 1 次提交
  28. 01 4月, 2006 3 次提交