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