From 677244d300dd25e99d75aaa7f60ac293416d2e9f Mon Sep 17 00:00:00 2001 From: Deokgyu Yang Date: Thu, 21 Nov 2019 15:17:36 +0900 Subject: [PATCH] ODROID-COMMON: staging/fbtft: Add fb_hktft32 module for Hardkernel 3.2 inch TFT LCD This is for Odroid-N2/C4. Slightly different from the one for Odroid-XU4. Signed-off-by: Deokgyu Yang Change-Id: I615bd5494191c69c75fe6c98d399ebad27fac80b --- drivers/staging/fbtft/Kconfig | 7 ++ drivers/staging/fbtft/Makefile | 5 +- drivers/staging/fbtft/fb_hktft32.c | 145 +++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 drivers/staging/fbtft/fb_hktft32.c diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig index 279e91aea24c..5723f2b600da 100644 --- a/drivers/staging/fbtft/Kconfig +++ b/drivers/staging/fbtft/Kconfig @@ -215,3 +215,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 b4030d335991..c0636745d893 100644 --- a/drivers/staging/fbtft/Makefile +++ b/drivers/staging/fbtft/Makefile @@ -35,7 +35,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_FLEX) += flexfb.o - -# Device modules -obj-$(CONFIG_FB_TFT_FBTFT_DEVICE) += fbtft_device.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..708dc30e19c2 --- /dev/null +++ b/drivers/staging/fbtft/fb_hktft32.c @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * FB driver for the Hardkernel 3.2 inch TFT LCD + * that uses the ILI9340 LCD Controller + * for Odroid-N2/C4 using kernel 4.9 + * + * Copyright (C) 2020 Deokgyu Yang + * + * Based on fb_ili9340.c by Noralf Tronnes + */ + +#include +#include +#include +#include +#include +#include