1. 29 11月, 2012 1 次提交
  2. 11 9月, 2012 4 次提交
  3. 24 7月, 2012 1 次提交
  4. 24 3月, 2012 1 次提交
  5. 11 1月, 2012 1 次提交
  6. 01 11月, 2011 2 次提交
    • D
      drivers/leds/leds-gpio.c: use gpio_get_value_cansleep() when initializing · dabc69c2
      David Daney 提交于
      I get the following warning:
      
      ------------[ cut here ]------------
      WARNING: at drivers/gpio/gpiolib.c:1559 __gpio_get_value+0x90/0x98()
      Modules linked in:
      Call Trace:
      [<ffffffff81440950>] dump_stack+0x8/0x34
      [<ffffffff81141478>] warn_slowpath_common+0x78/0xa0
      [<ffffffff812f0958>] __gpio_get_value+0x90/0x98
      [<ffffffff81434f04>] create_gpio_led+0xdc/0x194
      [<ffffffff8143524c>] gpio_led_probe+0x290/0x36c
      [<ffffffff8130e8b0>] driver_probe_device+0x78/0x1b0
      [<ffffffff8130eaa8>] __driver_attach+0xc0/0xc8
      [<ffffffff8130d7ac>] bus_for_each_dev+0x64/0xb0
      [<ffffffff8130e130>] bus_add_driver+0x1c8/0x2a8
      [<ffffffff8130f100>] driver_register+0x90/0x180
      [<ffffffff81100438>] 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: NDavid Daney <david.daney@cavium.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Acked-by: NTrent Piepho <tpiepho@gmail.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dabc69c2
    • P
      drivers/leds: Add module.h to files using it implicitly · 54f4dedb
      Paul Gortmaker 提交于
      A pending cleanup will mean that module.h won't be implicitly
      everywhere anymore.  Make sure the modular drivers in the leds
      dir are actually calling out for <module.h> explicitly in advance.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      54f4dedb
  7. 04 6月, 2011 1 次提交
  8. 28 2月, 2011 1 次提交
  9. 12 11月, 2010 1 次提交
  10. 06 8月, 2010 1 次提交
  11. 28 5月, 2010 1 次提交
  12. 26 5月, 2010 1 次提交
  13. 22 5月, 2010 1 次提交
    • G
      of: Remove duplicate fields from of_platform_driver · 4018294b
      Grant Likely 提交于
      .name, .match_table and .owner are duplicated in both of_platform_driver
      and device_driver.  This patch is a removes the extra copies from struct
      of_platform_driver and converts all users to the device_driver members.
      
      This patch is a pretty mechanical change.  The usage model doesn't change
      and if any drivers have been missed, or if anything has been fixed up
      incorrectly, then it will fail with a compile time error, and the fixup
      will be trivial.  This patch looks big and scary because it touches so
      many files, but it should be pretty safe.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NSean MacLennan <smaclennan@pikatech.com>
      4018294b
  14. 19 5月, 2010 1 次提交
  15. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  16. 17 3月, 2010 1 次提交
  17. 16 11月, 2009 1 次提交
  18. 07 9月, 2009 1 次提交
  19. 24 6月, 2009 2 次提交
    • 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
    • Z
      leds: leds-gpio - fix a section mismatch · 7fd02170
      Zhenwen Xu 提交于
      WARNING: drivers/leds/leds-gpio.o(.text+0x153): Section mismatch in reference from the function gpio_led_probe() to the function .devinit.text:create_gpio_led()
      
      The function gpio_led_probe() references the function __devinit
      create_gpio_led().  This is often because gpio_led_probe lacks a __devinit
      annotation or the annotation of create_gpio_led is wrong.
      Signed-off-by: NZhenwen Xu <helight.xu@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NRichard Purdie <rpurdie@linux.intel.com>
      7fd02170
  20. 08 4月, 2009 1 次提交
  21. 06 4月, 2009 4 次提交
  22. 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
  23. 25 4月, 2008 1 次提交
  24. 16 4月, 2008 1 次提交
  25. 01 4月, 2008 2 次提交
  26. 07 2月, 2008 1 次提交
  27. 06 11月, 2007 1 次提交
    • D
      leds: bugfixes for leds-gpio · 199fb21d
      David Brownell 提交于
      Three bugfixes to the leds-gpio driver, plus minor whitespace tweaks:
      
       - Do the INIT_WORK() before registering each LED, so if its trigger
         becomes immediately active it can schedule work without oopsing..
      
       - Use normal registration, not platform_driver_probe(), so that
         devices appearing "late" (hotplug type) can still be bound.
      
       - Mark the driver remove code as "__devexit", preventing oopses
         when the underlying device is removed.
      
      These issues came up when using this driver with some GPIO expanders
      living on serial busses, which act unlike "normal" platform devices:
      they can appear and vanish along with the serial bus driver.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
      199fb21d
  28. 16 7月, 2007 2 次提交