Re: char device driver and bus ?



On 2007-07-13, freegnu@xxxxxxx <freegnu@xxxxxxx> wrote:

hi all, as we known, linux kernel device driver have three
layers: bus, device and dirver.

Really? I've been doing Linux device drivers for 10 years, and
that's news to me. Some sorts of devices have three layers,
some don't. Some are on buses, some aren't.

but when a char device register, i will added to:
chrdevs[MAX_PROBE_HASH] and it seems dont blong to any bus.

So?

does it means that the kernel only use the array
chrdevs[MAX_PROBE_HASH] to manager the driver and device?

No, it uses other things as well.

for example, a usb driver and usb device will mach by ID, but
when a serial driver and serial device will mach by what ?

I don't get your point. Some things are on buses, some aren't.
Some devices have three-layer drivers, some have two, some have
one -- there are probably some that have four or more.

ok , if a char deveice doesnt blong to any bus, how to
traversal the char devices? the array of
chrdevs[MAX_PROBE_HASH] doest EXPORT_SYMBOL

So is that your actual question? How to get a list of all char
devices the kernel knows about?

--
Grant Edwards grante Yow! An air of FRENCH FRIES
at permeates my nostrils!!
visi.com
.



Relevant Pages

  • Re: Objects in page appear and disapear.
    ... I suggest that you ensure that someone has not accidently unticked Visible for a layer under View / Layers. ... the print drivers are all up to date. ... > Also, as I mentioned, some of the original items on the page never go> away, ... verify that your video display drivers and printer drivers are up to ...
    (microsoft.public.visio.general)
  • Re: Im counting my threads, one, two, three, four, five... [1]
    ... hardware without panicing in the lower layers of the kernel. ... higher layers may still have a thing or two to learn in this respect. ... I think with network layer locking and dev_t locking being ... bus drivers not being happy with new-found sleeps. ...
    (freebsd-arch)
  • Re: Future of Native Apps?
    ... Historically programming is adding layers between the ... > support running of native x86 code .exes/dlls? ... > I understand native is needed for drivers etc. but at some point the ... > spec may even require MSIL and MSIL will add instructions to support ...
    (microsoft.public.dotnet.general)
  • Re: map a mouse button to a keyboard key?
    ... anyone have any idea if there is a serial driver for lirc on ... > freebsd out there? ... some of the "general" drivers are ...
    (comp.unix.bsd.freebsd.misc)
  • Re: [PATCH] USB: add USB test and measurement class driver - round 2
    ... a big fat mention in Documentation. ... You mean that the open/disconnect locking rule applies only to drivers ... In fact drivers not using the USB major but their own char devices ...
    (Linux-Kernel)