[question] between probe() and open()

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

 



Hello,

This is a question in general about usb drivers and
in particular about easycap driver.

Is there any way a driver can be accesed
between after usb_probe() but before device open()?
I guess not, since any further operation on
the device needs a struct file pointer, i.e. a file descriptor on
the user side.

In particular:
easycap driver currently calls reset() on usb_probe(),
reset() does some hardware initialization among other stuff.
However, the reset() is called once again on open().
This seems redundant, right?

The reset() is a heavy function since it access the hardware, so
it would be benefitial to change it,
but I would like someone to ack this, since it is not so trivial.

Some measures on the device shows how heavy the reset() is:

# calling reset() on usb_probe()
time modprobe easycap

real    0m1.516s
user    0m0.000s
sys     0m0.009s

---

# not calling reset() on usb_probe()
time modprobe easycap

real    0m0.003s
user    0m0.000s
sys     0m0.002s

Thanks,
Ezequiel.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux