From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1152C1642F for ; Fri, 6 Oct 2023 11:04:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="t9sDin+6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E05BEC433C7; Fri, 6 Oct 2023 11:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696590275; bh=XLlwpGj1hGJ6zbiAJm0mczBltVK0XU1/GnjKB3xO8Kw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t9sDin+6Bx9KckpASK79eyQQDDBomfGeuU8KogasxXKv1d57Mtv6mAj2kIKRC3dLy VBKwFd5ahyGAq9dVV30loulisE9s6e5uBc/iPD9mZ01kDzVB8/J1vvH6HbPHu+M7sx 6PD2ArRTwAJZmzeD6382ROVEM6iZjKSSbIo4/4ao= Date: Fri, 6 Oct 2023 13:04:32 +0200 From: Greg Kroah-Hartman To: Max Filippov Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ilpo =?iso-8859-1?Q?J=E4rvinen?= Subject: Re: [PATCH v4 5/5] drivers/tty/serial: add ESP32S3 ACM device driver Message-ID: <2023100640-isolating-privatize-7bf7@gregkh> References: <20230928151631.149333-1-jcmvbkbc@gmail.com> <20230928151631.149333-6-jcmvbkbc@gmail.com> <2023100326-crushing-septic-4856@gregkh> <2023100544-rendering-identify-e0ad@gregkh> <2023100625-water-molehill-4a8f@gregkh> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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@app.fastmail.com/ 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