Update generic_raw_uart and eq3_char_loop to latest versions (#3964)

Update generic_raw_uart package to the latest sources available coming with
direct kernel 6.12.x compatibility dropping the intermediate patches
accordingly. In addition, the eq3_char_loop patchset was updated to reflect the
same changes performed.
This commit is contained in:
Jens Maus 2025-03-23 10:59:02 +01:00 committed by GitHub
parent 05830dae0b
commit 15e59ead2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 10 additions and 132 deletions

@ -1 +1 @@
Subproject commit 3914f8cad5a87a3aa1ba3aa04733887a869b87fe
Subproject commit 2ccc4c3f04e4c23beb286ac969061b911bb84c0f

View File

@ -1,16 +1,17 @@
Remove llseek NULL'd in 6.0 (868941b) removed in 6.12 (cb787f4)
Upstream: Not applicable
Signed-off-by: Nick Venenga <nick@venenga.com>
Upstream: https://github.com/jens-maus/occu/pull/1
Signed-off-by: Alexander Reinert <alex@areinert.de>
--- a/KernelDrivers/eq3_char_loop.c
+++ b/KernelDrivers/eq3_char_loop.c
@@ -898,7 +898,9 @@ static int eq3loop_open(struct inode *inode, struct file *filp)
@@ -917,7 +917,11 @@ static int eq3loop_open(struct inode *inode, struct file *filp)
static struct file_operations eq3loop_fops = {
.owner = THIS_MODULE,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
.llseek = no_llseek,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0))
+ .llseek = noop_llseek,
+#else
.llseek = no_llseek,
+#endif
.read = eq3loop_read,
.write = eq3loop_write,

View File

