From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Neal Liu <neal_liu@aspeedtech.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: Questions about usb to serial driver
Date: Fri, 1 Jul 2022 11:24:01 +0200 [thread overview]
Message-ID: <Yr69MTLQHcJBC6Ts@kroah.com> (raw)
In-Reply-To: <HK0PR06MB3202364874FC7283767C05D280BD9@HK0PR06MB3202.apcprd06.prod.outlook.com>
On Fri, Jul 01, 2022 at 08:57:51AM +0000, Neal Liu wrote:
> > -----Original Message-----
> > From: gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
> > Sent: Friday, July 1, 2022 3:16 PM
> > To: Neal Liu <neal_liu@aspeedtech.com>
> > Cc: linux-usb@vger.kernel.org; linux-serial@vger.kernel.org
> > Subject: Re: Questions about usb to serial driver
> >
> > On Fri, Jul 01, 2022 at 03:16:13AM +0000, Neal Liu wrote:
> > > Hi all,
> > >
> > > I have a question about USB-serial and I hope I can find the answer from
> > here.
> > > I'll be appreciated it if there is any feedback from you.
> > >
> > > My question is If I have a USB device controller (udc) and a uart
> > > controller (16550) independently in a SoC, is there any usb-serial drivers or
> > applications that could possible to support/connect:
> > > - udc tx to uart rx
> > > - uart tx to udc rx
> > >
> > > Any chance I can make this SoC as a usb-serial devices?
> >
> > Sure, use the CONFIG_USB_CONFIGFS_SERIAL or CONFIG_USB_CONFIGFS_ACM
> > build options and hook your gadget up to the serial port in userspace and you
> > will have a very expensive usb-serial converter (there are very cheap chips that
> > do the same thing if you want to make a simpler
> > device.)
> >
> > hope this helps,
>
> Thanks Greg!
>
> What the detail steps exactly for "hook your gadget up to the serial port in userspace"?
> Assume my system has:
> 1 system uart: ttyS0
> 1 uart: ttyS1
> 1 usb gadget cdc acm: ttyGS0
>
> How to hook up ttyS1 to ttyGS0, so that I could communicate through below path.
> PC1 - usb interface - my SoC (ttyGS0 - ttyS1) - rs232 interface - PC2?
That's an exercise left for the reader to do, odds are you need a
userspace program that just copies the data back and forth. Try it and
see!
greg k-h
next prev parent reply other threads:[~2022-07-01 9:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 3:16 Questions about usb to serial driver Neal Liu
2022-07-01 7:16 ` gregkh
2022-07-01 8:57 ` Neal Liu
2022-07-01 9:24 ` gregkh [this message]
2022-07-04 8:31 ` Neal Liu
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=Yr69MTLQHcJBC6Ts@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neal_liu@aspeedtech.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