Package Details: spi-ch341-usb-dkms r16.79bbe57-1

Git Clone URL: (read-only, click to copy)
Package Base: spi-ch341-usb-dkms
Description: SPI/GPIO driver for CH341
Upstream URL:
Licenses: GPL
Submitter: sergej
Maintainer: None
Last Packager: sergej
Votes: 1
Popularity: 0.000001
First Submitted: 2019-06-28 14:43
Last Updated: 2019-06-28 14:43

Latest Comments

pwhelan commented on 2021-04-04 22:46

I patched my own version to call generic_handle_irq instead of handle_simple_irq, but after reading the documentation and code of both functions I doubt that is the real way to do it.

I've looked and I can see no other way of gaining access to an irq's irq_desc besides irq_to_desc. I was also unable to find the rationale for unexporting it in the first place.

dimich commented on 2021-03-29 18:40

@Pumpko There is commit 64a1b95bb9fe3ec76e1a2cd803eff06389341ae4 on Dec 10 2020 to linux sources tree: +#ifdef CONFIG_KVM_BOOK3S_64_HV which breaks spi-ch341-usb build. I don't know how to fix this without kernel source modification. We can either wait until spi-ch341-usb upstream fixed or propose patch to the Arch linux package maintainers or to upstream kernel sources. If i had full CH341 chip datasheet, i would try to reimplement the driver, but i can't found it. Sorry, i accidentally mentioned another person in the previous comment.

dimich commented on 2021-03-29 16:54

@politas, i got the same error after some recent update. Trying to figure out how to fix it.

Pumpko commented on 2021-03-29 13:55


make -C /usr/src/linux/ M=/home/pumpko/.source/spi-ch341-usb  modules
make[1]: Entering directory '/usr/lib/modules/5.11.10-arch1-1/build'
  MODPOST /home/pumpko/.source/spi-ch341-usb/Module.symvers
ERROR: modpost: "irq_to_desc" [/home/pumpko/.source/spi-ch341-usb/spi-ch341-usb.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:111: /home/pumpko/.source/spi-ch341-usb/Module.symvers] Error 1
make[2]: *** Deleting file '/home/pumpko/.source/spi-ch341-usb/Module.symvers'
make[1]: *** [Makefile:1712: modules] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.11.10-arch1-1/build'
make: *** [Makefile:20: spi-ch341-usb.ko] Error 2

I tried all your fixes but it doesn't work (still the same errors as politas'). I tried to pull directly from github and patch it too but I got these error

dimich commented on 2020-07-30 16:34

@politas, in dkms.conf:


must be changed to:


politas commented on 2020-07-27 03:50

Install DKMS modules
==> dkms install --no-depmod -m spi-ch341-usb -v r16.79bbe57 -k 5.7.9-1-MANJARO
Error! Bad return status for module build on kernel: 5.7.9-1-MANJARO (x86_64)
Error while configuring 
Consult /var/lib/dkms/spi-ch341-usb/r16.79bbe57/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m spi-ch341-usb -v r16.79bbe57 -k 
5.7.9-1-MANJARO' returned 10
==> depmod 5.7.9-1-MANJARO


DKMS make.log for spi-ch341-usb-r16.79bbe57 for kernel 5.7.9-1-MANJARO (x86_64)
Mon 27 Jul 2020 13:47:39 AEST
make: Entering directory '/usr/lib/modules/5.7.9-1-MANJARO/build'

scripts/ arch/x86/entry/syscalls/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/x86/entry/syscalls/Makefile'.  Stop.
make: *** [arch/x86/Makefile:217: archheaders] Error 2
make: *** Waiting for unfinished jobs....
make[1]: Nothing to be done for 'objtool'.
make: Leaving directory '/usr/lib/modules/5.7.9-1-MANJARO/build'

What am I missing?

dimich commented on 2020-02-12 11:52

I faced some issues while installing the driver for 5.5.2-arch2-2. They can be fixed by following changes:

1. In Makefile change KERNEL_DIR = /usr/src/linux-headers-$(KVERSION)/
KERNEL_DIR = /lib/modules/$(KVERSION)/build/
KERNEL_DIR = /usr/src/linux/

2. In spi-ch341-usb.c add
#define SPI_BIT_MASK(bits) (((bits) == 32) ? ~0U : (BIT(bits) - 1))