Help!

char device driver and bus ?


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> System Development RSS
Next:  Undefined SysCall  
Author Message
freegnu
External


Since: Jul 12, 2007
Posts: 2



PostPosted: Thu Jul 12, 2007 6:19 pm    Post subject: char device driver and bus ?
Archived from groups: comp>os>linux>development>system (more info?)

hi all, as we known, linux kernel device driver have three layers:
bus, device and dirver.
but when a char device register, i will added to:
chrdevs[MAX_PROBE_HASH] and it seems dont blong to any bus.
does it means that the kernel only use the array
chrdevs[MAX_PROBE_HASH] to manager the driver and device?
for example, a usb driver and usb device will mach by ID, but when a
serial driver and serial device will mach by what ?

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
Back to top
Grant Edwards
External


Since: Jun 08, 2004
Posts: 1264



PostPosted: Fri Jul 13, 2007 1:16 pm    Post subject: Re: char device driver and bus ? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2007-07-13, freegnu RemoveThis @163.com <freegnu RemoveThis @163.com> 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
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> System Development All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum