From: Greg KH <gregkh@linuxfoundation.org>
To: Vegom Doster <vegomdoster@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: serial: ch341: add debugfs interface and clean up
Date: Thu, 6 Aug 2026 06:40:26 +0200 [thread overview]
Message-ID: <2026080638-zoning-trekker-b568@gregkh> (raw)
In-Reply-To: <CACnaG5z0_QERhbWNJsERJQkDb14ppy7Pkbxgt6WwM6u9h9UhUg@mail.gmail.com>
On Wed, Aug 05, 2026 at 08:28:00PM +0500, Vegom Doster wrote:
> On Wed, Aug 5, 2026 at 8:27 PM Vegom Doster <vegomdoster@gmail.com> wrote:
>
> > This patch adds a debugfs interface for the CH341 driver, allowing runtime
> > inspection of chip version, quirks, and line status. It also adds a 'baud'
> > file to test the divisor calculation without hardware.
> >
> > The patch also cleans up magic numbers, removes duplicate code, and fixes
> > several issues:
> > - Replace obsolete usb_control_msg() with usb_control_msg_send/recv
> > - Convert version>0x27 hack to proper CH341_QUIRK_INVERTED_BIT7
> > - Fix baud_rate update in ch341_set_termios (only on success)
> > - Use READ_ONCE/WRITE_ONCE for break_end
> > - Fix error handling in ch341_reset_resume
> > - Add debugfs interface for diagnostics
> >
> > No functional changes are made to the driver's operation.
> >
> > Tested on Arch Linux with Arduino Uno (CH340C, 1a86:7523):
> > - checkpatch: 0 errors, 0 warnings, 0 checks
> > - DTR/RTS (tiocmget/set): PASS
> > - Echo at 9600 and 115200 baud: PASS (byte-per-byte)
> > - Divisor formula for 15 speeds (300..3000000): PASS (error ≤0.16%)
> > - debugfs: tested with custom test script
> >
> > Signed-off-by: nerolocker <vegomdoster@gmail.com>
This shouldn't be quoted, and you need a real name for the signed-off-by
line.
> >
> // SPDX-License-Identifier: GPL-2.0
This isn't a diff, but rather the whole file.
Perhaps take a look at the "how to write a kernel patch" tutorial on
kernelnewbies.org first?
Also, obviously, you have to break this up into smaller pieces to even
be able to get it reviewed :)
And finally, why add a debugfs file at all? What is it going to be used
for and why is it only needed now, after the driver is very stable?
thanks,
greg k-h
next prev parent reply other threads:[~2026-08-06 4:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACnaG5x_EPK+PGqdrRO-OgOQ3go8EKFdV+R14bKuc9mTS5r31w@mail.gmail.com>
2026-08-05 15:28 ` [PATCH] usb: serial: ch341: add debugfs interface and clean up Vegom Doster
2026-08-06 4:40 ` Greg KH [this message]
2026-08-05 15:31 Vegom Doster
2026-08-06 4:41 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026080638-zoning-trekker-b568@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=vegomdoster@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox