From patchwork Mon Mar 4 12:27:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 209648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1565224dyc; Mon, 4 Mar 2024 09:22:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUMEyQqLamJqHbc2cdWJJD16NBESnx+xu/cp6aWK2hshkmI0gEwl+TOWQDeJqQlnhCaUAOzID2iAEuDJBXzwOOH3fmfnA== X-Google-Smtp-Source: AGHT+IEnW8ihGx3vqNnsZF6dB7OzD3QVryFvMfWhJzotqX3KIJ0mPSGp6h3eNMJ21Ni6ZrMSrdal X-Received: by 2002:a05:6808:b2c:b0:3c1:f5d5:47a1 with SMTP id t12-20020a0568080b2c00b003c1f5d547a1mr1244403oij.21.1709572958083; Mon, 04 Mar 2024 09:22:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709572958; cv=pass; d=google.com; s=arc-20160816; b=ykkBZdPn+uJlBbdBU1KstBfru2/OG+QUxjLALqhhhLgAJ1fUUH9KpvP0axVEZicnnp zoql253oF2cbbwYhNmbWqf3LUp6h2DSNSYutwOsMZUZcIHmdiSYVSrBjDgkwWHBc+1Ue u/lx1OFzlXAG46eZPSEH7qdks2wVuMO872Xh2JnFQF0W6j67fbiQOEM2vSqn7jXxYzei DgjO0JIBwTd3GlKBpjMxoedr7GkukytJUoIlfMkgut3w1P4TUwQZtBBwrIm0T2/peOn5 J9XTVruI0yUlAUKzVgfbB/Xyrj22C1xPhb9opg5uBaS9QcDuXObnsgfDoIwsIfuUQ4y7 U8JQ== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=u1iqrhMUcmW7QU2Cpu2ektjrL9tIR1ItRhI3T0RUlng=; fh=ZfFIga6g1z2FD+c6esSANNfr8Qf2hi+vX5vwtK2q0AM=; b=Wdyfa2RJN4yIoLVaPupk5wGqW1+shnRb5+OAZgAJlaMX1847Jz+2wv4TDoPV4zNjKl pvTU28ReoFgK/y7Os4rOOnG0iXlifoDowpd1v86Aog5CgOJjpQBJkC1Rsv8DOhFlYvIz rOhNcxqIzfJsP+RiOeBlgNYywS8A/niUpEHuMDEkB6hrYTC5bSDJ1BoU5pbcFYnIBkwV 4boiHEXsoDwuDnd9Aa1yc1+v2pqZjpRvEQyg79+PIDIxQbqWvEir0fOhILUxMmD0r2jG F+hwr0BsPqzkzaxphPtGKbbBQHGqnJdY6ipvT7veCOfqA7Y4B3RfoyRk26w0NdnMcoHn ELkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NkJl1K4k; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-90568-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90568-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k129-20020a636f87000000b005d8b8c6f94csi8549910pgc.565.2024.03.04.09.22.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 09:22:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90568-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NkJl1K4k; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-90568-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90568-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2C4632877F0 for ; Mon, 4 Mar 2024 12:31:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86FC43EA83; Mon, 4 Mar 2024 12:30:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NkJl1K4k" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 5FCBC3D540; Mon, 4 Mar 2024 12:30:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709555449; cv=none; b=I+KHiLu7WODymBUyLo2a7PazSY1045lZMOW2+J5+7qT3ZKf7t88wwUWEmxDvqUKXsxkZAJmcr2M6RexD6kR/V+uAwwvmT4h4t4QStCxOe9LZz+UdLHAIMAyhOQ1ksm220MCso7sFN442BBMZF3+x/KAJ2WJgxWB6PKrxbOW+MQ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709555449; c=relaxed/simple; bh=IPNtP2dbEC5nwNRrbZdk3a6zN5igpayNS2XgmKDfk4s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GnKt0FjDHFNKBdpgBh3O8XV/f8oYWfyV77C6tqsUaDn438xqGeiRGq84AIJqZiVbBjBnhHls+h71WXP5/sxBfqwLLlzM1JeByHHVaGePDjWdlx4jNGBft/xnX2dV+RgZyDkmqED2S+vgPNpilPc42+sNFgk6EQJyF8Kxim9K4cw= 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=NkJl1K4k; arc=none smtp.client-ip=192.198.163.12 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=1709555448; x=1741091448; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IPNtP2dbEC5nwNRrbZdk3a6zN5igpayNS2XgmKDfk4s=; b=NkJl1K4k4UbsoNWOo51ytyhNAOYYqIyEH6svC4PfNMD4r0wkCJ5HMenP GxQGTtmeniF8SfZmD8Z1QL/RmpHdPcogsKHpNjPgGiM5V6FZ5gRbunMsb IDBvke36KnNStK7agNKa01cJd19BVVdxIsX/J13c3Qs8txGh8NkC+HoW0 uatIUOdwoQ27xo9pFkMM245gCI/3GwvbGAbEisIlmYIW1SZwiOU6ONzEN cLuVhw9C53zYx5ASKYkH9RHotXq58pP4GvFcXEaA4t+trUHoTNfYkUNm8 gokmOBK3JeuRt26W4pqhTse1NhCtbyS6GtznylzNzPab3ScCKnPaJId2+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,11002"; a="7815060" X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="7815060" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 04:30:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11002"; a="937040422" X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="937040422" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 04 Mar 2024 04:30:38 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4975231F; Mon, 4 Mar 2024 14:30:37 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Florian Fainelli , 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 , Broadcom internal kernel review list , Ray Jui , Scott Branden , Al Cooper , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Paul Cercueil , Vladimir Zapolskiy , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu Subject: [PATCH v3 02/14] serial: core: Add UPIO_UNKNOWN constant for unknown port type Date: Mon, 4 Mar 2024 14:27:03 +0200 Message-ID: <20240304123035.758700-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240304123035.758700-1-andriy.shevchenko@linux.intel.com> References: <20240304123035.758700-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792617173897503699 X-GMAIL-MSGID: 1792617173897503699 In some APIs we would like to assign the special value to iotype and compare against it in another places. Introduce UPIO_UNKNOWN for this purpose. Note, we can't use 0, because it's a valid value for IO port access. Signed-off-by: Andy Shevchenko --- include/linux/serial_core.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 2d2ec99eca93..c2cf9484014c 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -470,6 +470,7 @@ struct uart_port { unsigned char iotype; /* io access style */ +#define UPIO_UNKNOWN ((unsigned char)~0U) /* UCHAR_MAX */ #define UPIO_PORT (SERIAL_IO_PORT) /* 8b I/O port access */ #define UPIO_HUB6 (SERIAL_IO_HUB6) /* Hub6 ISA card */ #define UPIO_MEM (SERIAL_IO_MEM) /* driver-specific */