All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aniroop Mathur <aniroop.mathur@gmail.com>
To: jic23@kernel.org, linux-iio@vger.kernel.org
Subject: IIO: Why cannot open two iio device node file descriptors simultaneously ?
Date: Fri, 1 Aug 2014 22:47:54 +0530	[thread overview]
Message-ID: <CADYu308E631koBmSDR0VO2OaT+fn-F3qeuC6tNxQFys+f3HYxw@mail.gmail.com> (raw)

Dear Mr. Jonathan Cameron and IIO Community,
Greetings of the day !! :)

I am Aniroop Mathur working in Sensors kernel and HAL field for last two years
I have one question about IIO, for which i need your support.

I would like to open two file descriptors for IIO device node - /dev/iio:device0
int fd1 = open("/dev/iio:device0",O_RDONLY);
int fd2 = open("/dev/iio:device0",O_RDONLY);

But, only first open call succeeds.
The second open calls fails with error "Device or Resource busy".

In normal input device, we can open as many event node file
descriptors as we like.
int fd1 = open("/dev/input/event1");
int fd2 = open("/dev/input/event1");

Both calls succeeds for input subsystem case.

So, why restriction is present in IIO subsystem ?
Why two iio device nodes cannot be open together ?

Thanks a lot in advance !

Regards,
Aniroop Mathur

             reply	other threads:[~2014-08-01 17:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 17:17 Aniroop Mathur [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-07-31 17:07 IIO: Why cannot open two iio device node file descriptors simultaneously ? Aniroop Mathur
2014-08-02 11:28 ` Jonathan Cameron
2014-08-02 13:07   ` Aniroop Mathur
2014-08-02 16:57     ` Jonathan Cameron
2014-08-03  8:11       ` Lars-Peter Clausen
2014-08-03  9:32         ` Aniroop Mathur
2014-08-04  7:18           ` Lars-Peter Clausen
2014-08-04 15:11             ` Aniroop Mathur
2014-08-04 17:20               ` Lars-Peter Clausen
2014-08-04 19:18                 ` Aniroop Mathur

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=CADYu308E631koBmSDR0VO2OaT+fn-F3qeuC6tNxQFys+f3HYxw@mail.gmail.com \
    --to=aniroop.mathur@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.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.