driver.rst 1006 B

123456789101112131415161718192021222324252627282930
  1. =============
  2. PCMCIA Driver
  3. =============
  4. sysfs
  5. -----
  6. New PCMCIA IDs may be added to a device driver pcmcia_device_id table at
  7. runtime as shown below::
  8. echo "match_flags manf_id card_id func_id function device_no \
  9. prod_id_hash[0] prod_id_hash[1] prod_id_hash[2] prod_id_hash[3]" > \
  10. /sys/bus/pcmcia/drivers/{driver}/new_id
  11. All fields are passed in as hexadecimal values (no leading 0x).
  12. The meaning is described in the PCMCIA specification, the match_flags is
  13. a bitwise or-ed combination from PCMCIA_DEV_ID_MATCH_* constants
  14. defined in include/linux/mod_devicetable.h.
  15. Once added, the driver probe routine will be invoked for any unclaimed
  16. PCMCIA device listed in its (newly updated) pcmcia_device_id list.
  17. A common use-case is to add a new device according to the manufacturer ID
  18. and the card ID (form the manf_id and card_id file in the device tree).
  19. For this, just use::
  20. echo "0x3 manf_id card_id 0 0 0 0 0 0 0" > \
  21. /sys/bus/pcmcia/drivers/{driver}/new_id
  22. after loading the driver.