Re: read/write form module /dev/* files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pradeep singh wrote:
> On 6/4/07, peto <fodrek@xxxxxxxxxxxxxxxxx> wrote:
> > Dear confrenece,
> >
> > I would like to ask if there is some way to access /dev/* files
> > connected to the minor and major number of other modules form kernel
> > module(calls
> > of exported symbols works but is not enough independent).
> >
> > I was seen one solution through get_fs/put_fs calls, but it is not
> > recommended by that article.
>
> Right.
> Why do you need to open /dev/* files from the kernel space?

I am, to build complex application, where parts are hard realtime in RTAI a 
therefor any real-time part of application needs to be kernel module. But I 
am to use several serial interfaces (CAN bus, RS-485 etc.) with posibility to 
reconfigure interfaces by changing configuration files or module prameters.
Plan is to be modular structure of application where only interfaces of 
attached devices are known for higher level. So if I use special file  as 
intreface I can comunicate to first time via /dev/ttyS2  and nex time 
/dec/can1

This principle of using was first time shown to me via eGalax serial touch 
screen, but there is user space daemon with interface in /dev - I can not 
imagine how it is done, but it works. Daemon is not acceptble to my 
application, because of latency in need it in less tahn 30 microseconds range 
(RTIA user space realtime does not math this)

> Perhaps you can be better off using inode structure of the device file
> in the kernel.

I know what inode is so i know that such structure exists, but I have never 
seen documentation of this.

Thank you to all who send answers to me

Best regard

Peto

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux