On Fri, Oct 06, 2023 at 03:27:37AM -0700, Max Filippov wrote: > On Fri, Oct 6, 2023 at 2:34 AM Greg Kroah-Hartman > > > > 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/ Ok, we should encode this as a "real" number, "PORT_ANY" and set it to -1 and let all new devices use it. thanks, greg k-h