@ -1,17 +0,0 @@
Remove llseek NULL'd in 6.0 (868941b) removed in 6.12 (cb787f4)
Signed-off-by: Nick Venenga <nick@venenga.com>
Upstream: https://github.com/alexreinert/piVCCU/pull/533
--- a/kernel/generic_raw_uart.c
+++ b/kernel/generic_raw_uart.c
@@ -147,7 +147,9 @@ static int generic_raw_uart_get_device_type(struct generic_raw_uart_instance *in
static struct file_operations generic_raw_uart_fops =
{
.owner = THIS_MODULE,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
.llseek = no_llseek,
+#endif
.read = generic_raw_uart_read,
.write = generic_raw_uart_write,
.open = generic_raw_uart_open,

View File

@ -1,19 +0,0 @@
Replace `gpiochip_add` removed in 6.11 (3ff1180) with `gpiochip_add_data` added in 4.5 (b08ea35)
Signed-off-by: Nick Venenga <nick@venenga.com>
Upstream: https://github.com/alexreinert/piVCCU/pull/533
--- a/kernel/hb_rf_eth.c
+++ b/kernel/hb_rf_eth.c
@@ -715,7 +715,11 @@ static int __init hb_rf_eth_init(void)
gc.base = -1;
gc.can_sleep = false;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
err = gpiochip_add(&gc);
+#else
+ err = gpiochip_add_data(&gc, NULL);
+#endif
if (err)
goto failed_gc_create;

View File

@ -1,87 +0,0 @@
Change raw_uart_driver remove macro to define the function as void as in kernel 6.11
the platform_device remove function was changed to void (0edb555).
Upstream: Not applicable
Signed-off-by: Jens Maus <mail@jens-maus.de>
diff --git a/kernel/generic_raw_uart.h b/kernel/generic_raw_uart.h
index b865e22..791e5d0 100644
--- a/kernel/generic_raw_uart.h 2025-01-10 13:19:08.697184514 +0100
+++ b/kernel/generic_raw_uart.h 2025-01-10 13:28:43.311159893 +0100
@@ -93,6 +93,8 @@
extern bool generic_raw_uart_verify_dkey(struct device *dev, unsigned char *dkey, int dkey_len, unsigned char *skey, uint32_t *pkey, int bytes);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
+
#define module_raw_uart_driver(__module_name, __raw_uart_driver, __of_match) \
static struct generic_raw_uart *__raw_uart_driver##_raw_uart; \
static int __##__raw_uart_driver##_probe(struct platform_device *pdev) \
@@ -121,7 +123,7 @@
int err; \
struct device *dev = &pdev->dev; \
\
- err = generic_raw_uart_remove(__raw_uart_driver##_raw_uart); \
+ err = generic_raw_uart_remove(__raw_uart_driver##_raw_uart); \
if (err) \
{ \
dev_err(dev, "failed to remove generic_raw_uart module"); \
@@ -143,3 +145,57 @@
\
module_platform_driver(__raw_uart_driver_platform_driver); \
MODULE_DEVICE_TABLE(of, __of_match);
+
+#else
+
+#define module_raw_uart_driver(__module_name, __raw_uart_driver, __of_match) \
+ static struct generic_raw_uart *__raw_uart_driver##_raw_uart; \
+ static int __##__raw_uart_driver##_probe(struct platform_device *pdev) \
+ { \
+ struct device *dev = &pdev->dev; \
+ int err = __raw_uart_driver##_probe(pdev); \
+ \
+ if (err) \
+ { \
+ dev_err(dev, "failed to initialize generic_raw_uart module"); \
+ return err; \
+ } \
+ \
+ __raw_uart_driver##_raw_uart = generic_raw_uart_probe(dev, &__raw_uart_driver, NULL); \
+ if (IS_ERR_OR_NULL(__raw_uart_driver##_raw_uart)) \
+ { \
+ dev_err(dev, "failed to initialize generic_raw_uart module"); \
+ return PTR_ERR(__raw_uart_driver##_raw_uart); \
+ } \
+ \
+ return 0; \
+ } \
+ \
+ static void __##__raw_uart_driver##_remove(struct platform_device *pdev) \
+ { \
+ int err; \
+ struct device *dev = &pdev->dev; \
+ \
+ err = generic_raw_uart_remove(__raw_uart_driver##_raw_uart); \
+ if (err) \
+ { \
+ dev_err(dev, "failed to remove generic_raw_uart module"); \
+ } \
+ \
+ __raw_uart_driver##_remove(pdev); \
+ } \
+ \
+ static struct platform_driver __raw_uart_driver_platform_driver = { \
+ .probe = __##__raw_uart_driver##_probe, \
+ .remove = __##__raw_uart_driver##_remove, \
+ .driver = { \
+ .owner = THIS_MODULE, \
+ .name = __module_name, \
+ .of_match_table = __of_match, \
+ }, \
+ }; \
+ \
+ module_platform_driver(__raw_uart_driver_platform_driver); \
+ MODULE_DEVICE_TABLE(of, __of_match);
+
+#endif

View File

@ -1,3 +1,3 @@
# Locally computed
sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE
sha256 f1741dfe9ea6ea37213c35c735aa899f11e4c2961bccd6d8198d4051b3c42c5d generic_raw_uart-f691101c32435921a70c96075233b6d5e5eeab7d.tar.gz
sha256 1a99e87c48e95c173ce6f43b8783ac359022886265bb2ed86f67c6d05cf12658 generic_raw_uart-b80aacfb75e9689d14d4e2c94380728816c6313e.tar.gz

View File

@ -13,7 +13,7 @@
#
################################################################################
GENERIC_RAW_UART_VERSION = f691101c32435921a70c96075233b6d5e5eeab7d
GENERIC_RAW_UART_VERSION = b80aacfb75e9689d14d4e2c94380728816c6313e
GENERIC_RAW_UART_SITE = $(call github,alexreinert,piVCCU,$(GENERIC_RAW_UART_VERSION))
GENERIC_RAW_UART_LICENSE = GPL2
GENERIC_RAW_UART_LICENSE_FILES = LICENSE