From ee0bc8397ef4da60ce3f022bb54bdf710ef624e2 Mon Sep 17 00:00:00 2001 From: Yang Deokgyu Date: Thu, 21 Nov 2019 15:17:36 +0900 Subject: [PATCH 049/109] ODROID-XU4: drivers/fbtft: Add fb_hktft32 module for Hardkernel 3.2 inch TFT LCD No longer use flexfb, fbtft_device that is deprecated since kernel 5.4. Signed-off-by: Yang Deokgyu Change-Id: Iebd014360f90eab5210722102d54c6169be5e28e --- drivers/staging/fbtft/Kconfig | 7 ++ drivers/staging/fbtft/Makefile | 1 + drivers/staging/fbtft/fb_hktft32.c | 156 +++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 drivers/staging/fbtft/fb_hktft32.c diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig index b6cd416ebb26..408ef1a2f978 100644 --- a/drivers/staging/fbtft/Kconfig +++ b/drivers/staging/fbtft/Kconfig @@ -213,3 +213,10 @@ config FB_TFT_HKTFT35 help Generic Framebuffer support for the Hardkernel 3.5 inch TFT LCD that uses the ILI9488 LCD Controller + +config FB_TFT_HKTFT32 + tristate "FB driver for the Hardkernel 3.2 inch TFT LCD" + depends on FB_TFT + help + Generic Framebuffer support for the Hardkernel 3.2 inch TFT LCD + that uses the ILI9340 LCD Controller diff --git a/drivers/staging/fbtft/Makefile b/drivers/staging/fbtft/Makefile index 3d41175663ed..34a5a14d1ab4 100644 --- a/drivers/staging/fbtft/Makefile +++ b/drivers/staging/fbtft/Makefile @@ -38,3 +38,4 @@ obj-$(CONFIG_FB_TFT_UC1701) += fb_uc1701.o obj-$(CONFIG_FB_TFT_UPD161704) += fb_upd161704.o obj-$(CONFIG_FB_TFT_WATTEROTT) += fb_watterott.o obj-$(CONFIG_FB_TFT_HKTFT35) += fb_hktft35.o +obj-$(CONFIG_FB_TFT_HKTFT32) += fb_hktft32.o diff --git a/drivers/staging/fbtft/fb_hktft32.c b/drivers/staging/fbtft/fb_hktft32.c new file mode 100644 index 000000000000..33ac19603cad --- /dev/null +++ b/drivers/staging/fbtft/fb_hktft32.c @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * FB driver for the Hardkernel 3.2 inch TFT LCD + * that uses the ILI9340 LCD Controller + * + * Copyright (C) 2019 Yang Deokgyu + * + * Based on fb_ili9340.c by Noralf Tronnes + */ + +#include +#include +#include +#include +#include +#include