notro / fbtft_tools

27 stars 17 forks source link

error on compiling stmpe_device with 3.18.7 kernel source #6

Closed FishTest closed 9 years ago

FishTest commented 9 years ago

today i want to use pitft on Rpi 1 with newest kernel 3.18.7 ,the screen works ok,but the touchscreen driver can not be compiled ... q@q-B85-HD3:~/pi2b/fbtft_tools/stmpe_device$ make ARCH=arm CROSS_COMPILE=~/pi2b/RpiTools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi- make -C /home/q/pi2b/RpiLinux M=/home/q/pi2b/fbtft_tools/stmpe_device modules make[1]: now entering... /home/q/pi2b/RpiLinux' CC [M] /home/q/pi2b/fbtft_tools/stmpe_device/stmpe_device.o /home/q/pi2b/fbtft_tools/stmpe_device/stmpe_device.c: In function 'stmpe_device_init': /home/q/pi2b/fbtft_tools/stmpe_device/stmpe_device.c:277:8: error: 'struct stmpe_platform_data' has no member named 'irq_base' /home/q/pi2b/fbtft_tools/stmpe_device/stmpe_device.c:283:13: error: 'struct stmpe_gpio_platform_data' has no member named 'gpio_base' /home/q/pi2b/fbtft_tools/stmpe_device/stmpe_device.c:300:4: error: 'struct stmpe_platform_data' has no member named 'irq_base' /home/q/pi2b/fbtft_tools/stmpe_device/stmpe_device.c:305:4: error: 'struct stmpe_gpio_platform_data' has no member named 'gpio_base' make[2]: *** [/home/q/pi2b/fbtft_tools/stmpe_device/stmpe_device.o] error 1 make[1]: *** [_module_/home/q/pi2b/fbtft_tools/stmpe_device] error 2 make[1]:now leaving/home/q/pi2b/RpiLinux' make: *\ [all] error 2

notro commented 9 years ago

Yes, there was a commit in mainline that removed platform support since all in-tree users was using Device Tree. This is a Device Tree overlay example for Raspberry Pi: https://github.com/notro/fbtft/blob/master/dts/overlays/rpi/pitft28-resistive-overlay.dts

FishTest commented 9 years ago

There is a word named "gelivable" means too wonderful,thanks again and again!

notro commented 9 years ago

You're welcome :-)

mllapps commented 9 years ago

But the problem is not solved with the dts file. So I have to do some changes on the stmpe_device.c. Has anyone did this changes?

notro commented 9 years ago

stmpe_device can't work with the latest kernel, because platform_data support has been removed. So unless you revert the commit somehow, you're stuck with Device Tree.