LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-13-2008, 10:25 AM   #1
flh001
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
Passing data from Kspace to Uspace


Hi,

I am new to linux world, my background so far has been on RTOSs like VxWorks.

Currently I am tasked with writing a driver for a sensor. Driver talks to device over I2C Bus.
The way I am trying to design is,

I will make driver module part of the kernel so that it will be loaded with the kernel runs. Its probe will register with evdev(input susbsystem), create attribute (coordinates) for i2c client and register its read and store routines.

once the sensor crosses the threshold, it will issue INT, ISR will read x,y,z over I2C Bus and executes write on coordinates. Store function captures x,y & z and pushes out to input subsystem.

Now my question is can I have a process in userspace that is pended on read(/dev/input/eventX,...,...) that will wake up once it gets the data, processes it and goes back to sleep again.

Reason i want to do it this way is to differ processing to user space process rather than doing it in ISR.

The problem here is the process would have to be started after the drivers probe registers with event subsystem since process is pending on /dev/input/eventX

Can anyone suggest how should I go by implementing this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
memcpy_toio transfers data in 4 byte chunks, but I need to transfer data in one lump. jbreaka4lyfe Linux - Embedded & Single-board computer 2 06-02-2008 12:25 PM
Passing IP options data to kernel from userspace kaushik1 Programming 2 12-27-2007 12:38 AM
Processing data from a 'foreign' database with mysql, or tools to pre-process data. linker3000 Linux - Software 1 08-14-2007 09:36 PM
pthread, passing char* as data argument Rayven Programming 3 03-22-2007 06:36 AM
passing passing variable in Java as reference djgerbavore Programming 3 11-10-2004 03:18 PM


All times are GMT -5. The time now is 12:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration