1. 09 3月, 2017 1 次提交
  2. 25 2月, 2017 1 次提交
    • H
      leds: class: Add new optional brightness_hw_changed attribute · b8c5099b
      Hans de Goede 提交于
      Some LEDs may have their brightness level changed autonomously
      (outside of kernel control) by hardware / firmware. This commit
      adds support for an optional brightness_hw_changed attribute to
      signal such changes to userspace (if a driver can detect them):
      
      What:		/sys/class/leds/<led>/brightness_hw_changed
      Date:		January 2017
      KernelVersion:	4.11
      Description:
      		Last hardware set brightness level for this LED. Some LEDs
      		may be changed autonomously by hardware/firmware. Only LEDs
      		where this happens and the driver can detect this, will
      		have this file.
      
      		This file supports poll() to detect when the hardware
      		changes the brightness.
      
      		Reading this file will return the last brightness level set
      		by the hardware, this may be different from the current
      		brightness.
      
      Drivers which want to support this, simply add LED_BRIGHT_HW_CHANGED to
      their flags field and call led_classdev_notify_brightness_hw_changed()
      with the hardware set brightness when they detect a hardware / firmware
      triggered brightness change.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
      b8c5099b
  3. 30 1月, 2017 1 次提交
    • H
      leds: class: Add new optional brightness_hw_changed attribute · 0cb8eb30
      Hans de Goede 提交于
      Some LEDs may have their brightness level changed autonomously
      (outside of kernel control) by hardware / firmware. This commit
      adds support for an optional brightness_hw_changed attribute to
      signal such changes to userspace (if a driver can detect them):
      
      What:		/sys/class/leds/<led>/brightness_hw_changed
      Date:		January 2017
      KernelVersion:	4.11
      Description:
      		Last hardware set brightness level for this LED. Some LEDs
      		may be changed autonomously by hardware/firmware. Only LEDs
      		where this happens and the driver can detect this, will
      		have this file.
      
      		This file supports poll() to detect when the hardware
      		changes the brightness.
      
      		Reading this file will return the last brightness level set
      		by the hardware, this may be different from the current
      		brightness.
      
      Drivers which want to support this, simply add LED_BRIGHT_HW_CHANGED to
      their flags field and call led_classdev_notify_brightness_hw_changed()
      with the hardware set brightness when they detect a hardware / firmware
      triggered brightness change.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
      0cb8eb30
  4. 22 11月, 2016 2 次提交
  5. 14 3月, 2016 1 次提交
  6. 04 1月, 2016 3 次提交
    • M
      leds: turn off the LED and wait for completion on unregistering LED class device · d1aa577f
      Milo Kim 提交于
      Workqueue, 'set_brightness_work' is used for scheduling brightness control.
      This workqueue is canceled when the LED class device is unregistered.
      Currently, LED subsystem handles like below.
      
        cancel_work_sync(&led_cdev->set_brightness_work)
        led_set_brightness(led_cdev, LED_OFF)
      
      However, this could be a problem.
      Workqueue is going to be canceled but LED device needs to be off.
      The worst case is null pointer access due to scheduling a workqueue.
      
      LED module is loaded.
        LED driver private data is allocated by using devm_zalloc().
      
      LED module is unloaded.
        led_classdev_unregister() is called.
          cancel_work_sync()
            led_set_brightness(led_cdev, LED_OFF)
              schedule_work() if LED driver uses brightness_set_blocking()
              In the meantime, driver private data will be freed.
      
              ..scheduling..
      
              brightness_set_blocking() callback is invoked.
                For the brightness control, LED driver tries to access private
                data but resource is removed!
      
      To avoid this problem, LED subsystem should turn off the brightness first
      and wait for completion.
      
        led_set_brightness(led_cdev, LED_OFF)
        flush_work(&led_cdev->set_brightness_work)
      
      It guarantees that LED driver turns off the brightness prior to
      resource management.
      
      Cc: linux-leds@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NMilo Kim <milo.kim@ti.com>
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      d1aa577f
    • J
      leds: core: Drivers shouldn't enforce SYNC/ASYNC brightness setting · 13ae79bb
      Jacek Anaszewski 提交于
      This patch removes SET_BRIGHTNESS_ASYNC and SET_BRIGHTNESS_SYNC flags.
      led_set_brightness() now calls led_set_brightness_nosleep() instead of
      choosing between sync and async op basing on the flags defined by the
      driver.
      
      From now on, if a user wants to make sure that brightness will be set
      synchronously, they have to use led_set_brightness_sync() API. It is now
      being made publicly available since it has become apparent that it is
      a caller who should decide whether brightness is to be set in
      a synchronous or an asynchronous way.
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      13ae79bb
    • J
      leds: core: Add led_set_brightness_nosleep{nopm} functions · 81fe8e5b
      Jacek Anaszewski 提交于
      This patch adds led_set_brightness_nosleep() and led_set_brightness_nopm()
      functions, that guarantee setting LED brightness in a non-blocking way.
      The latter is used from pm_ops context and doesn't modify the brightness
      cached in the struct led_classdev. Its execution always ends up with
      a call to brightness setting op - either directly or through
      a set_brightness_work, regardless of LED_SUSPENDED flag state.
      
      The patch also replaces led_set_brightness_async() with
      led_set_brightness_nosleep() in all places where the most vital was setting
      brightness in a non sleeping way but not necessarily asynchronously, which
      is not needed for non-blocking drivers.
      Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      81fe8e5b
  7. 03 11月, 2015 1 次提交
  8. 28 8月, 2015 1 次提交
  9. 26 5月, 2015 1 次提交
  10. 13 5月, 2015 1 次提交
    • G
      leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger · 084609bf
      Grygorii Strashko 提交于
      Setting a dev_pm_ops suspend/resume pair of callbacks but not a set of
      hibernation callbacks means those pm functions will not be
      called upon hibernation - that leads to system crash on ARM during
      freezing if gpio-led is used in combination with CPU led trigger.
      It may happen after freeze_noirq stage (GPIO is suspended)
      and before syscore_suspend stage (CPU led trigger is suspended)
      - usually when disable_nonboot_cpus() is called.
      
      Log:
        PM: noirq freeze of devices complete after 1.425 msecs
        Disabling non-boot CPUs ...
          ^ system may crash or stuck here with message (TI AM572x)
      
        WARNING: CPU: 0 PID: 3100 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x22c/0x370()
        44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
      
        CPU1: shutdown
          ^ or here
      
      Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
      assigns the suspend and hibernation callbacks and move
      led_suspend/led_resume under CONFIG_PM_SLEEP to avoid
      build warnings.
      
      Fixes: 73e1ab41 (leds: Convert led class driver from legacy pm ops to dev_pm_ops)
      Signed-off-by: NGrygorii Strashko <Grygorii.Strashko@linaro.org>
      Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Cc: 3.11+ <stable@vger.kernel.org> # 3.11+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      084609bf
  11. 31 3月, 2015 3 次提交
  12. 10 3月, 2015 1 次提交
  13. 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
  14. 15 1月, 2015 1 次提交
  15. 15 11月, 2014 2 次提交
  16. 13 9月, 2014 1 次提交
  17. 12 9月, 2014 2 次提交
  18. 03 9月, 2014 1 次提交
    • J
      Revert "leds: convert blink timer to workqueue" · 9067359f
      Jiri Kosina 提交于
      This reverts commit 8b37e1be.
      
      It's broken as it changes led_blink_set() in a way that it can now sleep
      (while synchronously waiting for workqueue to be cancelled). That's a
      problem, because it's possible that this function gets called from atomic
      context (tpt_trig_timer() takes a readlock and thus disables preemption).
      
      This has been brought up 3 weeks ago already [1] but no proper fix has
      materialized, and I keep seeing the problem since 3.17-rc1.
      
      [1] https://lkml.org/lkml/2014/8/16/128
      
       BUG: sleeping function called from invalid context at kernel/workqueue.c:2650
       in_atomic(): 1, irqs_disabled(): 0, pid: 2335, name: wpa_supplicant
       5 locks held by wpa_supplicant/2335:
        #0:  (rtnl_mutex){+.+.+.}, at: [<ffffffff814c7c92>] rtnl_lock+0x12/0x20
        #1:  (&wdev->mtx){+.+.+.}, at: [<ffffffffc06e649c>] cfg80211_mgd_wext_siwessid+0x5c/0x180 [cfg80211]
        #2:  (&local->mtx){+.+.+.}, at: [<ffffffffc0817dea>] ieee80211_prep_connection+0x17a/0x9a0 [mac80211]
        #3:  (&local->chanctx_mtx){+.+.+.}, at: [<ffffffffc08081ed>] ieee80211_vif_use_channel+0x5d/0x2a0 [mac80211]
        #4:  (&trig->leddev_list_lock){.+.+..}, at: [<ffffffffc081e68c>] tpt_trig_timer+0xec/0x170 [mac80211]
       CPU: 0 PID: 2335 Comm: wpa_supplicant Not tainted 3.17.0-rc3 #1
       Hardware name: LENOVO 7470BN2/7470BN2, BIOS 6DET38WW (2.02 ) 12/19/2008
        ffff8800360b5a50 ffff8800751f76d8 ffffffff8159e97f ffff8800360b5a30
        ffff8800751f76e8 ffffffff810739a5 ffff8800751f77b0 ffffffff8106862f
        ffffffff810685d0 0aa2209200000000 ffff880000000004 ffff8800361c59d0
       Call Trace:
        [<ffffffff8159e97f>] dump_stack+0x4d/0x66
        [<ffffffff810739a5>] __might_sleep+0xe5/0x120
        [<ffffffff8106862f>] flush_work+0x5f/0x270
        [<ffffffff810685d0>] ? mod_delayed_work_on+0x80/0x80
        [<ffffffff810945ca>] ? mark_held_locks+0x6a/0x90
        [<ffffffff81068a5f>] ? __cancel_work_timer+0x6f/0x100
        [<ffffffff810946ed>] ? trace_hardirqs_on_caller+0xfd/0x1c0
        [<ffffffff81068a6b>] __cancel_work_timer+0x7b/0x100
        [<ffffffff81068b0e>] cancel_delayed_work_sync+0xe/0x10
        [<ffffffff8147cf3b>] led_blink_set+0x1b/0x40
        [<ffffffffc081e6b0>] tpt_trig_timer+0x110/0x170 [mac80211]
        [<ffffffffc081ecdd>] ieee80211_mod_tpt_led_trig+0x9d/0x160 [mac80211]
        [<ffffffffc07e4278>] __ieee80211_recalc_idle+0x98/0x140 [mac80211]
        [<ffffffffc07e59ce>] ieee80211_idle_off+0xe/0x10 [mac80211]
        [<ffffffffc0804e5b>] ieee80211_add_chanctx+0x3b/0x220 [mac80211]
        [<ffffffffc08062e4>] ieee80211_new_chanctx+0x44/0xf0 [mac80211]
        [<ffffffffc080838a>] ieee80211_vif_use_channel+0x1fa/0x2a0 [mac80211]
        [<ffffffffc0817df8>] ieee80211_prep_connection+0x188/0x9a0 [mac80211]
        [<ffffffffc081c246>] ieee80211_mgd_auth+0x256/0x2e0 [mac80211]
        [<ffffffffc07eab33>] ieee80211_auth+0x13/0x20 [mac80211]
        [<ffffffffc06cb006>] cfg80211_mlme_auth+0x106/0x270 [cfg80211]
        [<ffffffffc06ce085>] cfg80211_conn_do_work+0x155/0x3b0 [cfg80211]
        [<ffffffffc06cf670>] cfg80211_connect+0x3f0/0x540 [cfg80211]
        [<ffffffffc06e6148>] cfg80211_mgd_wext_connect+0x158/0x1f0 [cfg80211]
        [<ffffffffc06e651e>] cfg80211_mgd_wext_siwessid+0xde/0x180 [cfg80211]
        [<ffffffffc06e36c0>] ? cfg80211_wext_giwessid+0x50/0x50 [cfg80211]
        [<ffffffffc06e36dd>] cfg80211_wext_siwessid+0x1d/0x40 [cfg80211]
        [<ffffffff81584d0c>] ioctl_standard_iw_point+0x14c/0x3e0
        [<ffffffff810946ed>] ? trace_hardirqs_on_caller+0xfd/0x1c0
        [<ffffffff8158502a>] ioctl_standard_call+0x8a/0xd0
        [<ffffffff81584fa0>] ? ioctl_standard_iw_point+0x3e0/0x3e0
        [<ffffffff81584b76>] wireless_process_ioctl.constprop.10+0xb6/0x100
        [<ffffffff8158521d>] wext_handle_ioctl+0x5d/0xb0
        [<ffffffff814cfb29>] dev_ioctl+0x329/0x620
        [<ffffffff810946ed>] ? trace_hardirqs_on_caller+0xfd/0x1c0
        [<ffffffff8149c7f2>] sock_ioctl+0x142/0x2e0
        [<ffffffff811b0140>] do_vfs_ioctl+0x300/0x520
        [<ffffffff815a67fb>] ? sysret_check+0x1b/0x56
        [<ffffffff810946ed>] ? trace_hardirqs_on_caller+0xfd/0x1c0
        [<ffffffff811b03e1>] SyS_ioctl+0x81/0xa0
        [<ffffffff815a67d6>] system_call_fastpath+0x1a/0x1f
       wlan0: send auth to 00:0b:6b:3c:8c:e4 (try 1/3)
       wlan0: authenticated
       wlan0: associate with 00:0b:6b:3c:8c:e4 (try 1/3)
       wlan0: RX AssocResp from 00:0b:6b:3c:8c:e4 (capab=0x431 status=0 aid=2)
       wlan0: associated
       IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
       cfg80211: Calling CRDA for country: NA
       wlan0: Limiting TX power to 27 (27 - 0) dBm as advertised by 00:0b:6b:3c:8c:e4
      
       =================================
       [ INFO: inconsistent lock state ]
       3.17.0-rc3 #1 Not tainted
       ---------------------------------
       inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
       swapper/0/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
        ((&(&led_cdev->blink_work)->work)){+.?...}, at: [<ffffffff810685d0>] flush_work+0x0/0x270
       {SOFTIRQ-ON-W} state was registered at:
         [<ffffffff81094dbe>] __lock_acquire+0x30e/0x1a30
         [<ffffffff81096c81>] lock_acquire+0x91/0x110
         [<ffffffff81068608>] flush_work+0x38/0x270
         [<ffffffff81068a6b>] __cancel_work_timer+0x7b/0x100
         [<ffffffff81068b0e>] cancel_delayed_work_sync+0xe/0x10
         [<ffffffff8147cf3b>] led_blink_set+0x1b/0x40
         [<ffffffffc081e6b0>] tpt_trig_timer+0x110/0x170 [mac80211]
         [<ffffffffc081ecdd>] ieee80211_mod_tpt_led_trig+0x9d/0x160 [mac80211]
         [<ffffffffc07e4278>] __ieee80211_recalc_idle+0x98/0x140 [mac80211]
         [<ffffffffc07e59ce>] ieee80211_idle_off+0xe/0x10 [mac80211]
         [<ffffffffc0804e5b>] ieee80211_add_chanctx+0x3b/0x220 [mac80211]
         [<ffffffffc08062e4>] ieee80211_new_chanctx+0x44/0xf0 [mac80211]
         [<ffffffffc080838a>] ieee80211_vif_use_channel+0x1fa/0x2a0 [mac80211]
         [<ffffffffc0817df8>] ieee80211_prep_connection+0x188/0x9a0 [mac80211]
         [<ffffffffc081c246>] ieee80211_mgd_auth+0x256/0x2e0 [mac80211]
         [<ffffffffc07eab33>] ieee80211_auth+0x13/0x20 [mac80211]
         [<ffffffffc06cb006>] cfg80211_mlme_auth+0x106/0x270 [cfg80211]
         [<ffffffffc06ce085>] cfg80211_conn_do_work+0x155/0x3b0 [cfg80211]
         [<ffffffffc06cf670>] cfg80211_connect+0x3f0/0x540 [cfg80211]
         [<ffffffffc06e6148>] cfg80211_mgd_wext_connect+0x158/0x1f0 [cfg80211]
         [<ffffffffc06e651e>] cfg80211_mgd_wext_siwessid+0xde/0x180 [cfg80211]
         [<ffffffffc06e36dd>] cfg80211_wext_siwessid+0x1d/0x40 [cfg80211]
         [<ffffffff81584d0c>] ioctl_standard_iw_point+0x14c/0x3e0
         [<ffffffff8158502a>] ioctl_standard_call+0x8a/0xd0
         [<ffffffff81584b76>] wireless_process_ioctl.constprop.10+0xb6/0x100
         [<ffffffff8158521d>] wext_handle_ioctl+0x5d/0xb0
         [<ffffffff814cfb29>] dev_ioctl+0x329/0x620
         [<ffffffff8149c7f2>] sock_ioctl+0x142/0x2e0
         [<ffffffff811b0140>] do_vfs_ioctl+0x300/0x520
         [<ffffffff811b03e1>] SyS_ioctl+0x81/0xa0
         [<ffffffff815a67d6>] system_call_fastpath+0x1a/0x1f
       irq event stamp: 493416
       hardirqs last  enabled at (493416): [<ffffffff81068a5f>] __cancel_work_timer+0x6f/0x100
       hardirqs last disabled at (493415): [<ffffffff81067e9f>] try_to_grab_pending+0x1f/0x160
       softirqs last  enabled at (493408): [<ffffffff81053ced>] _local_bh_enable+0x1d/0x50
       softirqs last disabled at (493409): [<ffffffff81054c75>] irq_exit+0xa5/0xb0
      
       other info that might help us debug this:
        Possible unsafe locking scenario:
      
              CPU0
              ----
         lock((&(&led_cdev->blink_work)->work));
         <Interrupt>
           lock((&(&led_cdev->blink_work)->work));
      
        *** DEADLOCK ***
      
       2 locks held by swapper/0/0:
        #0:  (((&tpt_trig->timer))){+.-...}, at: [<ffffffff810b4c50>] call_timer_fn+0x0/0x180
        #1:  (&trig->leddev_list_lock){.+.?..}, at: [<ffffffffc081e68c>] tpt_trig_timer+0xec/0x170 [mac80211]
      
       stack backtrace:
       CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.17.0-rc3 #1
       Hardware name: LENOVO 7470BN2/7470BN2, BIOS 6DET38WW (2.02 ) 12/19/2008
        ffffffff8246eb30 ffff88007c203b00 ffffffff8159e97f ffffffff81a194c0
        ffff88007c203b50 ffffffff81599c29 0000000000000001 ffffffff00000001
        ffff880000000000 0000000000000006 ffffffff81a194c0 ffffffff81093ad0
       Call Trace:
        <IRQ>  [<ffffffff8159e97f>] dump_stack+0x4d/0x66
        [<ffffffff81599c29>] print_usage_bug+0x1f4/0x205
        [<ffffffff81093ad0>] ? check_usage_backwards+0x140/0x140
        [<ffffffff810944d3>] mark_lock+0x223/0x2b0
        [<ffffffff81094d60>] __lock_acquire+0x2b0/0x1a30
        [<ffffffff81096c81>] lock_acquire+0x91/0x110
        [<ffffffff810685d0>] ? mod_delayed_work_on+0x80/0x80
        [<ffffffffc081e5a0>] ? __ieee80211_get_rx_led_name+0x10/0x10 [mac80211]
        [<ffffffff81068608>] flush_work+0x38/0x270
        [<ffffffff810685d0>] ? mod_delayed_work_on+0x80/0x80
        [<ffffffff810945ca>] ? mark_held_locks+0x6a/0x90
        [<ffffffff81068a5f>] ? __cancel_work_timer+0x6f/0x100
        [<ffffffffc081e5a0>] ? __ieee80211_get_rx_led_name+0x10/0x10 [mac80211]
        [<ffffffff8109469d>] ? trace_hardirqs_on_caller+0xad/0x1c0
        [<ffffffffc081e5a0>] ? __ieee80211_get_rx_led_name+0x10/0x10 [mac80211]
        [<ffffffff81068a6b>] __cancel_work_timer+0x7b/0x100
        [<ffffffff81068b0e>] cancel_delayed_work_sync+0xe/0x10
        [<ffffffff8147cf3b>] led_blink_set+0x1b/0x40
        [<ffffffffc081e6b0>] tpt_trig_timer+0x110/0x170 [mac80211]
        [<ffffffff810b4cc5>] call_timer_fn+0x75/0x180
        [<ffffffff810b4c50>] ? process_timeout+0x10/0x10
        [<ffffffffc081e5a0>] ? __ieee80211_get_rx_led_name+0x10/0x10 [mac80211]
        [<ffffffff810b50ac>] run_timer_softirq+0x1fc/0x2f0
        [<ffffffff81054805>] __do_softirq+0x115/0x2e0
        [<ffffffff81054c75>] irq_exit+0xa5/0xb0
        [<ffffffff810049b3>] do_IRQ+0x53/0xf0
        [<ffffffff815a74af>] common_interrupt+0x6f/0x6f
        <EOI>  [<ffffffff8147b56e>] ? cpuidle_enter_state+0x6e/0x180
        [<ffffffff8147b732>] cpuidle_enter+0x12/0x20
        [<ffffffff8108bba0>] cpu_startup_entry+0x330/0x360
        [<ffffffff8158fb51>] rest_init+0xc1/0xd0
        [<ffffffff8158fa90>] ? csum_partial_copy_generic+0x170/0x170
        [<ffffffff81af3ff2>] start_kernel+0x44f/0x45a
        [<ffffffff81af399c>] ? set_init_arg+0x53/0x53
        [<ffffffff81af35ad>] x86_64_start_reservations+0x2a/0x2c
        [<ffffffff81af36a0>] x86_64_start_kernel+0xf1/0xf4
      
      Cc: Vincent Donnefort <vdonnefort@gmail.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      Signed-off-by: NBryan Wu <cooloney@gmail.com>
      9067359f
  19. 04 7月, 2014 1 次提交
  20. 26 6月, 2014 1 次提交
  21. 27 7月, 2013 1 次提交
  22. 21 6月, 2013 1 次提交
  23. 28 11月, 2012 1 次提交
  24. 11 9月, 2012 1 次提交
  25. 24 7月, 2012 3 次提交
    • 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
    • S
      leds: Rename led_set_brightness() to __led_set_brightness() · 0da3e65b
      Shuah Khan 提交于
      Rename leds internal interface led_set_brightness() to __led_set_brightness()
      to reduce confusion between led_set_brightness() and the external interface
      led_brightness_set(). led_brightness_set() cancels the timer and then calls
      led_set_brightness().
      Signed-off-by: NShuah Khan <shuahkhan@gmail.com>
      Signed-off-by: NBryan Wu <bryan.wu@canonical.com>
      0da3e65b
    • 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
  26. 12 6月, 2012 1 次提交
  27. 30 5月, 2012 1 次提交
  28. 24 3月, 2012 1 次提交
  29. 22 12月, 2011 1 次提交
    • K
      driver-core: remove sysdev.h usage. · edbaa603
      Kay Sievers 提交于
      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 <jdzheng@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: Daniel Walker <dwalker@fifo99.com>
      Cc: Bryan Huntsman <bryanh@codeaurora.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Wan ZongShun <mcuos.com@gmail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "Venkatesh Pallipadi
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      edbaa603
  30. 16 11月, 2011 1 次提交
  31. 01 11月, 2011 1 次提交