I need the latest version of the tsc2007 driver that is available in master but not in rpi-6.12.y. I downloaded the source from both master and my distros repo and compared the files. The only differences were in tsc2007.h and tsc2007_core.c. (See minor diffs below)
I copied the source files from master to to a new dir on my machine and created this Makefile
It compiles fine against the kernel source of the kernel I am running.
I unload the original module.
back up the file
copy in my new compiler tsc2007.ko (N.B. not compressed, not sure if this is relevant). Try and load in new module
I try to look at dmesg but can't really see anything. :/
Is this something related to the new module not being compressed? Something to do with /lib/modules/6.12.20+rpt-rpi-v8/modules.symbols? Have I built the module correctly?
Diffs
The main difference are and which are both used in other touch screen drivers within the "older" kernel version and there is zero diff in the touchscreen.h header.
tsc2007.h
tsc2007_iio.c
touchscreen.h
I copied the source files from master to to a new dir on my machine and created this Makefile
Code:
obj-m += tsc2007.otsc2007-objs := tsc2007_core.otsc2007-objs += tsc2007_iio.oKVERSION = $(shell uname -r)all: make -C /lib/modules/$(KVERSION)/build M=$(PWD) modulesclean: make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
I unload the original module.
Code:
sudo modprobe -r tsc2007
Code:
sudo mv tsc2007.ko.xz original_tsc2007.ko.xz
Code:
sudo modprobe tsc2007; dmesg | tailmodprobe: ERROR: could not insert 'tsc2007': Unknown symbol in module, or unknown parameter (see dmesg)
Code:
$ sudo modprobe tsc2007; dmesg | tailmodprobe: ERROR: could not insert 'tsc2007': Unknown symbol in module, or unknown parameter (see dmesg)[20207.060389] vc4-drm gpu: [drm:hdmi_try_format_bpc [drm_display_helper]] RGB Format, checking the constraints.[20207.060411] vc4-drm gpu: [drm:hdmi_try_format_bpc [drm_display_helper]] RGB format supported in that configuration.[20207.060464] vc4-drm gpu: [drm:hdmi_try_format_bpc [drm_display_helper]] RGB output format supported with 8 (TMDS char rate: 49088000 Hz)[20207.060490] vc4-drm gpu: [drm:drm_atomic_helper_connector_hdmi_check [drm_display_helper]] Mode 1024x600 @ 60Hz: Found configuration: bpc: 8, fmt: RGB, clock: 49088000[20207.060518] vc4-drm gpu: [drm:drm_atomic_add_encoder_bridges [drm]] Adding all bridges for [encoder:32:TMDS-32] to 00000000de8ca689[20207.060739] vc4-drm gpu: [drm:drm_atomic_add_encoder_bridges [drm]] Adding all bridges for [encoder:32:TMDS-32] to 00000000de8ca689[20207.061006] vc4-drm gpu: [drm:drm_atomic_get_private_obj_state [drm]] Added new private object 00000000fe41e077 state 00000000f4d1599e to 00000000de8ca689[20207.061230] vc4-drm gpu: [drm:drm_atomic_nonblocking_commit [drm]] committing 00000000de8ca689 nonblocking[20207.078218] vc4-drm gpu: [drm:drm_atomic_state_default_clear [drm]] Clearing atomic state 00000000de8ca689[20207.078487] vc4-drm gpu: [drm:__drm_atomic_state_free [drm]] Freeing atomic state 00000000de8ca689
Diffs
The main difference are
Code:
touchscreen_report_pos
Code:
touchscreen_parse_properties
tsc2007.h
Code:
$ diff rpisource/linux/drivers/input/touchscreen/tsc2007.h linuxMasterSource/linux/drivers/input/touchscreen/tsc2007.h21a22> #include <linux/input/touchscreen.h>65a67> struct touchscreen_properties prop;
Code:
$ diff rpisource/linux/drivers/input/touchscreen/tsc2007_iio.c linuxMasterSource/linux/drivers/input/touchscreen/tsc2007_iio.ctsc2007_core.c
Code:
$ diff rpisource/linux/drivers/input/touchscreen/tsc2007_core.c linuxMasterSource/linux/drivers/input/touchscreen/tsc2007_core.c145,146c145< input_report_abs(input, ABS_X, tc.x);< input_report_abs(input, ABS_Y, tc.y);---> touchscreen_report_pos(input, &ts->prop, tc.x, tc.y, false);342d340<344a343> touchscreen_parse_properties(input_dev, false, &ts->prop);
Code:
$ diff rpisource/linux/include/linux/input/touchscreen.h linuxMasterSource/linux/include/linux/input/touchscreen.h
Statistics: Posted by NTVisitor — Mon Apr 14, 2025 7:44 am