|author||Bernhard Walle <firstname.lastname@example.org>||2007-05-06 14:48:44 -0700|
|committer||Linus Torvalds <email@example.com>||2007-05-07 12:12:50 -0700|
add new_id to PCMCIA drivers
PCI drivers have the new_id file in sysfs which allows new IDs to be added at runtime. The advantage is to avoid re-compilation of a driver that works for a new device, but it's ID table doesn't contain the new device. This mechanism is only meant for testing, after the driver has been tested successfully, the ID should be added in source code so that new revisions of the kernel automatically detect the device. The implementation follows the PCI implementation. The interface is documented in Documentation/pcmcia/driver.txt. Computations should be done in userspace, so the sysfs string contains the raw structure members for matching. Signed-off-by: Bernhard Walle <firstname.lastname@example.org> Cc: Dominik Brodowski <email@example.com> Cc: Greg KH <firstname.lastname@example.org> Signed-off-by: Andrew Morton <email@example.com> Signed-off-by: Linus Torvalds <firstname.lastname@example.org>
Diffstat (limited to 'Documentation/pcmcia')
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/pcmcia/driver.txt b/Documentation/pcmcia/driver.txt
new file mode 100644
@@ -0,0 +1,30 @@
+New PCMCIA IDs may be added to a device driver pcmcia_device_id table at
+runtime as shown below:
+echo "match_flags manf_id card_id func_id function device_no \
+prod_id_hash prod_id_hash prod_id_hash prod_id_hash" > \
+All fields are passed in as hexadecimal values (no leading 0x).
+The meaning is described in the PCMCIA specification, the match_flags is
+a bitwise or-ed combination from PCMCIA_DEV_ID_MATCH_* constants
+defined in include/linux/mod_devicetable.h.
+Once added, the driver probe routine will be invoked for any unclaimed
+PCMCIA device listed in its (newly updated) pcmcia_device_id list.
+A common use-case is to add a new device according to the manufacturer ID
+and the card ID (form the manf_id and card_id file in the device tree).
+For this, just use:
+echo "0x3 manf_id card_id 0 0 0 0 0 0 0" > \
+after loading the driver.