From 9fb2fda6cf1f8cc66d1c17453f83b3e0b677a41e Mon Sep 17 00:00:00 2001 From: Alan Date: Sat, 20 May 2023 14:33:52 +0800 Subject: Add: FB_TFT ST7796S driver --- drivers/staging/fbtft/Kconfig | 10 +++ drivers/staging/fbtft/Makefile | 1 + drivers/staging/fbtft/fb_st7796s.c | 100 +++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 drivers/staging/fbtft/fb_st7796s.c diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig index 77ab44362f16..107065985eb4 100644 --- a/drivers/staging/fbtft/Kconfig +++ b/drivers/staging/fbtft/Kconfig @@ -168,6 +168,16 @@ config FB_TFT_ST7789V Say Y if you have such a display that utilizes this controller. +config FB_TFT_ST7796S + tristate "FB driver for the ST7796S LCD Controller" + depends on FB_TFT + help + This enables generic framebuffer support for the Sitronix ST7796S + display controller. The controller is intended for small color + displays with a resolution of up to 480x320 pixels. + + Say Y if you have such a display that utilizes this controller. + config FB_TFT_TINYLCD tristate "FB driver for tinylcd.com display" depends on FB_TFT diff --git a/drivers/staging/fbtft/Makefile b/drivers/staging/fbtft/Makefile index e9cdf0f0a7da..7b2098b8a1bd 100644 --- a/drivers/staging/fbtft/Makefile +++ b/drivers/staging/fbtft/Makefile @@ -31,6 +31,7 @@ obj-$(CONFIG_FB_TFT_SSD1331) += fb_ssd1331.o obj-$(CONFIG_FB_TFT_SSD1351) += fb_ssd1351.o obj-$(CONFIG_FB_TFT_ST7735R) += fb_st7735r.o obj-$(CONFIG_FB_TFT_ST7789V) += fb_st7789v.o +obj-$(CONFIG_FB_TFT_ST7796S) += fb_st7796s.o obj-$(CONFIG_FB_TFT_TINYLCD) += fb_tinylcd.o obj-$(CONFIG_FB_TFT_TLS8204) += fb_tls8204.o obj-$(CONFIG_FB_TFT_UC1611) += fb_uc1611.o diff --git a/drivers/staging/fbtft/fb_st7796s.c b/drivers/staging/fbtft/fb_st7796s.c new file mode 100644 index 000000000000..cad489cef595 --- /dev/null +++ b/drivers/staging/fbtft/fb_st7796s.c @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * FB driver for the ST7796S LCD Controller + * + * Copyright (c) 2023 Alan Ma + * Copyright (c) 2014 Petr Olivka + * Copyright (c) 2013 Noralf Tronnes + */ + +#include +#include +#include +#include +#include