• Dominik Brodowski's avatar
    [PCMCIA] core socket sysfs support, export card type · c792495f
    Dominik Brodowski authored
    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.
    c792495f
cs_internal.h 6.55 KB