Skip to content

Conversation

@geeksville
Copy link

Alas, I haven't yet packed this up as a nice PR. Are you still maintaining this project? If so, I can scrub my changes to collapse commits into something more atomic.

  • Also includes support for more of the GPIOs based on reading the chinese datasheet.
  • @Icenowy did reverse engineering of the closed-source Windows driver to find operations needed to read/write these GPIOs
  • Based on that work, it is no longer necessary for the user to wire an extra GPIO input to the dedicated IRQ line. This driver can now read that IRQ state directly.
  • Fix race condition (kernel crash) with thread on driver unload
  • Prevent bogus CS assertions during transactions

Alas, I haven't yet packed this up as a nice PR. Are you still maintaining this project? If so, I can scrub my changes to collapse commits into something more atomic.

@Nable80
Copy link

Nable80 commented May 30, 2021

Thank you very much!

Although I don't use kernel driver anymore, I often use CH341 from userspace (via pyusb) and additional GPIOs will help a lot.

@yueduz
Copy link

yueduz commented Oct 23, 2021

Hi! I can use GPIO, but the spi device does not appear in the /dev directory. , I'm not sure if it is a problem with my device or the driver.

@gschorcht
Copy link
Owner

@geeksville These are a lot of changes. Some of the compilation issues have alredy been solved by other PRs. It seems that there are a lot of changes in your PR that could improve the driver. So I would be very grateful if you would provide them. Maybe, it is possible to restructure and squash them a bit to become more clear. There are still some WIP commits.

@gschorcht
Copy link
Owner

@geeksville Does this PR make PR #16 obsolete. It seems that you pushed your changes also to @rogerjames99 branch.

@geeksville
Copy link
Author

@gschorcht oh yes, this does make PR #16 obsolete. I've been using this on recent kernels just fine. I hadn't heard anything back (wasn't sure if you were still maintaining - it is great you are!) so I also pushed to @rogerjames99 because at the time he had your code and a few other good fixes. I started my work from his branch.

Yes, I can squash a bit if you are interested in these PRs?

@JF002
Copy link

JF002 commented Dec 30, 2021

I'm really sorry to hijack this conversation, but I don't know where I could ask my question : I'm using this fork of this driver (which I think contains @geeksville changes) to communicate with a SX1262 (LoRa module) via a CH341 (this module).

@rogerjames99 's fork works very well for me so I'm would be happy to see those changes merged!

Well... it was working fine on kernel 5.10. Now that I'm running 5.14, the `/dev/spidevx.y' entries are not created anymore. I guess there were a few changes in spi/spidev in newer versions of the kernel that are not supported by this driver... I would like to try to fix this but I don't really know where to start looking... Do you have any ideas or pointers to help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants