Re: Libusb: Usbfs vs Sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 15, 2010 at 03:54:29PM +0530, Amit Nagal wrote:
> >> 5) Is it possible to do I/O with a usb device endpoints using sysfs ?
> >
> > Depends on the i/o you want to do :)
> >
> 
> for eg to do usb bulk i/o with device bulk endpoints .

How do you do such I/O using sysfs to a USB device?

> >> 6) Upon a usb device plugin , which filesystem (usbfs or sysfs )
> >> provides ?the device information faster ?
> >
> > What is "faster"? ?What "device information" do you want to get?
> 
> upon usb connect / disconnect ,   i want to extract device infomation
> (VID /PID  ) to match my device .
> so i should scan /sys/bus/usb/devices or /proc/bus/usb/BBB/DDD .
> which one provides the information first via descriptors file ?

Neither, use libudev and your code will be notified when the kernel
notifies userspace of a device showing up/going away.  That happens
first.

Actually, libudev uses sysfs here, and both get created by the kernel at
pretty much exactly the same time.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux