You'd have to decide what functionality you want with respect to rt
and non rt for your driver.  What's confusing about the context?  The
gpio driver is pretty up to date, you can look at it for some
guidance.  Unfortunately there isn't a lot of documentation at the
moment, so your best bet is to look at some of the existing drivers.
It's easier to answer specific questions you may have about the RTDM
framework.  The other question is do you need at RTDM driver?  Could
you use the UDD framework instead?  With the UDD framework you just
need to support a small RTDM driver and the rest of the driver lives
in user space.

-Greg

On Mon, Feb 26, 2018 at 12:20 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> Dear Jan,
>
> This thread is about porting a normal misc char driver to rtdm model.
>
> Anyways I got some clue by looking into rtdmtest driver.
> But what is confusing to me is the rtdm context_ part and the rt, nrt part.
> How can I map this eith my exusting driver?
> Can I leave the context part NULL and use only rt for all other calls.
>
> Thanks,
> Pintu
>
> On 26 Feb 2018 7:54 pm, "Jan Kiszka" <jan.kis...@siemens.com> wrote:
>>
>> On 2018-02-26 12:26, Pintu Kumar wrote:
>> > Hi,
>> >
>> > I have a sample linux char driver which I am registering using normal
>> > misc_register/deregister function.
>> > In this driver, I have used, open, read, write, ioctl, release system
>> > calls.
>> >
>> > Now I wanted to convert this driver to RTDM interface and compare it.
>> > Later I wanted to add some more use cases related to interrupt
>> > processing by connecting some external peripheral.
>> >
>> > Firstly, please guide me how to easily convert an existing linux char
>> > driver to RTDM model.
>> >
>>
>> Conversion of existing Linux UART drivers to RTDM is not straightforward
>> as the former relies on a larger hierarchy of Linux drivers, starting
>> with the tty core over the serial core and possibly some chip
>> abstractions (8250). RTDM, as you can see from the existing drivers in
>> kernel/drivers/serial, is rather compact and does not come with that
>> infrastructure, primarily as it has a confined use case. Best is to
>> study those drivers, use one as template and replace the required
>> hardware accesses.
>>
>> Jan
>>
>> --
>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>> Corporate Competence Center Embedded Linux

_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to