[Solved] Adding Touchscreen driver to kernel

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

[Solved] Adding Touchscreen driver to kernel

Postby jrue000 » Sat Aug 09, 2014 12:58 am

Hi, I bought this JBtek 3.5" touchscreen for my Pi. I think the device was designed for raspbian, but i'm hoping to get it working on Arch. I've already compiled a program that came with it, but want to get the touchscreen working.

The instructions say it requires ads7846 driver:

\linux-rpi-3.6.y\drivers\input\touchscreen\ads7846.c

Which is located on GitHub.

Question is how do I compile this and include this driver into my Pi?

$this->bbcode_second_pass_code('', 'uname -r
3.12.25-1-ARCH')
I'm completely stuck now. Any advice on adding drivers?

I'm a bit new to kernels and modules. I've experimented with a few things, but I'm not even sure I'm on the right track. I tried compiling with this code:

$this->bbcode_second_pass_code('', 'TARGET := ads7846
WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
INCLUDE := -isystem /lib/modules/`uname -r`/build/include
CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE}
CC := gcc

${TARGET}.o: ${TARGET}.c

.PHONY: clean

clean:
rm -rf ${TARGET}.o')

but I get a compiler error:
$this->bbcode_second_pass_code('', 'include/linux/compiler-gcc.h:103:30: fatal error: include/linux/linux/compiler-gcc4.h: Too many levels of symbolic links')

Thanks in advance.
Last edited by jrue000 on Mon Aug 11, 2014 10:01 am, edited 1 time in total.
jrue000
 
Posts: 2
Joined: Sat Aug 09, 2014 12:38 am

Re: Adding Touchscreen driver to kernel

Postby moonman » Sat Aug 09, 2014 3:56 am

I've added the driver to linux-raspberrypi-latest. It will be in repos shortly ( version 3.16.0-2)
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Adding Touchscreen driver to kernel

Postby jrue000 » Mon Aug 11, 2014 10:00 am

Wow, this is fantastic. Thank you!
jrue000
 
Posts: 2
Joined: Sat Aug 09, 2014 12:38 am


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 76 guests