1. 12 6月, 2009 1 次提交
  2. 25 3月, 2009 1 次提交
    • E
      platform: introduce module id table for platform devices · 57fee4a5
      Eric Miao 提交于
      Now platform_device is being widely used on SoC processors where the
      peripherals are attached to the system bus, which is simple enough.
      
      However, silicon IPs for these SoCs are usually shared heavily across
      a family of processors, even products from different companies.  This
      makes the original simple driver name based matching insufficient, or
      simply not straight-forward.
      
      Introduce a module id table for platform devices, and makes it clear
      that a platform driver is able to support some shared IP and handle
      slight differences across different platforms (by 'driver_data').
      Module alias is handled automatically when a MODULE_DEVICE_TABLE()
      is defined.
      
      To not disturb the current platform drivers too much, the matched id
      entry is recorded and can be retrieved by platform_get_device_id().
      Signed-off-by: NEric Miao <eric.miao@marvell.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      57fee4a5
  3. 17 2月, 2009 1 次提交
  4. 21 1月, 2009 1 次提交
  5. 15 10月, 2008 1 次提交
  6. 13 10月, 2008 1 次提交
    • D
      Automatic MODULE_ALIAS() for DMI match tables. · d945b697
      David Woodhouse 提交于
      This makes modpost handle MODULE_DEVICE_TABLE(dmi, xxxx).
      
      I had to change the string pointers in the match table to char arrays,
      and picked a size of 79 bytes almost at random -- do we need to make it
      bigger than that? I was a bit concerned about the 'bloat' this
      introduces into the match tables, but they should all be __initdata so
      it shouldn't matter too much.
      
      (Actually, modpost does go through the relocations and look at most of
      them; it wouldn't be impossible to make it handle string pointers -- but
      doesn't seem to be worth the effort, since they're __initdata).
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      d945b697
  7. 22 8月, 2008 1 次提交
  8. 25 7月, 2008 1 次提交
  9. 22 7月, 2008 1 次提交
  10. 14 7月, 2008 1 次提交
  11. 04 5月, 2008 1 次提交
    • J
      modpost: i2c aliases need no trailing wildcard · ac551828
      Jean Delvare 提交于
      Not all device types need a wildcard at the end of their module
      aliases. In particular, for i2c module aliases, the trailing wildcard
      is not only unneeded, it could also cause the wrong driver to be
      loaded.
      
      As I2C devices have no IDs, i2c module aliases are simple, arbitrary
      device names. For example:
      
      $ /sbin/modinfo lm90
      filename:       /lib/modules/2.6.25-git18/kernel/drivers/hwmon/lm90.ko
      author:         Jean Delvare <khali@linux-fr.org>
      description:    LM90/ADM1032 driver
      license:        GPL
      vermagic:       2.6.25-git18 mod_unload
      depends:        hwmon
      alias:          i2c:lm90*
      alias:          i2c:adm1032*
      alias:          i2c:lm99*
      alias:          i2c:lm86*
      alias:          i2c:max6657*
      alias:          i2c:adt7461*
      alias:          i2c:max6680*
      $
      
      This would cause trouble if one I2C chip name matches the beginning of
      another I2C chip name and both chips are supported by different
      drivers. For example, an i2c device named lm9042 would cause the lm90
      driver to be loaded, while it doesn't support that device. This case
      has yet to be seen in practice, but still, I'd like to fix it now. The
      cleanest fix is to remove the trailing wildcard from i2c module aliases.
      
      Here's a patch doing this.
      
      Not all device type aliases need a trailing wildcard, in particular
      the i2c aliases don't. Don't add a wildcard by default in do_table(),
      instead let each device type handler add it if needed.
      
      I have tested types acpi, dmi, eisa, i2c, ide, ieee1394, input, pci,
      pcmcia, platform, pnp, scsi, serio, ssb and usb. Other types (ccw, of,
      vio, parisc, sdio and virtio) are untested.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NJochen Friedrich <jochen@scram.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ac551828
  12. 30 4月, 2008 1 次提交
    • J
      i2c: Add support for device alias names · d2653e92
      Jean Delvare 提交于
      Based on earlier work by Jon Smirl and Jochen Friedrich.
      
      This patch allows new-style i2c chip drivers to have alias names using
      the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this
      point, the old i2c driver binding scheme (driver_name/type) is still
      supported.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Jochen Friedrich <jochen@scram.de>
      Cc: Jon Smirl <jonsmirl@gmail.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      d2653e92
  13. 20 4月, 2008 1 次提交
    • K
      PNP: add all PNP card device id's as individual aliases · 0c81eed4
      Kay Sievers 提交于
      The current PNP combined card + devices module aliase can
      never ever match anything, because these values are not available
      all at the same time to request a module.
      
      Instead of adding the combined alias, we add the device id's
      all as individual aliases. Device id's are exported by the PNP
      bus and can now properly used to request the loading of a
      matching module.
      
      The module snd-sbawe currently exports aliases, which can never
      match anything:
        alias: pnp:cCTLXXXXdCTL0045dCTL0022*
        alias: pnp:cCTLXXXXdCTL0044dCTL0023*
        alias: pnp:cCTLXXXXdCTL0042dCTL0022*
        alias: pnp:cCTLXXXXdCTL0041dCTL0021*
        alias: pnp:cCTLXXXXdCTL0031dCTL0021*
        alias: pnp:cCTL00eddCTL0041dCTL0070*
        alias: pnp:cCTL00e9dCTL0045dCTL0022*
        alias: pnp:cCTL00e4dCTL0045dCTL0022*
        alias: pnp:cCTL00c7dCTL0045dCTL0022*
        alias: pnp:cCTL00c5dCTL0045dCTL0022*
        alias: pnp:cCTL00c3dCTL0045dCTL0022*
        alias: pnp:cCTL00c1dCTL0042dCTL0022*
        alias: pnp:cCTL00b2dCTL0044dCTL0023*
        alias: pnp:cCTL009edCTL0044dCTL0023*
        alias: pnp:cCTL009ddCTL0042dCTL0022*
        alias: pnp:cCTL009fdCTL0041dCTL0021*
        alias: pnp:cCTL009cdCTL0041dCTL0021*
        alias: pnp:cCTL009adCTL0041dCTL0021*
        alias: pnp:cCTL0054dCTL0031dCTL0021*
        alias: pnp:cCTL0048dCTL0031dCTL0021*
        alias: pnp:cCTL0047dCTL0031dCTL0021*
        alias: pnp:cCTL0046dCTL0031dCTL0021*
        alias: pnp:cCTL0045dCTL0031dCTL0021*
        alias: pnp:cCTL0044dCTL0031dCTL0021*
        alias: pnp:cCTL0043dCTL0031dCTL0021*
        alias: pnp:cCTL0042dCTL0031dCTL0021*
        alias: pnp:cCTL0039dCTL0031dCTL0021*
        alias: pnp:cCTL0035dCTL0031dCTL0021*
      
      With this patch it exports only the device id's, as properly
      matchable aliases:
        alias: pnp:dCTL0070*
        alias: pnp:dCTL0045*
        alias: pnp:dCTL0023*
        alias: pnp:dCTL0044*
        alias: pnp:dCTL0022*
        alias: pnp:dCTL0042*
        alias: pnp:dCTL0041*
        alias: pnp:dCTL0021*
        alias: pnp:dCTL0031*
      
      Now, the exported value of the PNP bus can be used to autoload
      a matching module:
        $ modprobe --first-time -n -v pnp:dCTL0045
        insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/core/snd-rawmidi.ko
        insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
        insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/core/snd-hwdep.ko
        insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb-common.ko
        insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb16-csp.ko
        insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb16-dsp.ko
        insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/drivers/opl3/snd-opl3-lib.ko
        insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sbawe.ko
      
        $ grep CTL0045 /sys/bus/pnp/devices/*/id
        /sys/bus/pnp/devices/01:01.00/id:CTL0045
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0c81eed4
  14. 24 3月, 2008 1 次提交
  15. 02 2月, 2008 1 次提交
    • G
      USB: handle idVendor of 0x0000 · de6f92b9
      Greg Kroah-Hartman 提交于
      Some crazy devices in the wild have a vendor id of 0x0000.  If we try to
      add a module alias with this id, we just can't do it due to a check in
      the file2alias.c file.  Change the test to verify that both the vendor
      and product ids are 0x0000 to show a real "blank" module alias.
      
      Note, the module-init-tools package also needs to be changed to properly
      generate the depmod tables.
      
      Cc: Janusz <janumix@poczta.fm>
      Cc: stable <stable@kernel.org>
      Cc: Jon Masters <jcm@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      de6f92b9
  16. 23 10月, 2007 1 次提交
  17. 14 10月, 2007 1 次提交
    • J
      i2c: Kill struct i2c_device_id · cee37ae4
      Jean Delvare 提交于
      I2C devices do not have any form of ID as PCI or USB devices have.
      No driver uses "MODULE_DEVICE_TABLE(i2c, ...)" because it doesn't
      make sense. So we can get rid of struct i2c_device_id and the
      associated support code.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Greg KH <greg@kroah.com>
      cee37ae4
  18. 13 10月, 2007 1 次提交
  19. 11 10月, 2007 1 次提交
  20. 24 9月, 2007 1 次提交
  21. 24 7月, 2007 1 次提交
  22. 19 5月, 2007 1 次提交
  23. 03 5月, 2007 1 次提交
    • S
      kbuild: remove dependency on input.h from file2alias · dc24f0e7
      Sam Ravnborg 提交于
      Almost all definitions used by file2alias was already
      present in mod_devicetable.h.
      Added the last definition and killed the input.h usage.
      
      The errornous include was pointed out
      by: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Cc: Deepak Saxena <dsaxena@plexity.net>
      dc24f0e7
  24. 17 2月, 2007 2 次提交
  25. 27 9月, 2006 1 次提交
    • M
      [PATCH] EISA bus MODALIAS attributes support · 07563c71
      Michael Tokarev 提交于
      Add modalias attribute support for the almost forgotten now EISA bus and
      (at least some) EISA-aware modules.
      
      The modalias entry looks like (for an 3c509 NIC):
      
       eisa:sTCM5093
      
      and the in-module alias like:
      
       eisa:sTCM5093*
      
      The patch moves struct eisa_device_id declaration from include/linux/eisa.h
      to include/linux/mod_devicetable.h (so that the former now #includes the
      latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all
      drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE
      declared), and adds recognision of __mod_eisa_device_table to
      scripts/mod/file2alias.c so that proper modules.alias will be generated.
      
      There's no support for /lib/modules/$kver/modules.eisamap, as it's not used
      by any existing tools, and because with in-kernel modalias mechanism those
      maps are obsolete anyway.
      
      The rationale for this patch is:
      
       a) to make EISA bus to act as other busses with modalias
          support, to unify driver loading
      
       b) to foget about EISA finally - with this patch, kernel
          (who still supports EISA) will be the only one who knows
          how to choose the necessary drivers for this bus ;)
      
      [akpm@osdl.org: fix the kbuild bit]
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Acked-the-net-bits-by: NJeff Garzik <jeff@garzik.org>
      Acked-the-tulip-bit-by: NValerie Henson <val_henson@linux.intel.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      07563c71
  26. 20 9月, 2006 1 次提交
    • M
      [S390] zcrypt adjunct processor bus. · 1534c382
      Martin Schwidefsky 提交于
      Add a bus for the adjunct processor interface. Up to 64 devices can
      be connect to the ap bus interface, each device with 16 domains. That
      makes 1024 message queues. The interface is asynchronous, the answer
      to a message sent to a queue needs to be received at some later point
      in time. Unfortunately the interface does not provide interrupts when
      a message reply is pending. So the ap bus needs to implement some
      fancy polling, each active queue is polled once per 1/HZ second or
      continuously if an idle cpus exsists and the poll thread is activ
      (see poll_thread parameter).
      
      The ap bus uses the sysfs path /sys/bus/ap and has two bus attributes,
      ap_domain and config_time. The ap_domain selects one of the 16 domains
      to be used for this system. This limits the maximum number of ap devices
      to 64. The config_time attribute contains the number of seconds between
      two ap bus scans to find new devices.
      
      The ap bus uses the modalias entries of the form "ap:tN" to autoload
      the ap driver for hardware type N. Currently known types are:
      3 - PCICC, 4 - PCICA, 5 - PCIXCC, 6 - CEX2A and 7 - CEX2C.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NRalph Wuerthner <rwuerthn@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      1534c382
  27. 16 8月, 2006 1 次提交
    • H
      [PATCH] PATCH: 1 line 2.6.18 bugfix: modpost-64bit-fix.patch · e0e92632
      Hans de Goede 提交于
      There is a small but annoying bug in scripts/mod/file2alias.c which causes
      it to generate invalid aliases for input devices on 64 bit archs. This causes
      joydev.ko to not be automaticly loaded when inserting a joystick, resulting in
      a non working joystick (for the average user).
      
      In scripts/mod/file2alias.c is the following code for generating the input
      aliases:
      static void do_input(char *alias,
                           kernel_ulong_t *arr, unsigned int min, unsigned int max)
      {
              unsigned int i;
      
              for (i = min; i < max; i++)
                      if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
                              sprintf(alias + strlen(alias), "%X,*", i);
      }
      
      On 32 bits systems, this correctly generates "0,*" for the first alias, "8,*"
      for the second etc.
      
      However on 64 bits it generates: "0,*20,*" resp "8,*28,*" Notice how it adds 20
      + first entry (hex) ! to the list of hex codes, which is 32 more then the first
      entry, thus is because the bit test above wraps at 32 bits instead of 64.
      
      scripts/mod/file2alias.c, line 379 reads:
                      if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
      That should be:
                      if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG)))
      
      Notice the added 'L' after the 1, otherwise that is an 32 bit int instead of a
      64 bit long, and when that int gets shifted >= 32 times, appearantly the number
      by which to shift is wrapped at 5 bits ( % 32) causing it to test a bit 32 bits
      too low.
      
      The patch below makes the nescesarry 1 char change :)
      Signed-off-by: NHans de Goede <j.w.r.degoede@hhs.nl>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e0e92632
  28. 01 8月, 2006 1 次提交
    • S
      kbuild: improve error from file2alias · fb33d816
      Sam Ravnborg 提交于
      The original errormessage was just plain unreadable.
      
      Sample error message after this update (not for real - I provoked it):
      
      FATAL: drivers/net/s2io: sizeof(struct pci_device_id)=33 is not a modulo of the
      size of section __mod_pci_device_table=160.
      Fix definition of struct pci_device_id in mod_devicetable.h
      
      Before a warning was generated - this is now a fatal error.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      fb33d816
  29. 26 4月, 2006 1 次提交
  30. 07 3月, 2006 1 次提交
  31. 03 3月, 2006 1 次提交
  32. 19 2月, 2006 1 次提交
  33. 09 1月, 2006 1 次提交
  34. 05 1月, 2006 1 次提交
    • R
      [PATCH] Input: add modalias support · 1d8f430c
      Rusty Russell 提交于
      Here's the patch for modalias support for input classes.  It uses
      comma-separated numbers, and doesn't describe all the potential keys (no
      module currently cares, and that would make the strings huge).  The
      changes to input.h are to move the definitions needed by file2alias
      outside __KERNEL__.  I chose not to move those definitions to
      mod_devicetable.h, because there are so many that it might break compile
      of something else in the kernel.
      
      The rest is fairly straightforward.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      CC: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1d8f430c
  35. 29 10月, 2005 1 次提交
  36. 26 9月, 2005 1 次提交
  37. 30 8月, 2005 1 次提交
  38. 07 7月, 2005 1 次提交
  39. 28 6月, 2005 1 次提交