Messages in this thread | | | Date | Wed, 21 Dec 2011 19:51:15 -0800 | From | Greg KH <> | Subject | Re: help about device driver |
| |
On Thu, Dec 22, 2011 at 10:55:49AM +0800, mengdeguo wrote: > Hi, > > > > I find a problem very confusing. Devices are divided into char/block/network dev. By the definition i2c, usb ,input devices belong to char devices. But walk across all the device driver, I can not find the cdev struct for them (i2c ,usb ,input devices). What's the problem ? This devices don't need cdev, if so, what do we do to associate file_operations with dev node?
What device node is associated with a usb device?
cdev structures are only there for character device nodes, the majority of drivers never use that at all, that's what the different "class"es are for (input, tty, misc, etc.)
greg k-h
| |