Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm developing a linux kernel driver for a multitouch device. Right now I have already touch being injected to the linux kernel subsystem and it is working. The problem is that I also need to interact with the device to change settings an so on.

While the kernel is grabbing the device I can't grab it in user space, so I need to find a way to interact with the kernel driver.

My first driver test had some extra operations that I can't find on the current model i'm using. It had open, close, read, write operatins that I could perform from user space.

How can I do such things with input drivers? Is there any official way?

Thanks in advance,

With my best regards,

Nuno Santos

share|improve this question
    
I ended up implementing binary attributes for my device. –  Nuno Santos Nov 21 '11 at 11:08
add comment

2 Answers 2

You need to implement character device injected into the kernel standard input subsystem. Please check this book. The read(), write(), ioctl(), etc. are typical char drivers operations, any char driver has at least open() and close(). Anyway, what subsystem of kernel did you use in your last driver version? Most useful way for any kernel development is to read related documents in Documentation/ of kernel sources directory and read the kernels drivers code of area related with your tasks.

share|improve this answer
add comment

You can combine your input device driver with a character driver and then you get a device file which you can write your configuration data to and read the configuration from. Interaction between two seperated drivers in kernel space should as well be not complicated.

I guess you already know this book, it might answer your question in detail:

Linux Device Drivers, 3rd edition

share|improve this answer
    
which book? link is missing. thx –  Nuno Santos Nov 14 '11 at 12:52
    
sorry... the link was not shown correctly as it had an offset of 4 characters in front and was shown as code –  Michael K Nov 14 '11 at 12:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.