Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3013763rdb; Tue, 12 Sep 2023 21:48:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHygxPgyqcQ+L7Em6WGWYpZQCrKGqYqsGy5/P0MDWK9EOCusCVUDuFeQOdypniHgr/f7tNS X-Received: by 2002:a05:6a21:3289:b0:137:3eba:b81f with SMTP id yt9-20020a056a21328900b001373ebab81fmr1360708pzb.3.1694580508893; Tue, 12 Sep 2023 21:48:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694580508; cv=none; d=google.com; s=arc-20160816; b=XbU8jGutdbdgCh31a50JZ0Ukp9YjJPdx3Vdix3BKcMMgWYJmuRwx8NaOi2oxTJRgd9 N68aQ9ZdaUxnWEbf1ABN97dQivcmylQbIZAtawfyQ4JGDOYrSWYGlzpmRx8Uwo8mDUPI eBBKLINFLwgcXbLkNfBSF/0K7gmpiKS9TPhDq/2WO/9B9HefvOEkALOnIvIwe8bDlp61 vi/UFl6GLQUz5dFLPl7u6ND53yILgjo2EW5bDQvxAFWbUPh3aokIX+XegAgxl3mvqF1/ 9PFtyN50tNZSIiRqECuoHVIVIcYwxNaX17hGExCzand9y9vd6WWlSDcSUX+MI2V+4OFe CUAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ozptDIt8zyAzbwcPGE+zm/c3ko7Wn7IpEggwCdjrtEM=; fh=n7dM+f7LjYuLx+o4gzxXNkEWC9u7qeJi6cmcRDZcVew=; b=DA2d38CgJ03hEB6VoXJHRMvv70T6zvYT1hRvcrTZ0uKRClEO/uoz1s49GDZeiVzoqv BGsM53fczkh2MLrYsDjIYVcrWL8Lh4lSBnr2mF0jblGibrZ/4Ry91bKuMbJ7jqjbK3iX GGq8cmTO/a3fSyDxi6yS0XYFZdw30RSiYU2wngOMbxPu81aT7KfOcmWdWpudlpD8ayuj NGbvFxBnuO961nVRLGfOlL+Z0KhleYATVcFmhg4Cm9FUd+CdvNF+CSEuX0nmBmVNgqzo JoMF/ncBwyOv+RDfnUwiORB2AkYNqa000Ux/LKAkvRkK7N5LUnPrao8lWaXY7U+cDDS/ uWGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id fu21-20020a17090ad19500b00273ec8dfff8si763765pjb.80.2023.09.12.21.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 21:48:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 26EBB81DE21F; Tue, 12 Sep 2023 04:05:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234295AbjILLEy (ORCPT + 99 others); Tue, 12 Sep 2023 07:04:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234554AbjILLEW (ORCPT ); Tue, 12 Sep 2023 07:04:22 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 027C810DE; Tue, 12 Sep 2023 04:04:09 -0700 (PDT) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 5F15F80FC; Tue, 12 Sep 2023 11:04:07 +0000 (UTC) From: Tony Lindgren To: Greg Kroah-Hartman , Jiri Slaby Cc: Andy Shevchenko , Dhruva Gole , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH v2 0/3] Add support for DEVNAME:0.0 style hardware based addressing Date: Tue, 12 Sep 2023 14:03:42 +0300 Message-ID: <20230912110350.14482-1-tony@atomide.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 12 Sep 2023 04:05:19 -0700 (PDT) Hi all, With the recent serial core changes in v6.5, we can now add DEVNAME:0.0 style addressing for the serial ports. When using DEVNAME:0.0 naming, we don't need to care which ttyS instance number is allocated depending on HSUART settings or if the devicetree has added aliases for all the ports. With these changes the port mapping is visible for usespace in sysfs with: $ grep DEVNAME /sys/bus/serial-base/devices/*/tty/uevent Regards, Tony Changes since v1: - Constify printk add_preferred_console() as suggested by Jiri - Use proper kernel command line helpers for parsing console as suggested by Jiri - Update description for HSUART based on Andy's comments - Standardize on DEVNAME:0.0 style naming as suggested by Andy - Added missing put_device() calls paired with device_find_child() Tony Lindgren (3): printk: Constify name for add_preferred_console() serial: core: Add support for DEVNAME:0.0 style naming for kernel console serial: core: Add sysfs links for serial core port instances for ttys drivers/tty/serial/Makefile | 3 + drivers/tty/serial/serial_base.h | 11 +++ drivers/tty/serial/serial_base_con.c | 133 +++++++++++++++++++++++++++ drivers/tty/serial/serial_core.c | 26 ++++++ include/linux/console.h | 2 +- kernel/printk/printk.c | 4 +- 6 files changed, 176 insertions(+), 3 deletions(-) create mode 100644 drivers/tty/serial/serial_base_con.c base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c -- 2.42.0