Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
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?


  Search this Thread
Old 10-18-2013, 06:44 AM   #1
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?

Old 10-21-2013, 08:40 AM   #2
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

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, 06:55 PM   #3
LQ Guru
Registered: Mar 2008
Posts: 13,691

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


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

All times are GMT -5. The time now is 02:10 PM.

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