xiaomi-umi: rewrite patches

This commit is contained in:
amazingfate
2024-01-30 01:51:08 +08:00
committed by Jianfeng Liu
parent 8060fc6837
commit 557393844d
2 changed files with 49 additions and 86 deletions

View File

@@ -12,12 +12,10 @@ Signed-off-by: FantasyGmm <16450052+FantasyGmm@users.noreply.github.com>
3 files changed, 426 insertions(+)
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index 99e14dc21..2ab846e5c 100644
index 99e14dc212ec..2ab846e5cfaf 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -6,10 +6,19 @@ config DRM_PANEL
Panel registration and lookup framework.
@@ -8,6 +8,15 @@ config DRM_PANEL
menu "Display Panels"
depends on DRM && DRM_PANEL
@@ -33,22 +31,18 @@ index 99e14dc21..2ab846e5c 100644
config DRM_PANEL_ABT_Y030XX067A
tristate "ABT Y030XX067A 320x480 LCD panel"
depends on OF && SPI
select REGMAP_SPI
help
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index d10c3de51..687a239df 100644
index d10c3de51c6d..687a239df8b1 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -86,5 +86,6 @@ obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o
obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o
obj-$(CONFIG_DRM_PANEL_VISIONOX_VTDR6130) += panel-visionox-vtdr6130.o
@@ -88,3 +88,4 @@ obj-$(CONFIG_DRM_PANEL_VISIONOX_VTDR6130) += panel-visionox-vtdr6130.o
obj-$(CONFIG_DRM_PANEL_VISIONOX_R66451) += panel-visionox-r66451.o
obj-$(CONFIG_DRM_PANEL_WIDECHIPS_WS2401) += panel-widechips-ws2401.o
obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o
+obj-$(CONFIG_DRM_PANEL_XIAOMI_UMI_CSOT) += panel-xiaomi-umi-csot.o
diff --git a/drivers/gpu/drm/panel/panel-xiaomi-umi-csot.c b/drivers/gpu/drm/panel/panel-xiaomi-umi-csot.c
new file mode 100644
index 000000000..5e1d3ec9c
index 000000000000..5e1d3ec9c08d
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-xiaomi-umi-csot.c
@@ -0,0 +1,416 @@
@@ -469,5 +463,5 @@ index 000000000..5e1d3ec9c
+MODULE_DESCRIPTION("DRM driver for xiaomi 42 02 0b cmd mode dsc dsi panel");
+MODULE_LICENSE("GPL");
--
Created with Armbian build tools https://github.com/armbian/build
Armbian

View File

