1. 27 Jul, 2015 1 commit
    • Tomeu Vizoso's avatar
      of: constify drv arg of of_driver_match_device stub · 35068ce8
      Tomeu Vizoso authored
      With this change the stub has the same signature as the actual function,
      preventing this compiler warning when building without CONFIG_OF:
      
         drivers/base/property.c: In function 'fwnode_driver_match_device':
      >> drivers/base/property.c:608:38: warning: passing argument 2 of 'of_driver_match_device' discards 'const' qualifier from pointer target type
            return of_driver_match_device(dev, drv);
                                               ^
         In file included from drivers/base/property.c:18:0:
         include/linux/of_device.h:61:19: note: expected 'struct device_driver *' but argument is of type 'const struct device_driver *'
          static inline int of_driver_match_device(struct device *dev,
                            ^
      Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      35068ce8
  2. 28 May, 2015 1 commit
  3. 03 Mar, 2015 1 commit
  4. 05 Feb, 2014 1 commit
  5. 16 Jan, 2014 1 commit
  6. 21 Aug, 2013 1 commit
  7. 12 Jun, 2013 1 commit
  8. 16 Mar, 2012 1 commit
    • Paul Gortmaker's avatar
      device.h: audit and cleanup users in main include dir · 313162d0
      Paul Gortmaker authored
      The <linux/device.h> header includes a lot of stuff, and
      it in turn gets a lot of use just for the basic "struct device"
      which appears so often.
      
      Clean up the users as follows:
      
      1) For those headers only needing "struct device" as a pointer
      in fcn args, replace the include with exactly that.
      
      2) For headers not really using anything from device.h, simply
      delete the include altogether.
      
      3) For headers relying on getting device.h implicitly before
      being included themselves, now explicitly include device.h
      
      4) For files in which doing #1 or #2 uncovers an implicit
      dependency on some other header, fix by explicitly adding
      the required header(s).
      
      Any C files that were implicitly relying on device.h to be
      present have already been dealt with in advance.
      
      Total removals from #1 and #2: 51.  Total additions coming
      from #3: 9.  Total other implicit dependencies from #4: 7.
      
      As of 3.3-rc1, there were 110, so a net removal of 42 gives
      about a 38% reduction in device.h presence in include/*
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      313162d0
  9. 01 Feb, 2012 1 commit
    • Grant Likely's avatar
      drivercore: Output common devicetree information in uevent · 07d57a32
      Grant Likely authored
      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: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarGreg 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
  10. 18 May, 2011 2 commits
    • Grant Likely's avatar
      drivercore: revert addition of of_match to struct device · b1608d69
      Grant Likely authored
      Commit b826291c, "drivercore/dt: add a match table pointer to struct
      device" added an of_match pointer to struct device to cache the
      of_match_table entry discovered at driver match time.  This was unsafe
      because matching is not an atomic operation with probing a driver.  If
      two or more drivers are attempted to be matched to a driver at the
      same time, then the cached matching entry pointer could get
      overwritten.
      
      This patch reverts the of_match cache pointer and reworks all users to
      call of_match_device() directly instead.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      b1608d69
    • Milton Miller's avatar
      of: fix race when matching drivers · 01294d82
      Milton Miller authored
      If two drivers are probing devices at the same time, both will write
      their match table result to the dev->of_match cache at the same time.
      
      Only write the result if the device matches.
      
      In a thread titled "SBus devices sometimes detected, sometimes not",
      Meelis reported his SBus hme was not detected about 50% of the time.
      From the debug suggested by Grant it was obvious another driver matched
      some devices between the call to match the hme and the hme discovery
      failling.
      Reported-by: default avatarMeelis Roos <mroos@linux.ee>
      Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
      [grant.likely: modified to only call of_match_device() once]
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      01294d82
  11. 28 Feb, 2011 1 commit
  12. 21 Oct, 2010 1 commit
    • Grant Likely's avatar
      of/device: Rework to use common platform_device_alloc() for allocating devices · 7096d042
      Grant Likely authored
      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: default avatarGrant 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
  13. 06 Aug, 2010 1 commit
  14. 30 Jul, 2010 1 commit
  15. 24 Jul, 2010 3 commits
  16. 05 Jul, 2010 4 commits
  17. 28 Jun, 2010 1 commit
    • Grant Likely's avatar
      of: kill struct of_device · b505ff5e
      Grant Likely authored
      Now that the device tree node pointer has been moved out of struct
      of_device and into the common struct device, there isn't anything
      unique about of_device anymore.  In fact, there isn't much need
      for a separate of_bus when all busses have access to OF style
      probing.
      
      arch/powerpc and arch/microblaze are moving away from using the of_bus
      and using the regular platform bus instead for mmio devices.  This
      patch makes of_device the same as platform_device as a stepping stone
      in migrating of_platform_drivers over to the platform bus.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      b505ff5e
  18. 22 May, 2010 1 commit
  19. 28 Apr, 2010 1 commit
  20. 16 May, 2008 1 commit
  21. 30 Apr, 2008 1 commit
  22. 16 Jan, 2008 1 commit
  23. 17 Oct, 2007 1 commit
  24. 19 Jul, 2007 1 commit
  25. 07 May, 2007 1 commit
  26. 12 Apr, 2007 1 commit
  27. 04 Dec, 2006 1 commit
    • Benjamin Herrenschmidt's avatar
      [POWERPC] Refactor 64 bits DMA operations · 12d04eef
      Benjamin Herrenschmidt authored
      This patch completely refactors DMA operations for 64 bits powerpc. 32 bits
      is untouched for now.
      
      We use the new dev_archdata structure to add the dma operations pointer
      and associated data to struct device. While at it, we also add the OF node
      pointer and numa node. In the future, we might want to look into merging
      that with pci_dn as well.
      
      The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced
      by a set of generic iommu and direct DMA ops (non PCI specific) that can be
      used by bus types. The toplevel implementation is now inline.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      12d04eef
  28. 03 Dec, 2006 1 commit
    • Benjamin Herrenschmidt's avatar
      [POWERPC] Souped-up of_platform_device support · 7eebde70
      Benjamin Herrenschmidt authored
      This patch first splits of_device.c and of_platform.c, the later containing
      the bits relative to of_platform_device's. On the "breaks" side of things,
      drivers uisng of_platform_device(s) need to include asm/of_platform.h now
      and of_(un)register_driver is now of_(un)register_platform_driver.
      
      In addition to a few utility functions to locate of_platform_device(s),
      the main new addition is of_platform_bus_probe() which allows the platform
      code to trigger an automatic creation of of_platform_devices for a whole
      tree of devices.
      
      The function acts based on the type of the various "parent" devices encountered
      from a provided root, using either a default known list of bus types that can be
      "probed" or a passed-in list. It will only register devices on busses matching
      that list, which mean that typically, it will not register PCI devices, as
      expected (since they will be picked up by the PCI layer).
      
      This will be used by Cell platforms using 4xx-type IOs in the Axon bridge
      and can be used by any embedded-type device as well.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      7eebde70
  29. 30 Jun, 2006 1 commit
  30. 08 Jan, 2006 1 commit
  31. 05 Oct, 2005 1 commit
  32. 22 Sep, 2005 1 commit
    • Benjamin Herrenschmidt's avatar
      [PATCH] ppc64: SMU driver update & i2c support · 0365ba7f
      Benjamin Herrenschmidt authored
      The SMU is the "system controller" chip used by Apple recent G5 machines
      including the iMac G5.  It drives things like fans, i2c busses, real time
      clock, etc...
      
      The current kernel contains a very crude driver that doesn't do much more
      than reading the real time clock synchronously.  This is a completely
      rewritten driver that provides interrupt based command queuing, a userland
      interface, and an i2c/smbus driver for accessing the devices hanging off
      the SMU i2c busses like temperature sensors.  This driver is a basic block
      for upcoming work on thermal control for those machines, among others.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0365ba7f
  33. 06 Jul, 2005 1 commit
  34. 16 Apr, 2005 1 commit