]> git.hungrycats.org Git - linux/commit
[PCMCIA] core socket sysfs support, export card type
authorDominik Brodowski <linux@de.rmk.(none)>
Tue, 6 Jul 2004 21:45:17 +0000 (22:45 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Tue, 6 Jul 2004 21:45:17 +0000 (22:45 +0100)
commitc792495fa35173eb773abcf944911df3d18b372e
tree50e30372d7c7e328773d2bb5c159553dfcee0d58
parentb5b41e496b31e8d73f6e3644f2647e5d96785ea5
[PCMCIA] core socket sysfs support, export card type

Patch from Dominik Brodowski

Add a first socket-related sysfs entry; and to keep things ordered,
do so in a new file drivers/pcmcia/socket_sysfs.c. To keep things
easy, all files will be present all the time, even if no card is in
the socket at a specific moment -- however, accessing the file will
result in -ENODEV then, so that

# cat /sys/class/pcmcia_socket/pcmcia_socket1/card_type

will cause an error message like

"cat: card_type: No such device"

which is quite self-explanatory.

The attribute "card_type" will return either "16-bit" or "32-bit",
depending on whether the PCCard is a 16-bit PCMCIA card or a 32-bit
CardBus card. The result "invalid" should not happen, and if it
happens, something strange is going on.
drivers/pcmcia/Makefile
drivers/pcmcia/cs.c
drivers/pcmcia/cs_internal.h
drivers/pcmcia/socket_sysfs.c [new file with mode: 0644]