All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] RTDM question
@ 2007-10-03 14:17 Perrine Martignoni
  2007-10-04 21:44 ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Perrine Martignoni @ 2007-10-03 14:17 UTC (permalink / raw)
  To: xenomai-help

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Hello,

I ask me some questions about RTDM module. Can we open several times the
same driver ? And have several DEV_FILE
I have understood that we don't manage the number Major and Minor. So I
don't see how it works to do that.

Best Regards

[-- Attachment #2: Type: text/html, Size: 272 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] RTDM question
  2007-10-03 14:17 [Xenomai-help] RTDM question Perrine Martignoni
@ 2007-10-04 21:44 ` Jan Kiszka
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2007-10-04 21:44 UTC (permalink / raw)
  To: Perrine Martignoni; +Cc: xenomai-help

[-- Attachment #1: Type: text/plain, Size: 615 bytes --]

Perrine Martignoni wrote:
> Hello,
> 
> I ask me some questions about RTDM module. Can we open several times the
> same driver ? And have several DEV_FILE
> I have understood that we don't manage the number Major and Minor. So I
> don't see how it works to do that.

You mean that the same driver source is handling multiple RTDM devices?
That is perfectly feasible, just look at the 16550A driver. But we
should also have some tutorial on this soon, check those two files
waiting to be merged into SVN:

http://zarb.org/~trem/tut03-skeleton-drv.c
http://zarb.org/~trem/tut03-skeleton-app.c

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Xenomai-help] RTDM question
@ 2008-04-17 10:46 Bosko Radivojevic
  2008-04-17 11:04 ` Sebastian Smolorz
  0 siblings, 1 reply; 5+ messages in thread
From: Bosko Radivojevic @ 2008-04-17 10:46 UTC (permalink / raw)
  To: xenomai-help

What could be the reason of rt_dev_open() returning 0 (zero)?

I can see that device is properly registered. When I start user-space
program, I can see in /proc/xenomai/rtdm/filedes that one file is
open:
Index   Locked  Device          Owner [PID]
0       0       macbdev0        user [306]

But I never reach write function. rt_dev_write() & rt_dev_read() are
returning -1. In API documentation, for rt_dev_open return values
says:
Positive file descriptor value on success, otherwise a negative error code.

Thanks


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] RTDM question
  2008-04-17 10:46 Bosko Radivojevic
@ 2008-04-17 11:04 ` Sebastian Smolorz
  2008-04-17 11:23   ` Bosko Radivojevic
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Smolorz @ 2008-04-17 11:04 UTC (permalink / raw)
  To: Bosko Radivojevic; +Cc: xenomai-help

Bosko Radivojevic wrote:
> What could be the reason of rt_dev_open() returning 0 (zero)?
> 
> I can see that device is properly registered. When I start user-space
> program, I can see in /proc/xenomai/rtdm/filedes that one file is
> open:
> Index   Locked  Device          Owner [PID]
> 0       0       macbdev0        user [306]
> 
> But I never reach write function. rt_dev_write() & rt_dev_read() are
> returning -1.

Which read and write handlers do you have registered with your device 
(RT/NRT)? From which context do you call the RTDM functions 
(primary/secondary)?

  In API documentation, for rt_dev_open return values
> says:
> Positive file descriptor value on success, otherwise a negative error code.

I think this is a bug in the documentation. Negative values mean errors, 
all other values (including zero) success.

-- 
Sebastian


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] RTDM question
  2008-04-17 11:04 ` Sebastian Smolorz
@ 2008-04-17 11:23   ` Bosko Radivojevic
  0 siblings, 0 replies; 5+ messages in thread
From: Bosko Radivojevic @ 2008-04-17 11:23 UTC (permalink / raw)
  To: Sebastian Smolorz; +Cc: xenomai-help

On Thu, Apr 17, 2008 at 1:04 PM, Sebastian Smolorz
<smolorz@domain.hid> wrote:

>  Which read and write handlers do you have registered with your device
> (RT/NRT)? From which context do you call the RTDM functions
> (primary/secondary)?

Thanks :) I've registered read & write RT handlers (by mistake) and
called them from secondary domain...


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-17 11:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03 14:17 [Xenomai-help] RTDM question Perrine Martignoni
2007-10-04 21:44 ` Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2008-04-17 10:46 Bosko Radivojevic
2008-04-17 11:04 ` Sebastian Smolorz
2008-04-17 11:23   ` Bosko Radivojevic

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.