@@ -33,17 +33,7 @@ Subject: Patching kernel arm64 files drivers/gpio/gpiolib-of.c
drivers/input/touchscreen/fts_521/fts_lib/ftsTool.h
drivers/input/touchscreen/fts_521/fts_limits.h
drivers/input/touchscreen/fts_521/fts_proc.c include/linux/of_gpio.h
Co-authored-by: Demon000 <demonsingur@gmail.com>
Co-authored-by: Adrian Salido <salidoa@google.com>
Co-authored-by: 1nfrag <sil3ntcll@gmail.com>
Co-authored-by: Elluzion <dyrex2004@gmail.com>
Co-authored-by: Logan-Developer <logan2.humbert@gmail.com>
Co-authored-by: EcrosoftXiao <xy19990903@gmail.com>
Co-authored-by: chematelegram <chfondia@gmail.com>
Co-authored-by: BigfootACA <bigfoot@classfun.cn>
Co-authored-by: ZeYan Li <qaz6750@outlook.com>
Signed-off-by: FantasyGmm <16450052+FantasyGmm@users.noreply.github.com>
---
drivers/gpio/gpiolib-of.c | 19 +-
drivers/input/touchscreen/Kconfig | 1 +
@@ -82,12 +72,10 @@ Signed-off-by: FantasyGmm <16450052+FantasyGmm@users.noreply.github.com>
34 files changed, 37694 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 402f7d99b..eec547271 100644
index 402f7d99b0c1..eec54727163d 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -27,21 +27,22 @@
/*
@@ -29,7 +29,7 @@
* This is Linux-specific flags. By default controllers' and Linux' mapping
* match, but GPIO controllers are free to translate their own flags to
* Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
@@ -96,9 +84,7 @@ index 402f7d99b..eec547271 100644
enum of_gpio_flags {
OF_GPIO_ACTIVE_LOW = 0x1,
OF_GPIO_SINGLE_ENDED = 0x2,
OF_GPIO_OPEN_DRAIN = 0x4,
OF_GPIO_TRANSITORY = 0x8,
OF_GPIO_PULL_UP = 0x10,
@@ -39,7 +39,8 @@ enum of_gpio_flags {
OF_GPIO_PULL_DOWN = 0x20,
OF_GPIO_PULL_DISABLE = 0x40,
};
@@ -108,11 +94,7 @@ index 402f7d99b..eec547271 100644
/**
* of_gpio_named_count() - Count GPIOs for a device
* @np: device node to count GPIOs for
* @propname: property name containing gpio specifier(s)
*
@@ -406,10 +407,24 @@ static struct gpio_desc *of_get_named_gpiod_flags(const struct device_node *np,
of_node_put(gpiospec.np);
@@ -408,6 +409,20 @@ static struct gpio_desc *of_get_named_gpiod_flags(const struct device_node *np,
return desc;
}
@@ -133,15 +115,11 @@ index 402f7d99b..eec547271 100644
/**
* of_get_named_gpio() - Get a GPIO number to use with GPIO API
* @np: device node to get GPIO from
* @propname: Name of property containing gpio specifier(s)
* @index: index of the GPIO
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 1f8b33c2b..8ef609788 100644
index 1f8b33c2b03d..8ef609788abd 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -10,10 +10,11 @@ menuconfig INPUT_TOUCHSCREEN
If unsure, say Y.
@@ -12,6 +12,7 @@ menuconfig INPUT_TOUCHSCREEN
if INPUT_TOUCHSCREEN
@@ -149,22 +127,18 @@ index 1f8b33c2b..8ef609788 100644
source "drivers/input/touchscreen/nt36523/Kconfig"
config TOUCHSCREEN_88PM860X
tristate "Marvell 88PM860x touchscreen"
depends on MFD_88PM860X
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index 7d52592f4..4b9fe7c9c 100644
index 7d52592f4290..4b9fe7c9c305 100644
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -117,5 +117,6 @@ obj-$(CONFIG_TOUCHSCREEN_RASPBERRYPI_FW) += raspberrypi-ts.o
obj-$(CONFIG_TOUCHSCREEN_IQS5XX) += iqs5xx.o
obj-$(CONFIG_TOUCHSCREEN_IQS7211) += iqs7211.o
@@ -119,3 +119,4 @@ obj-$(CONFIG_TOUCHSCREEN_IQS7211) += iqs7211.o
obj-$(CONFIG_TOUCHSCREEN_ZINITIX) += zinitix.o
obj-$(CONFIG_TOUCHSCREEN_HIMAX_HX83112B) += himax_hx83112b.o
obj-$(CONFIG_TOUCHSCREEN_NT36523_SPI) += nt36523/
+obj-$(CONFIG_TOUCHSCREEN_ST_FTS_V521) += fts_521/
diff --git a/drivers/input/touchscreen/fts_521/Kconfig b/drivers/input/touchscreen/fts_521/Kconfig
new file mode 100644
index 000000000..3f2e20abb
index 000000000000..3f2e20abb7f8
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/Kconfig
@@ -0,0 +1,25 @@
@@ -196,7 +170,7 @@ index 000000000..3f2e20abb
\ No newline at end of file
diff --git a/drivers/input/touchscreen/fts_521/Makefile b/drivers/input/touchscreen/fts_521/Makefile
new file mode 100644
index 000000000..cf21f2190
index 000000000000..cf21f2190fcc
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/Makefile
@@ -0,0 +1,6 @@
@@ -208,7 +182,7 @@ index 000000000..cf21f2190
+
diff --git a/drivers/input/touchscreen/fts_521/fts.c b/drivers/input/touchscreen/fts_521/fts.c
new file mode 100644
index 000000000..d2c3342fa
index 000000000000..d2c3342fa830
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts.c
@@ -0,0 +1,6519 @@
@@ -6733,7 +6707,7 @@ index 000000000..d2c3342fa
+module_exit(fts_driver_exit);
diff --git a/drivers/input/touchscreen/fts_521/fts.h b/drivers/input/touchscreen/fts_521/fts.h
new file mode 100644
index 000000000..6a17085da
index 000000000000..6a17085da88b
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts.h
@@ -0,0 +1,393 @@
@@ -7132,7 +7106,7 @@ index 000000000..6a17085da
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_fw.h b/drivers/input/touchscreen/fts_521/fts_fw.h
new file mode 100644
index 000000000..6821f3945
index 000000000000..6821f3945a7b
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_fw.h
@@ -0,0 +1,12573 @@
@@ -19711,7 +19685,7 @@ index 000000000..6821f3945
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/Makefile b/drivers/input/touchscreen/fts_521/fts_lib/Makefile
new file mode 100644
index 000000000..ca95cb028
index 000000000000..ca95cb0289ed
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/Makefile
@@ -0,0 +1,7 @@
@@ -19724,7 +19698,7 @@ index 000000000..ca95cb028
+
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsCompensation.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsCompensation.c
new file mode 100644
index 000000000..477955361
index 000000000000..477955361604
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsCompensation.c
@@ -0,0 +1,790 @@
@@ -20520,7 +20494,7 @@ index 000000000..477955361
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsCompensation.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsCompensation.h
new file mode 100644
index 000000000..1917e7484
index 000000000000..1917e7484142
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsCompensation.h
@@ -0,0 +1,110 @@
@@ -20636,7 +20610,7 @@ index 000000000..1917e7484
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsCore.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsCore.c
new file mode 100644
index 000000000..f1a4806f5
index 000000000000..f1a4806f55aa
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsCore.c
@@ -0,0 +1,1365 @@
@@ -22007,7 +21981,7 @@ index 000000000..f1a4806f5
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsCore.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsCore.h
new file mode 100644
index 000000000..0022ceacc
index 000000000000..0022ceacc3d2
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsCore.h
@@ -0,0 +1,180 @@
@@ -22193,7 +22167,7 @@ index 000000000..0022ceacc
+#endif /* FTS_CORE_H */
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsError.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsError.c
new file mode 100644
index 000000000..0435875f8
index 000000000000..0435875f8533
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsError.c
@@ -0,0 +1,357 @@
@@ -22556,7 +22530,7 @@ index 000000000..0435875f8
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsError.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsError.h
new file mode 100644
index 000000000..206a0b3ad
index 000000000000..206a0b3ad400
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsError.h
@@ -0,0 +1,145 @@
@@ -22707,7 +22681,7 @@ index 000000000..206a0b3ad
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsFlash.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsFlash.c
new file mode 100644
index 000000000..de7ae3659
index 000000000000..de7ae36591ae
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsFlash.c
@@ -0,0 +1,1032 @@
@@ -23745,7 +23719,7 @@ index 000000000..de7ae3659
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsFlash.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsFlash.h
new file mode 100644
index 000000000..5a4c19221
index 000000000000..5a4c19221228
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsFlash.h
@@ -0,0 +1,100 @@
@@ -23851,7 +23825,7 @@ index 000000000..5a4c19221
+/** @}*/
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsFrame.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsFrame.c
new file mode 100644
index 000000000..344bfa06c
index 000000000000..344bfa06cf2b
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsFrame.c
@@ -0,0 +1,398 @@
@@ -24255,7 +24229,7 @@ index 000000000..344bfa06c
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsFrame.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsFrame.h
new file mode 100644
index 000000000..94bf412d1
index 000000000000..94bf412d1793
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsFrame.h
@@ -0,0 +1,91 @@
@@ -24352,7 +24326,7 @@ index 000000000..94bf412d1
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsGesture.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsGesture.c
new file mode 100644
index 000000000..3a4e2a66b
index 000000000000..3a4e2a66bf9e
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsGesture.c
@@ -0,0 +1,349 @@
@@ -24707,7 +24681,7 @@ index 000000000..3a4e2a66b
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsGesture.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsGesture.h
new file mode 100644
index 000000000..226c3b0b1
index 000000000000..226c3b0b1b60
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsGesture.h
@@ -0,0 +1,38 @@
@@ -24751,7 +24725,7 @@ index 000000000..226c3b0b1
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsHardware.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsHardware.h
new file mode 100644
index 000000000..40c9e014c
index 000000000000..40c9e014cff7
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsHardware.h
@@ -0,0 +1,191 @@
@@ -24948,7 +24922,7 @@ index 000000000..40c9e014c
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsIO.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsIO.c
new file mode 100644
index 000000000..08ed56551
index 000000000000..08ed56551e63
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsIO.c
@@ -0,0 +1,911 @@
@@ -25865,7 +25839,7 @@ index 000000000..08ed56551
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsIO.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsIO.h
new file mode 100644
index 000000000..954c2f514
index 000000000000..954c2f5148de
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsIO.h
@@ -0,0 +1,59 @@
@@ -25930,7 +25904,7 @@ index 000000000..954c2f514
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsSoftware.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsSoftware.h
new file mode 100644
index 000000000..b270a2bcd
index 000000000000..b270a2bcded1
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsSoftware.h
@@ -0,0 +1,379 @@
@@ -26315,7 +26289,7 @@ index 000000000..b270a2bcd
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsTest.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsTest.c
new file mode 100644
index 000000000..3ec1e4a96
index 000000000000..3ec1e4a9605f
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsTest.c
@@ -0,0 +1,5936 @@
@@ -32257,7 +32231,7 @@ index 000000000..3ec1e4a96
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsTest.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsTest.h
new file mode 100644
index 000000000..127dce047
index 000000000000..127dce0478ee
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsTest.h
@@ -0,0 +1,293 @@
@@ -32556,7 +32530,7 @@ index 000000000..127dce047
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsTime.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsTime.c
new file mode 100644
index 000000000..39751d8b3
index 000000000000..39751d8b338a
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsTime.c
@@ -0,0 +1,80 @@
@@ -32643,7 +32617,7 @@ index 000000000..39751d8b3
\ No newline at end of file
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsTime.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsTime.h
new file mode 100644
index 000000000..d07472e46
index 000000000000..d07472e46467
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsTime.h
@@ -0,0 +1,57 @@
@@ -32706,7 +32680,7 @@ index 000000000..d07472e46
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsTool.c b/drivers/input/touchscreen/fts_521/fts_lib/ftsTool.c
new file mode 100644
index 000000000..a71efe86b
index 000000000000..a71efe86b169
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsTool.c
@@ -0,0 +1,648 @@
@@ -33360,7 +33334,7 @@ index 000000000..a71efe86b
+}
diff --git a/drivers/input/touchscreen/fts_521/fts_lib/ftsTool.h b/drivers/input/touchscreen/fts_521/fts_lib/ftsTool.h
new file mode 100644
index 000000000..86e20fa94
index 000000000000..86e20fa94f60
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_lib/ftsTool.h
@@ -0,0 +1,56 @@
@@ -33422,7 +33396,7 @@ index 000000000..86e20fa94
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_limits.h b/drivers/input/touchscreen/fts_521/fts_limits.h
new file mode 100644
index 000000000..46e096290
index 000000000000..46e09629061b
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_limits.h
@@ -0,0 +1,2109 @@
@@ -35537,7 +35511,7 @@ index 000000000..46e096290
+#endif
diff --git a/drivers/input/touchscreen/fts_521/fts_proc.c b/drivers/input/touchscreen/fts_521/fts_proc.c
new file mode 100644
index 000000000..850247991
index 000000000000..850247991e0e
--- /dev/null
+++ b/drivers/input/touchscreen/fts_521/fts_proc.c
@@ -0,0 +1,2451 @@
@@ -37993,12 +37967,10 @@ index 000000000..850247991
+ return OK;
+}
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index d0f66a5e1..704311d5f 100644
index d0f66a5e1b2a..704311d5f847 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -15,20 +15,47 @@
#include <linux/gpio.h> /* FIXME: Shouldn't be here */
#include <linux/of.h>
@@ -17,8 +17,26 @@
struct device_node;
@@ -38025,8 +37997,7 @@ index d0f66a5e1..704311d5f 100644
extern int of_get_named_gpio(const struct device_node *np,
const char *list_name, int index);
#else /* CONFIG_OF_GPIO */
@@ -27,6 +45,15 @@ extern int of_get_named_gpio(const struct device_node *np,
#include <linux/errno.h>
/* Drivers may not strictly depend on the GPIO support, so let them link. */
@@ -38042,8 +38013,6 @@ index d0f66a5e1..704311d5f 100644
static inline int of_get_named_gpio(const struct device_node *np,
const char *propname, int index)
{
return -ENOSYS;
}
--
Created with Armbian build tools https://github.com/armbian/build
Armbian