Back to home page

OSCL-LXR

 
 

    


0001 =============
0002 PCMCIA Driver
0003 =============
0004 
0005 sysfs
0006 -----
0007 
0008 New PCMCIA IDs may be added to a device driver pcmcia_device_id table at
0009 runtime as shown below::
0010 
0011   echo "match_flags manf_id card_id func_id function device_no \
0012   prod_id_hash[0] prod_id_hash[1] prod_id_hash[2] prod_id_hash[3]" > \
0013   /sys/bus/pcmcia/drivers/{driver}/new_id
0014 
0015 All fields are passed in as hexadecimal values (no leading 0x).
0016 The meaning is described in the PCMCIA specification, the match_flags is
0017 a bitwise or-ed combination from PCMCIA_DEV_ID_MATCH_* constants
0018 defined in include/linux/mod_devicetable.h.
0019 
0020 Once added, the driver probe routine will be invoked for any unclaimed
0021 PCMCIA device listed in its (newly updated) pcmcia_device_id list.
0022 
0023 A common use-case is to add a new device according to the manufacturer ID
0024 and the card ID (form the manf_id and card_id file in the device tree).
0025 For this, just use::
0026 
0027   echo "0x3 manf_id card_id 0 0 0 0 0 0 0" > \
0028     /sys/bus/pcmcia/drivers/{driver}/new_id
0029 
0030 after loading the driver.