Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7789967rwp; Tue, 18 Jul 2023 23:39:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlHkezYfwJt7jkd+k7u5Sn+Xl03Si7ocGlsB0k+lKtmsOFVF8j0E0wUn+VlESsVf6iQLYrjs X-Received: by 2002:a05:6358:c1f:b0:135:7c30:523 with SMTP id f31-20020a0563580c1f00b001357c300523mr14207718rwj.16.1689748766080; Tue, 18 Jul 2023 23:39:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689748766; cv=none; d=google.com; s=arc-20160816; b=o4rL6L6nwi/QUOKvDarQmSb/zMbstpocOVE2oC24PhPhoiGPa/h0Xx0E+l3KCpx7Sa EVXQEhIehmJ/4iR+PHLUYIhOB8bIGNzFasCzc5iNP23Zv0HZqSyhfrC4NnibYwHQnSyI grLF0d5tljwxXDE4ixNqlfcTjKnQT1rLjV496A6Kpneltt/iMuOYQvTTSJUpPVN2giIv zJScpCUDo4vGOeHQQgDU5Gby6yE4JTA2LKKfAo5dL52W6sRpENlj/qabWpAuq4p4Xo98 SAMIvLVEKewfwQTj+FlKc8/FtPSRO8d8IOepIkwP+wwBvu/NGNXfbqjgHOmIwb8fzCxO 01Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=H5QftzKFIK0qNG/TKTE/vcSIxAeIKZ9Vis7xZ5VoLIA=; fh=IS02RoIHLbCiJNq8+QiKzFj+9XJi9BufCOEpMoIEx24=; b=KTBL/rp1tEZsNWf9dCO7TrobJfabSV0DqM6uiBqw91h2xzmY3wG/Yw3ELcjLZwI4Vz ReSviQ7wh9OcJy4fXqj+CfjNFAK4TMjfUEYUq3/m0BcUKc5Z1rpNPFLCzBS2xZaCtqfm cgp23cYLgEzqbtvBkWvlOt/LFhBVA1h5ern08KYIJTHHhmvT8c+v0mNGIVU6t2VOapz2 NagKfUDswUI3gytfCew/Z052NkxruMGvWFP0QJoVL1mZOcDKww1HDtw9+qWc4OInIVM+ IffuN3+K4EVTHggSOf0uYTt62SxjRN1h8z+dJFNag7sH4LCYN4RWY6eA1yZqkMK7q2az kkbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l185-20020a6388c2000000b0055acc7f805bsi2989092pgd.334.2023.07.18.23.39.13; Tue, 18 Jul 2023 23:39:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230273AbjGSFn1 (ORCPT + 99 others); Wed, 19 Jul 2023 01:43:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjGSFnY (ORCPT ); Wed, 19 Jul 2023 01:43:24 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D42221BF2; Tue, 18 Jul 2023 22:43:23 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 4876B80AA; Wed, 19 Jul 2023 05:43:23 +0000 (UTC) Date: Wed, 19 Jul 2023 08:43:21 +0300 From: Tony Lindgren To: Andy Shevchenko Cc: Greg Kroah-Hartman , Jiri Slaby , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-omap@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] serial: core: Add sysfs links for serial core port instances for ttys Message-ID: <20230719054321.GJ5194@atomide.com> References: <20230719051613.46569-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Shevchenko [230719 05:34]: > On Wed, Jul 19, 2023 at 08:16:11AM +0300, Tony Lindgren wrote: > > Let's allow the userspace to find out the tty name for a serial core > > controller id if a tty exists. This can be done with: > > > > $ grep DEVNAME /sys/bus/serial-base/devices/port*/tty/uevent > > /sys/bus/serial-base/devices/port.00:04.0/tty/uevent:DEVNAME=ttyS0 > > /sys/bus/serial-base/devices/port.serial8250.1/tty/uevent:DEVNAME=ttyS1 > > /sys/bus/serial-base/devices/port.serial8250.2/tty/uevent:DEVNAME=ttyS2 > > /sys/bus/serial-base/devices/port.serial8250.3/tty/uevent:DEVNAME=ttyS3 > > What part is the controller ID here? Oh looks like controller id it's missing in the name, I'll send a fix for that. > We also have something in procfs (I don't remember what info exactly is there). Do you mean /proc/devices? > > And with this, we can add /dev/serial/by-id symlinks to the serial port > > device instances so we can start using serial core port addressing in > > addition to the legacy ttyS naming. > > > > The naming we can use is dev_name:0.0 where 0.0 are the serial core > > controller id and port id, so for the ttyS0 example above the naming > > would be 00:04.0:0.0. > > This is interesting idea. But any hint why it can be useful? If you have lots of serial ports and we are stuck with adding aliases for the ports in the dts files where the ttyS naming and ordering does not really help or may not necessarily make sense if the ports are on different buses or domains. With CONFIG_SERIAL_8250_RUNTIME_UARTS=4, the ttyS naming is only needed for the legacy ports really. Regards, Tony