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: 13580519 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6682EC54E55 for ; Mon, 4 Mar 2024 12:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mqZ73egeMC5tNYvdAE69IphNLbphTu9lalq3l8kdBYs=; b=YPcSt1rfbnvGJP lus/9P5riIZTUeGEoJAPQqMsn2TH4CLy3CctFs6CV6IIZWKvA/X7bTmR2qUAKjbpGIX6vX3eiuuTG 46DnIp2hpLq8E6FOlJCkQRlbkssRWsLo9jPBxAvhKcHlqWUTJjp+gi2P/py8OFiv7cs3clnkVA2Ma 16lDgeNkgrrvc9UqUiIeI0Uu/8JSeaLnGaYTp8MhltLgZw8G39iCJjZuhHcLg4YDI8mf7D6yCbWNt p2FF3CMUOPrqCUw8KVc7PdzOIIrghf4KEY8BwOSUCsRXtsZ4WOZxCadZmbsUa922l87S0tTTTWXQc EXccb394gVvE8C+l8QNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rh7TB-00000008ytl-1h6D; Mon, 04 Mar 2024 12:31:01 +0000 Received: from mgamail.intel.com ([192.198.163.12]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rh7Sy-00000008ylr-3soC; Mon, 04 Mar 2024 12:30:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709555449; x=1741091449; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IPNtP2dbEC5nwNRrbZdk3a6zN5igpayNS2XgmKDfk4s=; b=Dawh/0O0R923cI5pm+dwU5WaFB1eRZA3AZ4PFfYg7c1E0A6TY5JvHzqd aZHFSP4WSDSeZ9iI/3T5gaOBr4SnY8wNmVFkl6Fi++weC6mHr/30oh8TM aDoDNkqFv7tsF++yyNwZV+/n07S2bNlzbHua5mdU7jMN546fd/miVF+hg 7o7oXEPZciyWx1K6hr6Mvx5wJZGgL0QjU39TO5t2CCiiDH4l1br87555l DMlxkLr6JElc2zeNTCIzGCuTfgqkps+bOhNkuPCPpqyjG8mw8ah3qP9DN qveB9Y7CzviF6rE3wQGesZ9VXQ+hhs9a6o1EnuLbz7GHgyxJUE/0P0iZk A==; X-IronPort-AV: E=McAfee;i="6600,9927,11002"; a="7815059" X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="7815059" 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_043049_019105_F60B2E71 X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 */