All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wojciech Domski <wojciech.domski@gmail.com>
To: xenomai@xenomai.org
Subject: [Xenomai] Writing RTDM driver for multiple PCI cards
Date: Thu, 09 Apr 2015 21:05:17 +0200	[thread overview]
Message-ID: <5526CD6D.5050500@gmail.com> (raw)

Dear All,

I would like to write an another driver for a PCI card.
I have encountered an issue, however. I have some experience with
writing RTDM drivers but
for a single PCI card.

Now I would like to write a driver which would support multiple PCI
cards. How should I do that?

For example when writing a character device driver for standard Linux
kernel we can use something
like alloc_chrdev_region() or register_chrdev_region(). In those
functions one of the parameters is
count which refers to the number of devices. If I am not mistaken those
devices will be available
under /dev/device1, /dev/device2 and so on.

What kind of mechanic should I use to achieve similar result with RTDM.
One difference is that in RTDM I do not have those devices under /dev
but they
are registered under some device name space in Xenomai which handles this.
Is there a way to make one driver with name ex. MyDev for 3 devices
and access them by passing MyDev1, MyDev2 or MyDev3 to rt_dev_open()?

Best regards,

-- 
Wojciech Domski

Domski.pl

Wojciech.Domski.pl



                 reply	other threads:[~2015-04-09 19:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5526CD6D.5050500@gmail.com \
    --to=wojciech.domski@gmail.com \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.