From: p.ittershagen@googlemail.com (Philipp Ittershagen)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How does the driver initialize corresponding with several same devices ?
Date: Wed, 18 Apr 2012 13:07:09 +0200 [thread overview]
Message-ID: <20120418110708.GB23658@peter> (raw)
In-Reply-To: <CAK7N6vpEL21SUMWk05ODDY+JE4gMDz7A17zfZDnsfU-=Nw6hiA@mail.gmail.com>
On Wed, Apr 18, 2012 at 04:32:12PM +0530, anish singh wrote:
> On Wed, Apr 18, 2012 at 4:18 PM, Philipp Ittershagen
> <p.ittershagen@googlemail.com> wrote:
> > On Wed, Apr 18, 2012 at 05:16:01PM +0800, Li Haifeng wrote:
> >> I make a driver module and built in the kernel.?There are three devices use
> >> the same driver on the hardware platform.?To use each device, the probe
> >> function of the driver module should be probed. So, the driver module is
> >> registered in the kernel.
> >>
> >> My question is, how times should the probe function of the driver be called
> >> and create nodes in devfs to corresponding with the three devices?
> >
> > It depends on what your architecture supports. If you have support for device
> > tree, your entry in the device tree will make the subsystem call your probe
> > function for each device it finds. You can then check the `compatible` entry
> > of the device node and your driver is then able to register itself to the
> > kernel subsystem.
> Without device tree what would be your answer as i guess device
> tree has come recently in picture but not sure.
Let me rephrase your question and see if I understand it correctly. You have a
probe function which already gets called for each device in your platform and
you want to know how to make each device accessible in userspace (using i.e.
devfs nodes) ?
Greetings,
Philipp
next prev parent reply other threads:[~2012-04-18 11:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFNq8R4U-1c4ONn8EDZ7-ZgO2BC0r1JvsBxKsD1MeBzRndJr-w@mail.gmail.com>
[not found] ` <CAFNq8R4dF+QPvPcy5+SSOBketAdzyJfJ6WonX0Z8OHztcvsYvA@mail.gmail.com>
2012-04-18 9:16 ` How does the driver initialize corresponding with several same devices ? Li Haifeng
2012-04-18 10:48 ` Philipp Ittershagen
[not found] ` <CAK7N6vpEL21SUMWk05ODDY+JE4gMDz7A17zfZDnsfU-=Nw6hiA@mail.gmail.com>
2012-04-18 11:07 ` Philipp Ittershagen [this message]
2012-04-18 11:11 ` anish singh
2012-04-18 13:38 ` Li Haifeng
2012-04-18 10:59 ` Javier Martinez Canillas
2012-04-18 11:01 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120418110708.GB23658@peter \
--to=p.ittershagen@googlemail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).