• Alex Kanavin's avatar
    [PATCH] USB: export inteface and configuration strings to sysfs · 8e8f500e
    Alex Kanavin authored
     this patch adds exporting of configuration and interface strings to sysfs.
    
     both configuration and interface strings are present on my Nokia
     7610 phone, which can be connected via USB, and I thought it would be a
     good idea to make them easily accessible via sysfs:
    
     [root@cs181035096 usb1]# cat 1-1/manufacturer 1-1/product
     Nokia
     7610
     [root@cs181035096 usb1]# grep "" `find . -name configuration`
     ./1-1/configuration:First and Last and Always
     [root@cs181035096 usb1]# grep "" `find . -name interface`
     ./1-1/1-1:1.6/interface:CDC Data Interface
     ./1-1/1-1:1.5/interface:CDC Comms Interface
     ./1-1/1-1:1.3/interface:PC Suite Services
     ./1-1/1-1:1.1/interface:SYNCML-SYNC
    
     The first two interfaces are for accessing the GPRS modem, they are
     recognized and supported perfectly by the cdc_acm driver. The last two
     are CDC OBEX interfaces, for which there is no driver currently, but I plan to
     write one. This would allow userspace to do really nifty things, for
     example accessing the phone filesystem, and exchanging contacts and
     calendar entries via SyncML. Pretty much the same thing that Nokia PC
     Suite does. But the software needs to distinguish between the two OBEX
     interfaces (which is syncml and which is file transfer? the only way to
     know is to read the strings), and that"s why this patch was written.
    Signed-off-by: default avatarAlex Kanavin <ak@sensi.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    8e8f500e
sysfs.c 8.22 KB