From: Johann D. <jo...@Do...> - 2001-06-19 20:42:38
|
On Tue, 19 Jun 2001, James Simmons wrote: > > > Now the question is: What is the role of input_dev::close/open ? > > Are they meant as "init/deinit the device" or "establish/break connection > > with processes" (or a mix of both) ? > > If you look at input.c connect and disconnect are used by input_register > and input_unregister which are called when you insmod the device or at > boot time. So they are used to setup the hardware and the data structs for > the device. Now open and close are called input_open_device and > input_close_device. Now if look at what calls input_[opne/close]_device > they are all some kind of userland interface i.e evdev, mousedev, joydev.c > etc. There are parts of evdev functions called by userland, and other parts called by other modules. Namely, evdev_disconnect can be called by serio, for example. The problem is still there: I would expect input_open_device/input_close_devise to be called at least the same number of times (perhaps we should even take care of the order). > > P.S > > Lets coordinate our work. I'm working on power management right now > which also changes things like input.c. I have pretty much figured out pm > handling per device. The problem is general powering down a device. How to > handle things like a power power that suspends a PDA. This is much > trickier. > Ok, I will play with the files and try to figure out everything locally. We should not have sync problem, but I will wait for you to be finished before commiting anything. -- Johann Deneux CS student at DoCS (www.docs.uu.se/~johannd) and ESIL (www.esil.univ-mrs.fr/~jdeneux) |