1. 01 6月, 2015 1 次提交
  2. 25 5月, 2015 2 次提交
  3. 20 5月, 2015 3 次提交
    • L
      driver-core: enable drivers to opt-out of async probe · d173a137
      Luis R. Rodriguez 提交于
      There are drivers that can not be probed asynchronously. One such group
      is platform drivers registered with platform_driver_probe(), which
      expects driver's probe routine be discarded after the driver has been
      registered and initial binding attempt executed. Also
      platform_driver_probe() an error when no devices were bound to the
      driver, allowing failing to load such driver module altogether.
      
      Other drivers do not work well with asynchronous probing because of
      driver bug or not optimal driver organization.
      
      To allow using such drivers even when user requests asynchronous probing
      as default boot strategy, let's allow them to opt out.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d173a137
    • L
      driver-core: add driver module asynchronous probe support · f2411da7
      Luis R. Rodriguez 提交于
      Some init systems may wish to express the desire to have device drivers
      run their probe() code asynchronously. This implements support for this
      and allows userspace to request async probe as a preference through a
      generic shared device driver module parameter, async_probe.
      
      Implementation for async probe is supported through a module parameter
      given that since synchronous probe has been prevalent for years some
      userspace might exist which relies on the fact that the device driver
      will probe synchronously and the assumption that devices it provides
      will be immediately available after this.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f2411da7
    • D
      driver-core: add asynchronous probing support for drivers · 765230b5
      Dmitry Torokhov 提交于
      Some devices take a long time when initializing, and not all drivers are
      suited to initialize their devices when they are open. For example,
      input drivers need to interrogate their devices in order to publish
      device's capabilities before userspace will open them. When such drivers
      are compiled into kernel they may stall entire kernel initialization.
      
      This change allows drivers request for their probe functions to be
      called asynchronously during driver and device registration (manual
      binding is still synchronous). Because async_schedule is used to perform
      asynchronous calls module loading will still wait for the probing to
      complete.
      
      Note that the end goal is to make the probing asynchronous by default,
      so annotating drivers with PROBE_PREFER_ASYNCHRONOUS is a temporary
      measure that allows us to speed up boot process while we validating and
      fixing the rest of the drivers and preparing userspace.
      
      This change is based on earlier patch by "Luis R. Rodriguez"
      <mcgrof@suse.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      765230b5
  4. 25 3月, 2015 2 次提交
  5. 23 3月, 2015 1 次提交
    • R
      driver core / PM: Add PM domain callbacks for device setup/cleanup · e90d5532
      Rafael J. Wysocki 提交于
      If PM domains are in use, it may be necessary to prepare the code
      handling a PM domain for driver probing.  For example, in some
      cases device drivers rely on the ability to power on the devices
      with the help of the IO runtime PM framework and the PM domain
      code needs to be ready for that.  Also, if that code has not been
      fully initialized yet, the driver probing should be deferred.
      
      Moreover, after the probing is complete, it may be necessary to
      put the PM domain in question into the state reflecting the current
      needs of the devices in it, for example, so that power is not drawn
      in vain.  The same should be done after removing a driver from
      a device, as the PM domain state may need to be changed to reflect
      the new situation.
      
      For these reasons, introduce new PM domain callbacks, ->activate,
      ->sync and ->dismiss called, respectively, before probing for a
      device driver, after the probing has completed successfully and
      if the probing has failed or the driver has been removed.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NKevin Hilman <khilman@linaro.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e90d5532
  6. 24 9月, 2014 1 次提交
  7. 28 5月, 2014 4 次提交
  8. 29 4月, 2014 1 次提交
    • G
      drivercore: deferral race condition fix · 58b116bc
      Grant Likely 提交于
      When the kernel is built with CONFIG_PREEMPT it is possible to reach a state
      when all modules loaded but some driver still stuck in the deferred list
      and there is a need for external event to kick the deferred queue to probe
      these drivers.
      
      The issue has been observed on embedded systems with CONFIG_PREEMPT enabled,
      audio support built as modules and using nfsroot for root filesystem.
      
      The following log fragment shows such sequence when all audio modules
      were loaded but the sound card is not present since the machine driver has
      failed to probe due to missing dependency during it's probe.
      The board is am335x-evmsk (McASP<->tlv320aic3106 codec) with davinci-evm
      machine driver:
      
      ...
      [   12.615118] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: ENTER
      [   12.719969] davinci_evm sound.3: davinci_evm_probe: ENTER
      [   12.725753] davinci_evm sound.3: davinci_evm_probe: snd_soc_register_card
      [   12.753846] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: snd_soc_register_component
      [   12.922051] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: snd_soc_register_component DONE
      [   12.950839] davinci_evm sound.3: ASoC: platform (null) not registered
      [   12.957898] davinci_evm sound.3: davinci_evm_probe: snd_soc_register_card DONE (-517)
      [   13.099026] davinci-mcasp 4803c000.mcasp: Kicking the deferred list
      [   13.177838] davinci-mcasp 4803c000.mcasp: really_probe: probe_count = 2
      [   13.194130] davinci_evm sound.3: snd_soc_register_card failed (-517)
      [   13.346755] davinci_mcasp_driver_init: LEAVE
      [   13.377446] platform sound.3: Driver davinci_evm requests probe deferral
      [   13.592527] platform sound.3: really_probe: probe_count = 0
      
      In the log the machine driver enters it's probe at 12.719969 (this point it
      has been removed from the deferred lists). McASP driver already executing
      it's probing (since 12.615118).
      The machine driver tries to construct the sound card (12.950839) but did
      not found one of the components so it fails. After this McASP driver
      registers all the ASoC components (the machine driver still in it's probe
      function after it failed to construct the card) and the deferred work is
      prepared at 13.099026 (note that this time the machine driver is not in the
      lists so it is not going to be handled when the work is executing).
      Lastly the machine driver exit from it's probe and the core places it to
      the deferred list but there will be no other driver going to load and the
      deferred queue is not going to be kicked again - till we have external event
      like connecting USB stick, etc.
      
      The proposed solution is to try the deferred queue once more when the last
      driver is asking for deferring and we had drivers loaded while this last
      driver was probing.
      
      This way we can avoid drivers stuck in the deferred queue.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Stable <stable@vger.kernel.org> # v3.4+
      58b116bc
  9. 17 4月, 2014 1 次提交
  10. 08 11月, 2013 1 次提交
  11. 12 4月, 2013 1 次提交
  12. 16 2月, 2013 1 次提交
    • G
      drivercore: Fix ordering between deferred_probe and exiting initcalls · d72cca1e
      Grant Likely 提交于
      One of the side effects of deferred probe is that some drivers which
      used to be probed before initcalls completed are now happening slightly
      later. This causes two problems.
      - If a console driver gets deferred, then it may not be ready when
        userspace starts. For example, if a uart depends on pinctrl, then the
        uart will get deferred and /dev/console will not be available
      - __init sections will be discarded before built-in drivers are probed.
        Strictly speaking, __init functions should not be called in a drivers
        __probe path, but there are a lot of drivers (console stuff again)
        that do anyway. In the past it was perfectly safe to do so because all
        built-in drivers got probed before the end of initcalls.
      
      This patch fixes the problem by forcing the first pass of the deferred
      list to complete at late_initcall time. This is late enough to catch the
      drivers that are known to have the above issues.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Tested-by: NHaojian Zhuang <haojian.zhuang@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: stable <stable@vger.kernel.org> # 3.4+
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d72cca1e
  13. 23 1月, 2013 1 次提交
    • L
      drivers/pinctrl: grab default handles from device core · ab78029e
      Linus Walleij 提交于
      This makes the device core auto-grab the pinctrl handle and set
      the "default" (PINCTRL_STATE_DEFAULT) state for every device
      that is present in the device model right before probe. This will
      account for the lion's share of embedded silicon devcies.
      
      A modification of the semantics for pinctrl_get() is also done:
      previously if the pinctrl handle for a certain device was already
      taken, the pinctrl core would return an error. Now, since the
      core may have already default-grabbed the handle and set its
      state to "default", if the handle was already taken, this will
      be disregarded and the located, previously instanitated handle
      will be returned to the caller.
      
      This way all code in drivers explicitly requesting their pinctrl
      handlers will still be functional, and drivers that want to
      explicitly retrieve and switch their handles can still do that.
      But if the desired functionality is just boilerplate of this
      type in the probe() function:
      
      struct pinctrl  *p;
      
      p = devm_pinctrl_get_select_default(&dev);
      if (IS_ERR(p)) {
         if (PTR_ERR(p) == -EPROBE_DEFER)
              return -EPROBE_DEFER;
              dev_warn(&dev, "no pinctrl handle\n");
      }
      
      The discussion began with the addition of such boilerplate
      to the omap4 keypad driver:
      http://marc.info/?l=linux-input&m=135091157719300&w=2
      
      A previous approach using notifiers was discussed:
      http://marc.info/?l=linux-kernel&m=135263661110528&w=2
      This failed because it could not handle deferred probes.
      
      This patch alone does not solve the entire dilemma faced:
      whether code should be distributed into the drivers or
      if it should be centralized to e.g. a PM domain. But it
      solves the immediate issue of the addition of boilerplate
      to a lot of drivers that just want to grab the default
      state. As mentioned, they can later explicitly retrieve
      the handle and set different states, and this could as
      well be done by e.g. PM domains as it is only related
      to a certain struct device * pointer.
      
      ChangeLog v4->v5 (Stephen):
      - Simplified the devicecore grab code.
      - Deleted a piece of documentation recommending that pins
        be mapped to a device rather than hogged.
      ChangeLog v3->v4 (Linus):
      - Drop overzealous NULL checks.
      - Move kref initialization to pinctrl_create().
      - Seeking Tested-by from Stephen Warren so we do not disturb
        the Tegra platform.
      - Seeking ACK on this from Greg (and others who like it) so I
        can merge it through the pinctrl subsystem.
      ChangeLog v2->v3 (Linus):
      - Abstain from using IS_ERR_OR_NULL() in the driver core,
        Russell recently sent a patch to remove it. Handle the
        NULL case explicitly even though it's a bogus case.
      - Make sure we handle probe deferral correctly in the device
        core file. devm_kfree() the container on error so we don't
        waste memory for devices without pinctrl handles.
      - Introduce reference counting into the pinctrl core using
        <linux/kref.h> so that we don't release pinctrl handles
        that have been obtained for two or more places.
      ChangeLog v1->v2 (Linus):
      - Only store a pointer in the device struct, and only allocate
        this if it's really used by the device.
      
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Mitch Bradley <wmb@firmworks.com>
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Cc: Rickard Andersson <rickard.andersson@stericsson.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      [swarren: fixed and simplified error-handling in pinctrl_bind_pins(), to
      correctly handle deferred probe. Removed admonition from docs not to use
      pinctrl hogs for devices]
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      ab78029e
  14. 20 7月, 2012 1 次提交
  15. 19 7月, 2012 1 次提交
    • L
      Make wait_for_device_probe() also do scsi_complete_async_scans() · eea03c20
      Linus Torvalds 提交于
      Commit a7a20d10 ("sd: limit the scope of the async probe domain")
      make the SCSI device probing run device discovery in it's own async
      domain.
      
      However, as a result, the partition detection was no longer synchronized
      by async_synchronize_full() (which, despite the name, only synchronizes
      the global async space, not all of them).  Which in turn meant that
      "wait_for_device_probe()" would not wait for the SCSI partitions to be
      parsed.
      
      And "wait_for_device_probe()" was what the boot time init code relied on
      for mounting the root filesystem.
      
      Now, most people never noticed this, because not only is it
      timing-dependent, but modern distributions all use initrd.  So the root
      filesystem isn't actually on a disk at all.  And then before they
      actually mount the final disk filesystem, they will have loaded the
      scsi-wait-scan module, which not only does the expected
      wait_for_device_probe(), but also does scsi_complete_async_scans().
      
      [ Side note: scsi_complete_async_scans() had also been partially broken,
        but that was fixed in commit 43a8d39d ("fix async probe
        regression"), so that same commit a7a20d10 had actually broken
        setups even if you used scsi-wait-scan explicitly ]
      
      Solve this problem by just moving the scsi_complete_async_scans() call
      into wait_for_device_probe().  Everybody who wants to wait for device
      probing to finish really wants the SCSI probing to complete, so there's
      no reason not to do this.
      
      So now "wait_for_device_probe()" really does what the name implies, and
      properly waits for device probing to finish.  This also removes the now
      unnecessary extra calls to scsi_complete_async_scans().
      Reported-and-tested-by: NArtem S. Tashkinov <t.artem@mailcity.com>
      Cc: Dan Williams <dan.j.williams@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: linux-scsi <linux-scsi@vger.kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      eea03c20
  16. 17 7月, 2012 2 次提交
    • R
      PM / Runtime: Do not increment device usage counts before probing · eed5d215
      Rafael J. Wysocki 提交于
      The pm_runtime_get_noresume() calls before really_probe() and
      before executing __device_attach() for each driver on the
      device's bus cause problems to happen if probing fails and if the
      driver has enabled runtime PM for the device in its .probe()
      callback.  Namely, in that case, if the device has been resumed
      by the driver after enabling its runtime PM and if it turns out that
      .probe() should return an error, the driver is supposed to suspend
      the device and disable its runtime PM before exiting .probe().
      However, because the device's runtime PM usage counter was
      incremented by the core before calling .probe(), the driver's attempt
      to suspend the device will not succeed and the device will remain in
      the full-power state after the failing .probe() has returned.
      
      To fix this issue, remove the pm_runtime_get_noresume() calls from
      driver_probe_device() and from device_attach() and replace the
      corresponding pm_runtime_put_sync() calls with pm_runtime_idle()
      to preserve the existing behavior (which is to check if the device
      is idle and to suspend it eventually in that case after probing).
      Reported-and-tested-by: NKevin Hilman <khilman@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      eed5d215
    • M
      driver core: Move deferred devices to the end of dpm_list before probing · 8153584e
      Mark Brown 提交于
      When deferred probe was originally added the idea was that devices which
      defer their probes would move themselves to the end of dpm_list in order
      to try to keep the assumptions that we're making about the list being in
      roughly the order things should be suspended correct. However this hasn't
      been what's been happening and doing it requires a lot of duplicated code
      to do the moves.
      
      Instead take a simple, brute force solution and have the deferred probe
      code push devices to the end of dpm_list before it retries the probe. This
      does mean we lock the dpm_list a bit more often but it's very simple and
      the code shouldn't be a fast path. We do the move with the deferred mutex
      dropped since doing things with fewer locks held simultaneously seems like
      a good idea.
      
      This approach was most recently suggested by Grant Likely.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Grant Likely <grant.likely@secretlab.ca>,
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8153584e
  17. 14 6月, 2012 2 次提交
  18. 09 3月, 2012 3 次提交
    • G
      driver core: minor comment formatting cleanups · 8b0372a2
      Greg Kroah-Hartman 提交于
      Came in in the deferred probe patch, quick, clean them up before a
      kernel janitor finds them and sends me 4 individual patches to fix them
      up...
      
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8b0372a2
    • G
      driver core: move the deferred probe pointer into the private area · ef8a3fd6
      Greg Kroah-Hartman 提交于
      Nothing outside of the driver core needs to get to the deferred probe
      pointer, so move it inside the private area of 'struct device' so no one
      tries to mess around with it.
      
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ef8a3fd6
    • G
      drivercore: Add driver probe deferral mechanism · d1c3414c
      Grant Likely 提交于
      Allow drivers to report at probe time that they cannot get all the resources
      required by the device, and should be retried at a later time.
      
      This should completely solve the problem of getting devices
      initialized in the right order.  Right now this is mostly handled by
      mucking about with initcall ordering which is a complete hack, and
      doesn't even remotely handle the case where device drivers are in
      modules.  This approach completely sidesteps the issues by allowing
      driver registration to occur in any order, and any driver can request
      to be retried after a few more other drivers get probed.
      
      v4: - Integrate Manjunath's addition of a separate workqueue
          - Change -EAGAIN to -EPROBE_DEFER for drivers to trigger deferral
          - Update comment blocks to reflect how the code really works
      v3: - Hold off workqueue scheduling until late_initcall so that the bulk
            of driver probes are complete before we start retrying deferred devices.
          - Tested with simple use cases.  Still needs more testing though.
            Using it to get rid of the gpio early_initcall madness, or to replace
            the ASoC internal probe deferral code would be ideal.
      v2: - added locking so it should no longer be utterly broken in that regard
          - remove device from deferred list at device_del time.
          - Still completely untested with any real use case, but has been
            boot tested.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dilan Lee <dilee@nvidia.com>
      Cc: Manjunath GKondaiah <manjunath.gkondaiah@linaro.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NDavid Daney <david.daney@cavium.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d1c3414c
  19. 27 9月, 2011 1 次提交
  20. 18 5月, 2011 1 次提交
    • R
      PM / Runtime: Rework runtime PM handling during driver removal · e1866b33
      Rafael J. Wysocki 提交于
      The driver core tries to prevent race conditions between runtime PM
      and driver removal from happening by incrementing the runtime PM
      usage counter of the device and executing pm_runtime_barrier() before
      running the bus notifier and the ->remove() callbacks provided by the
      device's subsystem or driver.  This guarantees that, if a future
      runtime suspend of the device has been scheduled or a runtime resume
      or idle request has been queued up right before the driver removal,
      it will be canceled or waited for to complete and no other
      asynchronous runtime suspend or idle requests for the device will be
      put into the PM workqueue until the ->remove() callback returns.
      However, it doesn't prevent resume requests from being queued up
      after pm_runtime_barrier() has been called and it doesn't prevent
      pm_runtime_resume() from executing the device subsystem's runtime
      resume callback.  Morever, it prevents the device's subsystem or
      driver from putting the device into the suspended state by calling
      pm_runtime_suspend() from its ->remove() routine.  This turns out to
      be a major inconvenience for some subsystems and drivers that want to
      leave the devices they handle in the suspended state.
      
      To really prevent runtime PM callbacks from racing with the bus
      notifier callback in __device_release_driver(), which is necessary,
      because the notifier is used by some subsystems to carry out
      operations affecting the runtime PM functionality, use
      pm_runtime_get_sync() instead of the combination of
      pm_runtime_get_noresume() and pm_runtime_barrier().  This will resume
      the device if it's in the suspended state and will prevent it from
      being suspended again until pm_runtime_put_*() is called.
      
      To allow subsystems and drivers to put devices into the suspended
      state by calling pm_runtime_suspend() from their ->remove() routines,
      execute pm_runtime_put_sync() after running the bus notifier in
      __device_release_driver().  This will require subsystems and drivers
      to make their ->remove() callbacks avoid races with runtime PM
      directly, but it will allow of more flexibility in the handling of
      devices during the removal of their drivers.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      e1866b33
  21. 23 4月, 2011 2 次提交
  22. 06 8月, 2010 1 次提交
    • M
      Driver core: Add BUS_NOTIFY_BIND_DRIVER · 45daef0f
      Magnus Damm 提交于
      Add BUS_NOTIFY_BIND_DRIVER as a bus notifier event.
      
      For driver binding/unbinding we with this in
      place have the following bus notifier events:
       - BUS_NOTIFY_BIND_DRIVER - before ->probe()
       - BUS_NOTIFY_BOUND_DRIVER - after ->probe()
       - BUS_NOTIFY_UNBIND_DRIVER - before ->remove()
       - BUS_NOTIFY_UNBOUND_DRIVER - after ->remove()
      
      The event BUS_NOTIFY_BIND_DRIVER allows bus code
      to be notified that ->probe() is about to be called.
      
      Useful for bus code that needs to setup hardware before
      the driver gets to run. With this in place platform
      drivers can be loaded and unloaded as modules and the
      new BIND event allows bus code to control for instance
      device clocks that must be enabled before the driver
      can be executed.
      
      Without this patch there is no way for the bus code to
      get notified that a modular driver is about to be probed.
      Signed-off-by: NMagnus Damm <damm@opensource.se>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      45daef0f
  23. 22 5月, 2010 1 次提交
  24. 08 3月, 2010 1 次提交
    • G
      Driver core: create lock/unlock functions for struct device · 8e9394ce
      Greg Kroah-Hartman 提交于
      In the future, we are going to be changing the lock type for struct
      device (once we get the lockdep infrastructure properly worked out)  To
      make that changeover easier, and to possibly burry the lock in a
      different part of struct device, let's create some functions to lock and
      unlock a device so that no out-of-core code needs to be changed in the
      future.
      
      This patch creates the device_lock/unlock/trylock() functions, and
      converts all in-tree users to them.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Magnus Damm <damm@igel.co.jp>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Vegard Nossum <vegard.nossum@gmail.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Alex Chiang <achiang@hp.com>
      Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andrew Patterson <andrew.patterson@hp.com>
      Cc: Yu Zhao <yu.zhao@intel.com>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Wolfram Sang <w.sang@pengutronix.de>
      Cc: CHENG Renquan <rqcheng@smu.edu.sg>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: David Vrabel <david.vrabel@csr.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      8e9394ce
  25. 04 12月, 2009 1 次提交
  26. 16 9月, 2009 1 次提交
  27. 23 8月, 2009 1 次提交
    • R
      PM: Introduce core framework for run-time PM of I/O devices (rev. 17) · 5e928f77
      Rafael J. Wysocki 提交于
      Introduce a core framework for run-time power management of I/O
      devices.  Add device run-time PM fields to 'struct dev_pm_info'
      and device run-time PM callbacks to 'struct dev_pm_ops'.  Introduce
      a run-time PM workqueue and define some device run-time PM helper
      functions at the core level.  Document all these things.
      
      Special thanks to Alan Stern for his help with the design and
      multiple detailed reviews of the pereceding versions of this patch
      and to Magnus Damm for testing feedback.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NMagnus Damm <damm@igel.co.jp>
      5e928f77
  28. 16 6月, 2009 1 次提交