LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
 
Search this Thread
Old 10-18-2013, 05:44 AM   #1
Radders1
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Rep: Reputation: Disabled
Touchscreen almost working on I2C...


Hopefully a quick question, but I can not find the answer anywhere...

I am building an information terminal on an Intel Atom PC. I have written a working kernel module (multitouch, interrupt driven and everything ) and added it to my kernel (3.8).

However, I am struggling to find a good solution to add the touchscreen automatically when it boots.

Currently, after logging in, I run: echo NAME ADDR > /sys/bus/i2c/devices/i2c-0/new_device
Impractical for an actual product.

There are many references to adding i2c_board_info structures to ARM processor board setup files.

Can anyone help with the proper efficient equivalent on x86?

Cheers
 
Old 10-21-2013, 07:40 AM   #2
Radders1
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I have not really fixed this, but in case anyone else comes looking here for an answer:

In /etc/rc.local, I added the command:
echo NAME ADDR > /sys/bus/i2c/devices/i2c-X/new_device

Where:
NAME is the string the device driver looks to attach to.
ADDR is the address of the device on the bus (for me 0x28)
i2c-X is the bus the device resides on (for me i2c-0)

This will run automatically when the computer starts up, so my touchscreen now works at the login screen.

However, I don't like this solution; it is an unecessary use of userspace, in what should be kernel only code.
 
Old 10-23-2013, 05:55 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 12,574

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
I didn't know the answer but thanks for the update and work around.
 
  


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
HP Compaq Touchscreen not working Baldho Linux - Hardware 3 07-19-2012 10:11 AM
How to forward IOCTL's from i2c-dev.c to adapter driver (i2c-rt3352.c) elonica.pl Linux - Kernel 2 08-23-2011 02:03 AM
looking for touchscreen drivers for mandriva 2008, touchscreen working with windows inder_18nec Linux - Software 3 02-20-2010 05:11 PM
How do I get this i2c temperature monitoring thing working? Mr. Asdf Linux - Hardware 4 08-12-2005 06:46 AM
Got i2c working ? You can answer this for me. Mike Davies Linux - Hardware 2 07-03-2004 01:30 PM


All times are GMT -5. The time now is 07:13 AM.

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