TheJanitor
Posts: 7
Joined: Sun Dec 08, 2019 2:08 pm

Re: ads7846 on spi1

Sun Dec 08, 2019 9:23 pm

im kinda new to this^^ you mean that?

Code: Select all

[email protected]:~ $ ls -l /dev/input/
insgesamt 0
drwxr-xr-x 2 root root      60 Dez  8 22:19 by-path
crw-rw---- 1 root input 13, 64 Dez  8 22:19 event0
crw-rw---- 1 root input 13, 63 Dez  8 22:19 mice
crw-rw---- 1 root input 13, 32 Dez  8 22:19 mouse0

[email protected]:~ $ ls -l /dev/input/by-path
insgesamt 0
lrwxrwxrwx 1 root root 9 Dez  8 22:19 platform-3f215080.spi-event -> ../event0

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2576
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: ads7846 on spi1

Sun Dec 08, 2019 9:41 pm

Yes - I didn't know what it might end up being called, hence the vagueness. I was going to say that those entries look like those corresponding to the Logitech device, but that by-path symbolic link implies it is something to do with the touchscreen. Do you get anything from "od -Ax -tx1 /dev/input/event0" when the touchscreen is used? Or any other input device?

There was this line in the kernel log:

Code: Select all

[    5.970473] input: ADS7846 Touchscreen as /devices/platform/soc/3f215080.spi/spi_master/spi1/spi1.2/input/input7
Does "od -Ax -tx1 /sys/class/devices/platform/soc/3f215080.spi/spi_master/spi1/spi1.2/input/input7" return anything (either an immediate error, or some hex numbers) on touchscreen usage?

TheJanitor
Posts: 7
Joined: Sun Dec 08, 2019 2:08 pm

Re: ads7846 on spi1

Sun Dec 08, 2019 10:03 pm

how im going to use "od -Ax -tx1 /dev/input/event0"? XD again im new to raspberry stuff. sry <.< they keyboard wasnt plugged in when i used that since im using putty atm. however thats what i get when its plugged in as well

Code: Select all

[email protected]:~ $ ls -l /dev/input/by-path
insgesamt 0
lrwxrwxrwx 1 root root 9 Dez  8 22:44 platform-3f215080.spi-event -> ../event1
lrwxrwxrwx 1 root root 9 Dez  8 22:44 platform-3f980000.usb-usb-0:1.3:1.2-event-mouse -> ../event0
lrwxrwxrwx 1 root root 9 Dez  8 22:44 platform-3f980000.usb-usb-0:1.3:1.2-mouse -> ../mouse0
does this also help sort of?

Code: Select all

[email protected]:~ $ cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="ADS7846 Touchscreen"
P: Phys=spi1.2/input0
S: Sysfs=/devices/platform/soc/3f215080.spi/spi_master/spi1/spi1.2/input/input7
U: Uniq=
H: Handlers=mouse1 event1
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003

I: Bus=0003 Vendor=046d Product=404d Version=0111
N: Name="Logitech K400 Plus"
P: Phys=usb-3f980000.usb-1.3:1
S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2/0003:046D:C52B.0003/0003:046D:404D.0004/input/input8
U: Uniq=404d-8c-cc-39-91
H: Handlers=sysrq kbd leds mouse0 event0
B: PROP=0
B: EV=12001f
B: KEY=300ff 0 0 0 0 483ffff 17aff32d bf544446 0 0 ffff0001 130ff3 8b17c007 ffff7bfa d941dfff febeffdf ffefffff ffffffff fffffffe
B: REL=143
B: ABS=1 0
B: MSC=10
B: LED=1f
i also tried "cat /dev/input/event0" which shows me random stuff in putty while i use they keyboard touchpad and button. cat /dev/input/event0 does nothing

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2576
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: ads7846 on spi1

Mon Dec 09, 2019 2:52 pm

Code: Select all

[email protected]:~ $ ls -l /dev/input/by-path
insgesamt 0
lrwxrwxrwx 1 root root 9 Dez  8 22:44 platform-3f215080.spi-event -> ../event1
lrwxrwxrwx 1 root root 9 Dez  8 22:44 platform-3f980000.usb-usb-0:1.3:1.2-event-mouse -> ../event0
lrwxrwxrwx 1 root root 9 Dez  8 22:44 platform-3f980000.usb-usb-0:1.3:1.2-mouse -> ../mouse0
The by-path entry is showing us what each of the event sources ("event0", "event1", "mouse0") corresponds to. In this case /dev/input/event1 looks like it should be events from the touchscreen.

If you are able to run a command while the touchscreen is connected, and assuming the mapping above still applies (if not, change the "event*" part of the command to match), try leaving this running in a shell:

Code: Select all

$ od -Ax -tx1 /dev/input/event0
This should do nothing until your mouse moves, then you should see a stream of hex numbers. Now try the other event source:

Code: Select all

$ od -Ax -tx1 /dev/input/event1
This should be equally quiet until the touchscreen is used. Do you get any output? If so, the touchscreen wiring and DT configuration appears to be correct, and the problem is in the higher layers of software.

TheJanitor
Posts: 7
Joined: Sun Dec 08, 2019 2:08 pm

Re: ads7846 on spi1

Mon Dec 09, 2019 9:24 pm

sorry for the late respond. working late shifts this week <.<

anyway this does nothing while touching the screen:

$ od -Ax -tx1 /dev/input/event0

the mouse one works fine.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2576
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: ads7846 on spi1

Mon Dec 09, 2019 9:39 pm

It was event1 for the touchscreen.

TheJanitor
Posts: 7
Joined: Sun Dec 08, 2019 2:08 pm

Re: ads7846 on spi1

Mon Dec 09, 2019 9:48 pm

its currently event0. not sure why tho since i havent changed anything. except the irq to gpio26.

Code: Select all

[email protected]:~ $ ls -l /dev/input/by-path
insgesamt 0
lrwxrwxrwx 1 root root 9 Dez  9 22:43 platform-3f215080.spi-event -> ../event0
lrwxrwxrwx 1 root root 9 Dez  9 22:43 platform-3f980000.usb-usb-0:1.3:1.2-event-mouse -> ../event1
lrwxrwxrwx 1 root root 9 Dez  9 22:43 platform-3f980000.usb-usb-0:1.3:1.2-mouse -> ../mouse0

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2576
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: ads7846 on spi1

Mon Dec 09, 2019 9:52 pm

Fair enough. So although you are getting interrupts and the driver has probed, no events are getting though. I don't know what else to suggest.

TheJanitor
Posts: 7
Joined: Sun Dec 08, 2019 2:08 pm

Re: ads7846 on spi1

Mon Dec 09, 2019 9:57 pm

maybe i just should try to get my rfid reader to work on spi1 instead since the display works fine on spi0 in both pi 3. thx for the help tho :D

Return to “Device Tree”