Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
PATCH 1/1 Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
This kernel module enables the (easy?) using of the ADS7846 SPI touch controller on Waveshare 3.2 LCD (B) modules.
Alternatives would be:
- the old way: add device definition/register call to arch/arm/mach-bcm2708/bcm2708.c
- the new way: use device tree support and add an entrie for ads7846
Peter Seiderer (1):
ads7846-device: new package
linux/linux.mk | 6 ++++++ package/Config.in | 1 + package/ads7846-device/Config.in | 11 +++++++++++ package/ads7846-device/ads7846-device.mk | 21 +++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 package/ads7846-device/Config.in create mode 100644 package/ads7846-device/ads7846-device.mk
Signature · 1 line
2.1.2
PATCH 1/1 ads7846-device: new package
--- linux/linux.mk | 6 ++++++ package/Config.in | 1 + package/ads7846-device/Config.in | 11 +++++++++++ package/ads7846-device/ads7846-device.mk | 21 +++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 package/ads7846-device/Config.in create mode 100644 package/ads7846-device/ads7846-device.mk
linux/linux.mk +6 -0
@@ -196,6 +196,12 @@ define LINUX_CONFIGURE_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config)) $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV), $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)) + $(if $(BR2_PACKAGE_ADS7846_DEVICE), + $(call KCONFIG_ENABLE_OPT,CONFIG_SPI,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_SPI_BCM2708,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_INPUT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_TOUCHSCREEN,$(@D)/.config) + $(call KCONFIG_SET_OPT,CONFIG_TOUCHSCREEN_ADS7846,m,$(@D)/.config)) $(if $(BR2_PACKAGE_KTAP), $(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_EVENT_TRACING,$(@D)/.config)
package/Config.in +1 -0
@@ -286,6 +286,7 @@ menu "Firmware" endmenu source "package/a10disp/Config.in" source "package/acpid/Config.in" + source "package/ads7846-device/Config.in" source "package/am335x-pru-package/Config.in" source "package/avrdude/Config.in" source "package/bcache-tools/Config.in"
package/ads7846-device/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_ADS7846_DEVICE + bool "ads7846-device" + depends on BR2_LINUX_KERNEL + help + A kernel module for registering an ads7846 touchscreen device + e.g. for Raspberry Pi Waveshare 3.2inch RPi LCD (B). + + https://github.com/notro/fbtft_tools/wiki/ads7846_device + +comment "ads7846-device needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL
package/ads7846-device/ads7846-device.mk new file +21 -0
@@ -0,0 +1,21 @@ +################################################################################ +# +# ads7846-device +# +################################################################################ + +ADS7846_DEVICE_VERSION = 013d9b93fc79f3992626b1ce7c4fb7980e2fb778 +ADS7846_DEVICE_SITE = $(call github,notro,fbtft_tools,$(ADS7846_DEVICE_VERSION)) +ADS7846_DEVICE_LICENSE = GPLv2+ + +ADS7846_DEVICE_DEPENDENCIES = linux + +define ADS7846_DEVICE_BUILD_CMDS + $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M=$(@D)/ads7846_device +endef + +define ADS7846_DEVICE_INSTALL_TARGET_CMDS + $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M="$(@D)/ads7846_device" modules_install +endef + +$(eval $(generic-package))
Signature · 1 line
2.1.2
PATCH 1/1 Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
In reply to Peter SeidererDear Peter Seiderer,
Quoted 6 lines · Peter Seiderer
This kernel module enables the (easy?) using of the ADS7846 SPI touch controller on Waveshare 3.2 LCD (B) modules.
Alternatives would be:
- the old way: add device definition/register call toarch/arm/mach-bcm2708/bcm2708.c
- the new way: use device tree support and add an entrie for ads7846
I'm sorry, this is not your fault, but this ads7846_device thing is an absolute abomination. Why is RaspberryPi *THE* platform propagating all the worst possible abominations? Why is it *THE* platform doing all the non-standard stuff? Why is it so crappy.
People, please read this: if you want to learn embedded Linux, don't buy Raspberry Pi. It is the worst platform ever in terms of embedded Linux development best practices. Ever.
Do yourself a favor, and buy properly supported stuff: the Atmel Xplained comes to mind, the BeagleBone Black as well of course.
Sorry, but this ads7846_device is just pure crap. The alternatives you mentioned are the only good solutions: change your board file if you're using an old style ARM kernel, or change your Device Tree if you're using a new style ARM kernel.
I don't know what the policy of Buildroot should be about accepting crap, but on my side, I will not add such a package to Buildroot.
Again: don't take this personally, this is absolutely not against you. Just me being fed up with Raspberry Pi crap.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com