LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 08-13-2009, 10:36 AM   #1
rohshall
LQ Newbie
 
Registered: Oct 2008
Posts: 9

Rep: Reputation: 0
How to make udev create /dev/input/event0 for a touchscreen


Hi,


I am trying to integrate my TSC2046 device on AT91RM9200 based board.
I enabled ADS7846 touchscreen driver because these two are essentially the same device. My device gets recognized too, but I don't see the device under /dev/input/event0 though the device information appears under sysfs.

I am using buildroot and my understanding is Linux kernel 2.6.28 uses udev under which I don't have to create /dev/input/event0 device files in my root file system, but just let udev create it when a device is detected.
However, in my root file system I do not see any /etc/udev/rules.d/10-local.rules file. I am assuming these udev rules are optional. Is this correct? If they are not, where should I create these rules file? I also checked that there is no udev daemon running on my machine. However, there is one events daemon running. Is it related with udev?

# cat /proc/sys/kernel/hotplug
/sbin/hotplug
# ps -e
PID USER COMMAND
1 root init
2 root [kthreadd]
3 root [ksoftirqd/0]
4 root [watchdog/0]
5 root [events/0]
6 root [khelper]
48 root [kblockd/0]
73 root [pdflush]
74 root [pdflush]
75 root [kswapd0]
119 root [aio/0]
747 root -sh
748 root /sbin/syslogd -n -m 0
749 root /sbin/klogd -n
750 root /usr/bin/tail -f /var/log/messages
769 root ps -e


# cd /sys/class/input/
# ls
event0 input0 mice mouse0
# cd event0
# ls
dev device subsystem uevent
# ls -l
-r--r--r-- 1 root root 4096 Dec 31 17:19 dev
lrwxrwxrwx 1 root root 0 Dec 31 17:19 device -> ../../../../d3
lrwxrwxrwx 1 root root 0 Dec 31 17:19 subsystem -> ../../../it
-rw-r--r-- 1 root root 4096 Dec 31 17:19 uevent
# cat dev
13:64
# cat uevent
MAJOR=13
MINOR=64
PHYSDEVPATH=/devices/platform/atmel_spi.0/spi0.3
PHYSDEVBUS=spi
PHYSDEVDRIVER=ads7846
#

The booup messages I get are:

Uncompressing Linux.............................................................
Linux version 2.6.28 (salil@salil-laptop) (gcc version 4.3.2 (GCC) ) #117 Thu A9
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91RM9200-DK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 179 MHz, master 59 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: mem=32M console=tty0
AT91: 128 gpio irqs in 4 banks
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x30
console [tty0] enabled
console [ttyS0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 29676KB available (1780K code, 149K data, 832K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 89.79 BogoMIPS (lpj=350208)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
at91: disabling SPI chip select 1
at91: disabling SPI chip select 2
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
msgmni has been set to 57
io scheduler noop registered
io scheduler anticipatory registered (default)
Console: switching to colour frame buffer device 80x30
fb0: S1D13513 frame buffer device
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffc4000 (irq = 7) is a ATMEL_SERIAL
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffe0000 (irq 13)
mice: PS/2 mouse device common for all mice
ads7846 spi0.3: touchscreen, irq 93
input: ADS784x Touchscreen as /class/input/input0
at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0
AT91 Real Time Clock driver.
TCP cubic registered
NET: Registered protocol family 17
at91_rtc at91_rtc: setting system clock to 1998-01-01 00:01:32 UTC (883612892)
Freeing init memory: 832K
Initializing random number generator... done.
Starting network...
ip: RTNETLINK answers: File exists


So, the driver's probe function runs and creates appropriate sysfs entries and I have verified that it does call the device creation code (udev code). But I don't see any devices being created.

Can somebody help me please?

Last edited by rohshall; 08-15-2009 at 03:20 AM. Reason: added more info
 
Old 08-17-2009, 06:54 AM   #2
sunr2007
Member
 
Registered: Jan 2009
Location: Bangalore , India
Distribution: Fedora 12
Posts: 65

Rep: Reputation: 17
have u enabled the event interface in the kernel? drivers/input/event interface? and u av tslib suport in your kernel?
 
Old 08-17-2009, 07:18 AM   #3
rohshall
LQ Newbie
 
Registered: Oct 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sunr2007 View Post
have u enabled the event interface in the kernel? drivers/input/event interface? and u av tslib suport in your kernel?
Many thanks for replying.
My event interface is enabled (device drivers - input drivers).
What I found out was mdev should manage the /dev interface, but when I check whether mdev is managing the /dev using tempfs using mount, it does not show it.
However, when I did "mdev -s", I can see event0 interface popping up.
So, it looks like I should make it a part of the startup script. But the doubt I have is by default this should have been done. So, it would be great if you guys can share some insights.
 
Old 08-21-2009, 06:57 AM   #4
sunr2007
Member
 
Registered: Jan 2009
Location: Bangalore , India
Distribution: Fedora 12
Posts: 65

Rep: Reputation: 17
what does ur cat /dev/input/event0 gives? and can u let us know what parameters u are passing?
warm regards,
Ravi Kulkarni.
 
Old 08-21-2009, 11:39 AM   #5
rohshall
LQ Newbie
 
Registered: Oct 2008
Posts: 9

Original Poster
Rep: Reputation: 0
mdev -s not initiated

Hi Ravi,

Thanks for your comment. There was no /dev/input/event0 being created.
What I found out was 'mdev -s' needs to be part of the init script. This will make mdev (simpler cousin of its counterpart on desktops - udev) will do device discovery and create the appropriate /dev nodes like event0
So, problem solved.
 
  


Reply

Tags
touchscreen


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
HAL vs Xserver (/dev/input/mice?): convincing X to *not* use a given input device? stuartnlevy Linux - Desktop 6 01-24-2012 05:06 PM
Getting a USB device (touch screen here) to be recognized under /dev/input/ d2army Linux - Hardware 0 12-15-2008 02:26 PM
/dev/input/js0 not appearing headrift Linux - Games 2 08-10-2008 07:45 PM
startx --> (EE) xf86OpenSerial: Cannot open device /dev/input/mice No such device. TB2 Linux - Software 2 04-04-2007 06:11 PM
/dev/js0 as second mouse ty pe input device in Xfree86 frieza Linux - Software 0 05-25-2004 12:58 AM


All times are GMT -5. The time now is 03:37 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration