From b84f8e6e039ba2b3f017e26eb42320c3b8618cd5 Mon Sep 17 00:00:00 2001 From: ZHANG Yuntian Date: Wed, 4 Jun 2025 15:07:47 +0800 Subject: [PATCH] ch9344: 0-unstable-2024-11-15 -> 2.3 Also transfer maintainership to @RadxaYuntian. --- pkgs/os-specific/linux/ch9344/default.nix | 9 +++++---- .../linux/ch9344/fix-linux-6-15-build.patch | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 pkgs/os-specific/linux/ch9344/fix-linux-6-15-build.patch diff --git a/pkgs/os-specific/linux/ch9344/default.nix b/pkgs/os-specific/linux/ch9344/default.nix index e3d8e747a03c..2f290467ace7 100644 --- a/pkgs/os-specific/linux/ch9344/default.nix +++ b/pkgs/os-specific/linux/ch9344/default.nix @@ -7,17 +7,18 @@ stdenv.mkDerivation rec { pname = "ch9344"; - version = "0-unstable-2024-11-15"; + version = "2.3"; src = fetchFromGitHub { owner = "WCHSoftGroup"; repo = "ch9344ser_linux"; - rev = "4ea8973886989d67acdd01dba213e355eacc9088"; - hash = "sha256-ZZ/8s26o7wRwHy6c0m1vZ/DtRW5od+NgiU6aXZBVfc4="; + rev = "e0a38c4f4f9d4c1f5e2e3a352b7b1010b33aa322"; + hash = "sha256-ldYoGmG9DAjASl3xL8djeZ8jRHlcBQdAt0KYAr53epI="; }; patches = [ ./fix-linux-6-12-build.patch + ./fix-linux-6-15-build.patch ]; sourceRoot = "${src.name}/driver"; @@ -47,6 +48,6 @@ stdenv.mkDerivation rec { ''; license = licenses.gpl2Only; platforms = platforms.linux; - maintainers = with maintainers; [ MakiseKurisu ]; + maintainers = with maintainers; [ RadxaYuntian ]; }; } diff --git a/pkgs/os-specific/linux/ch9344/fix-linux-6-15-build.patch b/pkgs/os-specific/linux/ch9344/fix-linux-6-15-build.patch new file mode 100644 index 000000000000..9ba5e1271413 --- /dev/null +++ b/pkgs/os-specific/linux/ch9344/fix-linux-6-15-build.patch @@ -0,0 +1,16 @@ +diff --git a/ch9344.c b/ch9344.c +index 36402c0..cb3efc2 100644 +--- a/ch9344.c ++++ b/ch9344.c +@@ -1251,7 +1251,11 @@ static void ch9344_port_shutdown(struct tty_port *port) + struct ch9344 *ch9344 = tty_get_portdata(ttyport); + int portnum = ttyport->portnum; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ timer_delete(&ttyport->timer); ++#else + del_timer(&ttyport->timer); ++#endif + ch9344_set_control(ch9344, portnum, 0x00); + ch9344_set_control(ch9344, portnum, 0x10); + ttyport->isopen = false;