1. 15 11月, 2012 1 次提交
  2. 10 11月, 2012 1 次提交
  3. 07 9月, 2012 1 次提交
  4. 04 9月, 2012 1 次提交
    • R
      PM / Runtime: Allow helpers to be called by early platform drivers · bed2b42d
      Rafael J. Wysocki 提交于
      Runtime PM helper functions, like pm_runtime_get_sync(), cannot be
      called by early platform device drivers, because the devices' power
      management locks are not initialized at that time.  This is quite
      inconvenient, so modify early_platform_add_devices() to initialize
      the devices power management locks as appropriate and make sure that
      they won't be initialized more than once if an early platform
      device is going to be used as a regular one later.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      bed2b42d
  5. 17 8月, 2012 1 次提交
    • J
      platform: Add support for automatic device IDs · 689ae231
      Jean Delvare 提交于
      Right now we have support for explicit platform device IDs, as well as
      ID-less platform devices when a given device type can only have one
      instance. However there are cases where multiple instances of a device
      type can exist, and their IDs aren't (and can't be) known in advance
      and do not matter. In that case we need automatic device IDs to avoid
      device name collisions.
      
      I am using magic ID value -2 (PLATFORM_DEVID_AUTO) for this, similar
      to -1 for ID-less devices. The automatically allocated device IDs are
      global (to avoid an additional per-driver cost.) We keep note that the
      ID was automatically allocated so that it can be freed later.
      
      Note that we also restore the ID to PLATFORM_DEVID_AUTO on error and
      device deletion, to avoid avoid unexpected behavior on retry. I don't
      really expect retries on platform device addition, but better safe
      than sorry.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      689ae231
  6. 02 2月, 2012 1 次提交
    • G
      drivercore: Output common devicetree information in uevent · 07d57a32
      Grant Likely 提交于
      When userspace needs to find a specific device, it currently isn't easy to
      resolve a /sys/devices/ path from a specific device tree node.  Nor is it
      easy to obtain the compatible list for devices.
      
      This patch generalizes the code that inserts OF_* values into the uevent
      device attribute so that any device that is attached to an OF node will
      have that information exported to userspace.  Without this patch only
      platform devices and some powerpc-specific busses have access to this
      data.
      
      The original function also creates a MODALIAS property for the compatible
      list, but that code has not been generalized into the common case because
      it has the potential to break module loading on a lot of bus types.  Bus
      types are still responsible for their own MODALIAS properties.
      
      Boot tested on ARM and compile tested on PowerPC and SPARC.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Tobias Klauser <tklauser@distanz.ch>
      Cc: Frederic Lambert <frdrc66@gmail.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Mark Brown <broonie@sirena.org.uk>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      07d57a32
  7. 22 12月, 2011 1 次提交
  8. 10 12月, 2011 1 次提交
  9. 27 8月, 2011 1 次提交
  10. 23 8月, 2011 1 次提交
  11. 09 8月, 2011 1 次提交
  12. 08 7月, 2011 1 次提交
  13. 08 6月, 2011 1 次提交
  14. 17 5月, 2011 1 次提交
  15. 29 4月, 2011 2 次提交
  16. 23 4月, 2011 4 次提交
  17. 12 4月, 2011 2 次提交
    • S
      mfd: Fetch cell pointer from platform_device->mfd_cell · e710d7d5
      Samuel Ortiz 提交于
      In order for MFD drivers to fetch their cell pointer but also their
      platform data one, an mfd cell pointer is added to the platform_device
      structure.
      That allows all MFD sub devices drivers to be MFD agnostic, unless
      they really need to access their MFD cell data. Most of them don't,
      especially the ones for IPs used by both MFD and non MFD SoCs.
      
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Acked-by: NGreg KH <gregkh@suse.de>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      e710d7d5
    • R
      PM / Hibernate: Introduce CONFIG_HIBERNATE_CALLBACKS · 1f112cee
      Rafael J. Wysocki 提交于
      Xen save/restore is going to use hibernate device callbacks for
      quiescing devices and putting them back to normal operations and it
      would need to select CONFIG_HIBERNATION for this purpose.  However,
      that also would cause the hibernate interfaces for user space to be
      enabled, which might confuse user space, because the Xen kernels
      don't support hibernation.  Moreover, it would be wasteful, as it
      would make the Xen kernels include a substantial amount of code that
      they would never use.
      
      To address this issue introduce new power management Kconfig option
      CONFIG_HIBERNATE_CALLBACKS, such that it will only select the code
      that is necessary for the hibernate device callbacks to work and make
      CONFIG_HIBERNATION select it.  Then, Xen save/restore will be able to
      select CONFIG_HIBERNATE_CALLBACKS without dragging the entire
      hibernate code along with it.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: NShriram Rajagopalan <rshriram@cs.ubc.ca>
      1f112cee
  18. 23 10月, 2010 4 次提交
  19. 22 10月, 2010 1 次提交
    • G
      of/device: Rework to use common platform_device_alloc() for allocating devices · 7096d042
      Grant Likely 提交于
      The current code allocates and manages platform_devices created from
      the device tree manually.  It also uses an unsafe shortcut for
      allocating the platform_device and the resource table at the same
      time. (which I added in the last rework; sorry).
      
      This patch refactors the code to use platform_device_alloc() for
      allocating new devices.  This reduces the amount of custom code
      implemented by of_platform, eliminates the unsafe alloc trick, and has
      the side benefit of letting the platform_bus code manage freeing the
      device data and resources when the device is freed.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Michal Simek <monstr@monstr.eu>
      7096d042
  20. 06 8月, 2010 3 次提交
  21. 24 7月, 2010 2 次提交
    • G
      of: Merge of_platform_bus_type with platform_bus_type · eca39301
      Grant Likely 提交于
      of_platform_bus was being used in the same manner as the platform_bus.
      The only difference being that of_platform_bus devices are generated
      from data in the device tree, and platform_bus devices are usually
      statically allocated in platform code.  Having them separate causes
      the problem of device drivers having to be registered twice if it
      was possible for the same device to appear on either bus.
      
      This patch removes of_platform_bus_type and registers all of_platform
      bus devices and drivers on the platform bus instead.  A previous patch
      made the of_device structure an alias for the platform_device structure,
      and a shim is used to adapt of_platform_drivers to the platform bus.
      
      After all of of_platform_bus drivers are converted to be normal platform
      drivers, the shim code can be removed.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      eca39301
    • G
      drivercore/of: Add OF style matching to platform bus · 05212157
      Grant Likely 提交于
      As part of the merge between platform bus and of_platform bus, add the
      ability to do of-style matching to the platform bus.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Grant Likely <grant.likely@secretlab.ca>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: linux-kernel@vger.kernel.org
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linuxppc-dev@ozlabs.org
      CC: devicetree-discuss@lists.ozlabs.org
      05212157
  22. 22 5月, 2010 1 次提交
  23. 18 5月, 2010 1 次提交
  24. 13 5月, 2010 1 次提交
    • P
      driver core: Early dev_name() depends on slab_is_available(). · 06fe53be
      Paul Mundt 提交于
      The early dev_name() setup needs to do an allocation which can only be
      satisfied under slab_is_available() conditions. Some of the early
      platform drivers may be initialized before this point, and those still
      need to contend themselves with an empty dev_name.
      
      This fixes up a regression with the SH earlyprintk which was bailing out
      prior to hitting the early probe path due to not being able to satisfy
      the early allocation. Other early platform drivers (such as the early
      timers) that need to match the dev name are sufficiently late that
      allocations are already possible.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      06fe53be
  25. 11 5月, 2010 1 次提交
  26. 29 3月, 2010 1 次提交
  27. 19 3月, 2010 2 次提交
  28. 10 3月, 2010 1 次提交
    • P
      driver core: Early dev_name() support. · a636ee7f
      Paul Mundt 提交于
      Presently early platform devices suffer from the fact they are unable to
      use dev_xxx() calls early on due to dev_name() and others being
      unavailable at the time ->probe() is called.
      
      This implements early init_name construction from the matched name/id
      pair following the semantics of the late device/driver match. As a
      result, matched IDs (inclusive of requested ones) are preserved when the
      handoff from the early platform code happens at kobject initialization
      time.
      
      Since we still require kmalloc slabs to be available at this point, using
      kstrdup() for establishing the init_name works fine. This subsequently
      needs to be tested from dev_name() prior to the init_name being cleared
      by the driver core. We don't kfree() since others will already have a
      handle on the string long before the kobject initialization takes place.
      
      This is also needed to permit drivers to use the clock framework early,
      without having to manually construct their own device IDs from the match
      id/name pair locally (needed by the early console and timer code on sh
      and arm).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a636ee7f