blob: 5c4fe84d51c14caed1fba614934b37bdc51b4420 [file] [log] [blame]
Mauro Carvalho Chehab3bdab162019-06-12 14:52:53 -03001=============
Bernhard Walle6179b552007-05-06 14:48:44 -07002PCMCIA Driver
Mauro Carvalho Chehab3bdab162019-06-12 14:52:53 -03003=============
Bernhard Walle6179b552007-05-06 14:48:44 -07004
5sysfs
6-----
7
8New PCMCIA IDs may be added to a device driver pcmcia_device_id table at
Mauro Carvalho Chehab3bdab162019-06-12 14:52:53 -03009runtime as shown below::
Bernhard Walle6179b552007-05-06 14:48:44 -070010
Mauro Carvalho Chehab3bdab162019-06-12 14:52:53 -030011 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
Bernhard Walle6179b552007-05-06 14:48:44 -070014
15All fields are passed in as hexadecimal values (no leading 0x).
16The meaning is described in the PCMCIA specification, the match_flags is
17a bitwise or-ed combination from PCMCIA_DEV_ID_MATCH_* constants
18defined in include/linux/mod_devicetable.h.
19
20Once added, the driver probe routine will be invoked for any unclaimed
21PCMCIA device listed in its (newly updated) pcmcia_device_id list.
22
23A common use-case is to add a new device according to the manufacturer ID
24and the card ID (form the manf_id and card_id file in the device tree).
Mauro Carvalho Chehab3bdab162019-06-12 14:52:53 -030025For this, just use::
Bernhard Walle6179b552007-05-06 14:48:44 -070026
Mauro Carvalho Chehab3bdab162019-06-12 14:52:53 -030027 echo "0x3 manf_id card_id 0 0 0 0 0 0 0" > \
28 /sys/bus/pcmcia/drivers/{driver}/new_id
Bernhard Walle6179b552007-05-06 14:48:44 -070029
30after loading the driver.