Re: [PATCH v4 5/5] drivers/tty/serial: add ESP32S3 ACM device driver

From: Max Filippov
Date: Fri Oct 06 2023 - 06:27:55 EST


On Fri, Oct 6, 2023 at 2:34 AM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> If you only want your code being used in Linux, then stick with
> "GPL-2.0". If you want your code to be able to be copied into other
> GPLv3 licensed code bodies (like Hurd and others), then license it as
> "GPL-2.0-or-later". Your call.

Thanks. From that point of view I prefer GPL-2.0-or-later.

> > > Yes, but not all do. If you don't need to do anything special, it can
> > > just claim to be a normal device, we've had threads about this on the
> > > list before. If you don't need to determine in userspace from the tty
> > > connection what device it is, just use the default one instead.
> >
> > Ok, it looks like having
> >
> > #define PORT_ESP32ACM (-1)
> >
> > in the driver source should be ok? I've tested that it works.
>
> Hah, I like that hack. But why not just use PORT_UNKNOWN?

A lot of functionality doesn't work with PORT_UNKNOWN, e.g.
console or modem control.
I've got the idea of using -1 from this email:
https://lore.kernel.org/linux-serial/502240f7-2cac-4fe6-9e27-f9861db3666d@xxxxxxxxxxxxxxxx/

--
Thanks.
-- Max