All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] xenomai i2c
@ 2009-01-22 18:09 Wayne Call
  2009-01-22 19:16 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: Wayne Call @ 2009-01-22 18:09 UTC (permalink / raw)
  To: xenomai

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

Is there a way to use xenomai to do a simple read/ write to an i2c device?
I simply want to read a temperature sensor value, via I2C, in the real time
context.  I currently use files such as i2c-bfin-twi.c and i2c-core.c and
have built a sensor type driver, lm73.c.  I can read temperature values from
user space using the /sys/bus/i2c/devices/0-0048/temperature folder.

 

Wayne

 


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

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

* Re: [Xenomai-help] xenomai i2c
  2009-01-22 18:09 [Xenomai-help] xenomai i2c Wayne Call
@ 2009-01-22 19:16 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 5+ messages in thread
From: Gilles Chanteperdrix @ 2009-01-22 19:16 UTC (permalink / raw)
  To: wcall; +Cc: xenomai

Wayne Call wrote:
> Is there a way to use xenomai to do a simple read/ write to an i2c device?
> I simply want to read a temperature sensor value, via I2C, in the real time
> context.  I currently use files such as i2c-bfin-twi.c and i2c-core.c and
> have built a sensor type driver, lm73.c.  I can read temperature values from
> user space using the /sys/bus/i2c/devices/0-0048/temperature folder.

The clean way is to implement a driver (or several drivers) using the
RTDM skin. Then, you would access this driver using the real-time
version of the usual open/read/write/ioctl/close interface.

-- 
					    Gilles.


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

* Re: [Xenomai-help] xenomai i2c
       [not found] <1231007816-1232652648-cardhu_decombobulator_blackberry.rim.net-1405832660-@domain.hid>
@ 2009-01-22 19:33 ` Gilles Chanteperdrix
  2009-01-22 20:46   ` Wayne Call
  0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2009-01-22 19:33 UTC (permalink / raw)
  To: wcall; +Cc: Xenomai help

wcall@domain.hid wrote:
> Where do I find an example of the RTDM skin?

In the directory ksrc/drivers of xenomai sources.

Please do not forget to cc the mailing list.

-- 
					    Gilles.


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

* Re: [Xenomai-help] xenomai i2c
  2009-01-22 19:33 ` Gilles Chanteperdrix
@ 2009-01-22 20:46   ` Wayne Call
  2009-01-22 21:02     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: Wayne Call @ 2009-01-22 20:46 UTC (permalink / raw)
  To: 'Gilles Chanteperdrix'; +Cc: 'Xenomai help'

Is it possible to read the /sys/bus/i2c/devices/0-0048/temperature file using rt_dev_read?  The application is running in the real time context.  Even though the device driver is not in the real time context, can an application running in the real time context just simple access the /sys/bus/i2c/devices files using rt_dev_read and rt_dev_write?  The /sys is where the sysfs has been mounted.

Wayne

-----Original Message-----
From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
Sent: Thursday, January 22, 2009 12:33 PM
To: wcall@domain.hid
Cc: Xenomai help
Subject: Re: [Xenomai-help] xenomai i2c

wcall@domain.hid wrote:
> Where do I find an example of the RTDM skin?

In the directory ksrc/drivers of xenomai sources.

Please do not forget to cc the mailing list.

-- 
					    Gilles.



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

* Re: [Xenomai-help] xenomai i2c
  2009-01-22 20:46   ` Wayne Call
@ 2009-01-22 21:02     ` Gilles Chanteperdrix
  0 siblings, 0 replies; 5+ messages in thread
From: Gilles Chanteperdrix @ 2009-01-22 21:02 UTC (permalink / raw)
  To: wcall; +Cc: 'Xenomai help'

Wayne Call wrote:
> Is it possible to read the /sys/bus/i2c/devices/0-0048/temperature
> file using rt_dev_read?  The application is running in the real time
> context.  Even though the device driver is not in the real time
> context, can an application running in the real time context just
> simple access the /sys/bus/i2c/devices files using rt_dev_read and
> rt_dev_write?  The /sys is where the sysfs has been mounted.

No, rt_dev_read/rt_dev_write is for devices created using the RTDM skin,
not for Linux devices or files. When an application running in real-time
context (that is, in primarey mode) reads a Linux file, it switches to
secondary mode, that is to say, it becomes a plain linux task with linux
induced latencies.

-- 
					    Gilles.


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

end of thread, other threads:[~2009-01-22 21:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 18:09 [Xenomai-help] xenomai i2c Wayne Call
2009-01-22 19:16 ` Gilles Chanteperdrix
     [not found] <1231007816-1232652648-cardhu_decombobulator_blackberry.rim.net-1405832660-@domain.hid>
2009-01-22 19:33 ` Gilles Chanteperdrix
2009-01-22 20:46   ` Wayne Call
2009-01-22 21:02     ` Gilles Chanteperdrix

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.