* [Xenomai-core] Draft for a RTDM I2C driver, V2
@ 2006-11-29 9:46 Dirk Eibach
2006-11-29 10:10 ` Jan Kiszka
2006-11-29 17:16 ` Jan Kiszka
0 siblings, 2 replies; 5+ messages in thread
From: Dirk Eibach @ 2006-11-29 9:46 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
Hello,
I did some redesigning on my first draft.
- Now we have some kind of profile in include/rti2c.h.
- I got rid of some chunks of code that were not really needed.
- Linux kernel dependencies have been removed (I hope I catched all of them)
Cheers.
--
Dirk Eibach <eibach@domain.hid>
Guntermann & Drunck Systementwicklung GmbH
F & E
Dortmunder Str. 4a, D-57234 Wilnsdorf
Tel.: +49 (0) 2739 8901 100, Fax.: +49 (0) 2739 8901 120
[-- Attachment #2: rti2c.tar.gz --]
[-- Type: application/x-gzip, Size: 18925 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] Draft for a RTDM I2C driver, V2
2006-11-29 9:46 [Xenomai-core] Draft for a RTDM I2C driver, V2 Dirk Eibach
@ 2006-11-29 10:10 ` Jan Kiszka
2006-11-29 10:27 ` Dirk Eibach
2006-11-29 17:16 ` Jan Kiszka
1 sibling, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2006-11-29 10:10 UTC (permalink / raw)
To: Dirk Eibach; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]
Dirk Eibach wrote:
> Hello,
>
> I did some redesigning on my first draft.
> - Now we have some kind of profile in include/rti2c.h.
> - I got rid of some chunks of code that were not really needed.
> - Linux kernel dependencies have been removed (I hope I catched all of
> them)
Will have a look at the code later.
Did you already consider to integrate it in a local Xenomai tree and
post patches against SVN head (=> /drivers/i2c, /include/rtdm)? Would
make it easier to test compilation and doc generation. What is the empty
algo folder supposed to contain one day?
What would also be nice is a simple demo application. We still have no
policy were to put such stuff. Maybe we'll take the chance and create an
examples folder in SVN and/or put code/description into the wiki.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] Draft for a RTDM I2C driver, V2
2006-11-29 10:10 ` Jan Kiszka
@ 2006-11-29 10:27 ` Dirk Eibach
2014-09-25 8:18 ` [Xenomai] " Johann Obermayr
0 siblings, 1 reply; 5+ messages in thread
From: Dirk Eibach @ 2006-11-29 10:27 UTC (permalink / raw)
To: jan.kiszka; +Cc: xenomai
jan.kiszka@domain.hid wrote:
> Dirk Eibach wrote:
>> Hello,
>>
>> I did some redesigning on my first draft.
>> - Now we have some kind of profile in include/rti2c.h.
>> - I got rid of some chunks of code that were not really needed.
>> - Linux kernel dependencies have been removed (I hope I catched all of
>> them)
>
> Will have a look at the code later.
>
> Did you already consider to integrate it in a local Xenomai tree and
> post patches against SVN head (=> /drivers/i2c, /include/rtdm)? Would
> make it easier to test compilation and doc generation. What is the empty
> algo folder supposed to contain one day?
I have already thought about integrating it in my local Xenomia tree,
but for my first steps I took the easy way. Probably time has come to
change this now.
The algo folder should be used for the implementation of common
algorithms i.e. bit-banging or the PCF8584. Those algorithms are used
for specific implementations that are placed in the busses folder.
> What would also be nice is a simple demo application. We still have no
> policy were to put such stuff. Maybe we'll take the chance and create an
> examples folder in SVN and/or put code/description into the wiki.
I have a simple demo application ready. Just telle me where to put it.
Dirk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] Draft for a RTDM I2C driver, V2
2006-11-29 9:46 [Xenomai-core] Draft for a RTDM I2C driver, V2 Dirk Eibach
2006-11-29 10:10 ` Jan Kiszka
@ 2006-11-29 17:16 ` Jan Kiszka
1 sibling, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2006-11-29 17:16 UTC (permalink / raw)
To: Dirk Eibach; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]
Dirk Eibach wrote:
> Hello,
>
> I did some redesigning on my first draft.
> - Now we have some kind of profile in include/rti2c.h.
> - I got rid of some chunks of code that were not really needed.
> - Linux kernel dependencies have been removed (I hope I catched all of
> them)
Hmm, I would rather suggest the opposite: Unless you have to deviate
from the original Linux API (which seems to exist in kernel 2.4 as
well), I would prefer to keep structure and constant names identical. I
see no technically problem ATM in including the original I2C Linux
header, both in kernel and user space.
Then I'm curious what /real-time/ application scenarios are behind the
SMBus wrapping functions. Are you driving time-critical hardware via
such a protocol? May other users do the same, or is this a special use
case? Sorry, my knowledge about the SMBus is quite limited. The question
for me is simply, if those helpers should become part of the official
API specification or not.
There are still some duplications in the headers /rti2c.h and
/include/rti2c.h (I assume rti2c-api.h is just a copy of
/include/rti2c.h without profile comments). Please avoid this.
Everything the user needs to see should be in the profile header, and
that can then be included by the driver header.
And I think I found a bug (you may want to try
CONFIG_XENO_OPT_DEBUG_RTDM): rti2c_adapter_register, e.g., uses an RTDM
mutex, but I strongly suspect it (only?) runs in Linux context. Please
check your locking in this regard, also the other way around (non-RT
services in RT context - we currently lack automated checking for this).
Another remark while cross-reading (which means: no guarantee I found
all issues): correct error code for wrong context is EPERM
(rti2c_ioctl_rt, RTI2C_RDWR).
So far for now.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-25 8:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29 9:46 [Xenomai-core] Draft for a RTDM I2C driver, V2 Dirk Eibach
2006-11-29 10:10 ` Jan Kiszka
2006-11-29 10:27 ` Dirk Eibach
2014-09-25 8:18 ` [Xenomai] " Johann Obermayr
2006-11-29 17:16 ` Jan Kiszka
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.