Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2537462rdb; Wed, 21 Feb 2024 10:35:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU2kF8072RJwexSbElV4FaSTdNz1a9lORW29hoIUN4zO2YzKtWdeg+DqyFzQbAeJa6L1zDlo54nxdnPtCnro8gmeYGBjrzK2M3Fs2UfIw== X-Google-Smtp-Source: AGHT+IErFqXUo8xuFOebVV3t2CwK1/tsCrvZP2FbWBt6HeqMwYh08P/suUhhpZnkP73facH1/SDi X-Received: by 2002:a05:6402:5213:b0:564:ae07:e539 with SMTP id s19-20020a056402521300b00564ae07e539mr5875551edd.25.1708540506441; Wed, 21 Feb 2024 10:35:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708540506; cv=pass; d=google.com; s=arc-20160816; b=tbR3UerP2XFVZl6fcbtbMEgESn4dv+PSfyAgos/aajydCtFTdXdGCpKw2WDA86rGBA xvb72bqk1ZPuVDoLooIFe8hZgehQrl9Ly3zIsJXwR12/yjsIl5kQKokYBkfi/4+SgP88 OAfAQUXm93R5voJs5UKImx+FYe366aYGdCKxtMEXUvV5pLLwPeOxIjHzHLCi4vUjcu1o kAuHyoKSZ4gXujJmiM/FwCNJfIEo/uQyg9XG+hBzupuyk0sj9seXVtJnXnxV+0k9xxTF 8dw1Et9Nlcf8qdv2cpNzljS/Mb608jcSA+zcYkQPlxQgwmhTuV5ZGgd+II1qiR19LBWt cfBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=owzQt24YxE/3yAPV16oZJGgx4wfLIfSGBC6MvxD9w5Q=; fh=yrE9O525sLNdIXC06sJBIlRUjYfWNm6imQ0cf3A93gQ=; b=anR0rVPPXyBh1BpzrGHOP44ya+TXHGY9v4dsabl3v83ukgOm1YKo4sMm41LrLZiz3E vAJWdLF2DO74UZaTue5yDwNgA+TV19hKmYLa/FxIK9Ha0RAtjtSZg+G8hM+MeB94C3jm uBsXwDtv892CgU8vnGnPQWcbBuAx30TE8q4QMeosNqC5GKWzpmGBL3EAM+yRoQStgyLk SAWcckyGFD1Pshrn7cka44n3o4imMv/BEvNSUusQNnBHdCb8uUwY4D11txAvAMJtUsoe B1mIeNGDJdoc50LGSQACJknKYoJ9c+LzkfJ077KQVccCKsIgwQbfZ3Rv88yvQfbjlOd0 pXuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Hm8Ta5Av; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-75303-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75303-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y24-20020aa7ccd8000000b00563e2dbd961si4495415edt.172.2024.02.21.10.35.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 10:35:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75303-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Hm8Ta5Av; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-75303-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75303-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 366A11F21B89 for ; Wed, 21 Feb 2024 18:35:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD29E85651; Wed, 21 Feb 2024 18:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Hm8Ta5Av" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 0E3671097B; Wed, 21 Feb 2024 18:34:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708540497; cv=none; b=bpxMIzJAnsRzdkz9w/ItRz15lybubQQvRmajyP3TmyLc7WHBkf1c5eI0fR9gqnBaNsjXgO0NZx6xjEjLBTpy0kO4eyhXmzZEF+S13A+VYuaK+sDIM12rhvb4aDt6Pgv0uKm/UKqLpLcEJHo573jErp7ZDA3HEgbPrUtcAJOxgiU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708540497; c=relaxed/simple; bh=SXh9o6lcdXir6m04bi7g64vXsMqCpE0OVYelVUUwvJE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C7jDY3Oj9gF54nsxZiBCoaacZnhy/bBVqDZWWfa0bD1M89uDrVp81jQctZqYksyyfddRcj/y4o1xFMUwXz59atYLtd5Iu9rQynmVOwoO2g2HKhQjafGOwTa/HKIgkf0auBYZ/NcAg4BnL4JNBTtIt+d7KUq7Sm9184N/xBcYxjU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Hm8Ta5Av; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708540496; x=1740076496; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SXh9o6lcdXir6m04bi7g64vXsMqCpE0OVYelVUUwvJE=; b=Hm8Ta5AvbyPfws3ExSEsD4tx48RydUqtvKZ0z7Qgojt0Rk0bF7Xv869o 6X2ALCdlnJWaBt6n4vP2i4dYlPm20sdlaJjEvkO79RfAscYjJLVxrQxca B868aFyJ7cklN2lo1sAxSJjuDCcj527uZ2t2u1261AVxQMWqDX0IF40jZ EimihVwygUSRteB6f62iUkE0H6n1YDLZodpx2UI/j/2bu7RELfSvBuq0w qa8s3YOdTOLaEfRwnafxEaGpbRW2FBRiRoSv3wKZzZi8MyRxPN4eIbZtc bKAK/Mto/BswmibRUDplkE5W6oV25UA7hCB5mQLQnJS3CJSqnSlIOvgf3 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10991"; a="28164672" X-IronPort-AV: E=Sophos;i="6.06,176,1705392000"; d="scan'208";a="28164672" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2024 10:34:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10991"; a="936684737" X-IronPort-AV: E=Sophos;i="6.06,176,1705392000"; d="scan'208";a="936684737" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 21 Feb 2024 10:34:47 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A7CB11FD; Wed, 21 Feb 2024 20:34:46 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-rpi-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Jiri Slaby , Joel Stanley , Andrew Jeffery , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Al Cooper , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Paul Cercueil , Vladimir Zapolskiy , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu Subject: [rft, PATCH v1 00/14] serial: Add a helper to parse device properties and more Date: Wed, 21 Feb 2024 20:31:16 +0200 Message-ID: <20240221183442.4124354-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit I have noticed that many drivers are using the subset of the common properties and IRQ retrieval code. With the moving it to one place we have got a common parser one for many. Tested on Intel Apollo Lake with DesingWare 8250 UARTs. The rest has been compile tested on x86_64 with clang. Andy Shevchenko (14): serial: core: Move struct uart_port::quirks closer to possible values serial: core: Add UPIO_UNSET constant for unset port type serial: port: Introduce a common helper to read properties serial: 8250_aspeed_vuart: Switch to use uart_read_port_properties() serial: 8250_bcm2835aux: Switch to use uart_read_port_properties() serial: 8250_bcm7271: Switch to use uart_read_port_properties() serial: 8250_dw: Switch to use uart_read_port_properties() serial: 8250_ingenic: Switch to use uart_read_port_properties() serial: 8250_lpc18xx: Switch to use uart_read_port_properties() serial: 8250_of: Switch to use uart_read_port_properties() serial: 8250_omap: Switch to use uart_read_port_properties() serial: 8250_pxa: Switch to use uart_read_port_properties() serial: 8250_tegra: Switch to use uart_read_port_properties() serial: 8250_uniphier: Switch to use uart_read_port_properties() drivers/tty/serial/8250/8250_aspeed_vuart.c | 50 +++----- drivers/tty/serial/8250/8250_bcm2835aux.c | 92 ++++++------- drivers/tty/serial/8250/8250_bcm7271.c | 53 +++----- drivers/tty/serial/8250/8250_dw.c | 67 ++++------ drivers/tty/serial/8250/8250_ingenic.c | 20 +-- drivers/tty/serial/8250/8250_lpc18xx.c | 20 ++- drivers/tty/serial/8250/8250_of.c | 105 ++++----------- drivers/tty/serial/8250/8250_omap.c | 29 ++--- drivers/tty/serial/8250/8250_pxa.c | 22 ++-- drivers/tty/serial/8250/8250_tegra.c | 26 ++-- drivers/tty/serial/8250/8250_uniphier.c | 17 +-- drivers/tty/serial/serial_port.c | 135 ++++++++++++++++++++ include/linux/serial_core.h | 10 +- 13 files changed, 313 insertions(+), 333 deletions(-) -- 2.43.0.rc1.1.gbec44491f096