From patchwork Mon Feb 26 14:19:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 206825 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2224868dyb; Mon, 26 Feb 2024 09:31:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVv2Dpo7lj1onbSuNCSiMz0W3xVsOTuhSFHzYCSkpcwMz2itueGCGgP9j0ZinuXZhIQN4SP30PZQbWNxBOcr/T9Yycl7Q== X-Google-Smtp-Source: AGHT+IFsAWZsO/wkVi8dIwfdExHMKSYntFTt5LiWZ2YJiVUzogWGTPOpmTulP0TcWaC/o7kIU7Mz X-Received: by 2002:a05:6402:1643:b0:565:cf:2566 with SMTP id s3-20020a056402164300b0056500cf2566mr6724109edx.12.1708968693029; Mon, 26 Feb 2024 09:31:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708968693; cv=pass; d=google.com; s=arc-20160816; b=omlhItR4RKU0bJ77H9HJRf0zdc/nJS9aHr+l9s45D/N5wehAo/b7J3j1yynwirT4Mo 36gO2ioJn2H09ksEWjWH1nSn4Wgrkp+zFwSm/DIP67nQAyNEERcSof2rMH/tIPvsZEYK RKgF36Lhvl1pDHatd6jbQNOQOjo2fTZLItV1SJRJHnYnl55BOP0hPCod6Lgb9jv59X4x uaoEbGzfvuZ0OLlB0Czt+H10jokE5SbOo2V8yOYJO0Ey78vVKpAmUzugboa050oG/GyG F88mLhisBTs8FQJUPp4QNdqFwceKPtrPvAfsRVrWMX6aby4auI0uhps+VB+8SZ+cGPHX 9mPw== 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=x+GyWh+d0fSlsBO19rBAGT/zXvddHk2lhaP+wXtmjdg=; b=AChFnKbNFK1LbNOie3Hglv6nBsuPz+m/Uta1Zd1FVUyvkXdL6MLwrS43PjvVtQ65c3 6SdyTJpIIxHDw9eNEQ7Wp9b9VfchOSBXEU/YYUE83yd6EsKQTbEdtZ4jPyKTpSukBuzH hu+nEsFPgqH3iDxLqG7Wxyt5GQKLgx5u7U6WNBdjDeOCoq41JGPO8HgLVTJv1dQaDUUx RBKbwCfiKeW3tGb3AfcYsA/4wpRt3ctXThroTgyl+QDjgth0VndVmiCRd65miXDKd+Ul 8tzCCapO6r5rI7RqUhDXu/62RnWiRXe1gCNiR9v1Y0C4l9qZVrk46/kuK4r05o0RCf+y ZV2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="arD/tviI"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-81605-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81605-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 21-20020a508e15000000b00565c4d0b178si1731129edw.649.2024.02.26.09.31.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:31:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81605-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="arD/tviI"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-81605-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81605-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 am.mirrors.kernel.org (Postfix) with ESMTPS id F06721F2319D for ; Mon, 26 Feb 2024 14:26:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B59A12BF1A; Mon, 26 Feb 2024 14:25:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="arD/tviI" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 5D155129A81; Mon, 26 Feb 2024 14:25:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708957527; cv=none; b=oGn5opE2C+0wB/7NLebimdLaWfrRI841lPaxFKpwSGtSLh5/BB/PZseD8Xqv9q6u+tUjYMZqgcZC6C0We4hwYMxCuoITaynaDbyUfMy57Fl3jUsdUcB2CWWi7MkBT8tzd4QpH01xAk0OWXeWf7teNXdhzNbW33GYPeD7yIyoBgc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708957527; c=relaxed/simple; bh=IPNtP2dbEC5nwNRrbZdk3a6zN5igpayNS2XgmKDfk4s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jWGURrZD9pumCm/BWQyX0YutrbNquDXR7fN0vf30glqV6FhbIkIKHnh2A4W08VrsLwKKlrS3/KmiziJKqTuQ9B6Ns9SFlsxTYgTcG5cbd/uz9u+5xFOGSX1XzakdU+T5ukFjBf1NF1qBjVDf/IQOk/Bj0/JnWQoP3uuvyHL1NmM= 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=arD/tviI; arc=none smtp.client-ip=198.175.65.16 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=1708957527; x=1740493527; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IPNtP2dbEC5nwNRrbZdk3a6zN5igpayNS2XgmKDfk4s=; b=arD/tviIRB4TGhRpSJE37TCr5fzbISB4zt6QnbhqisFEK0c5YYjG++8L 8txACz9DgI5ZvAF3im7WEkWM8doVY3/qB/9yfbWHlskH6sSg8j7YA133Z C8o2t9VIMvAHgEPOQkkwU2SJTWw6lWteVE/t0uqEY7A4CS7mBUGOcDowo qu0f97VCgiE3qrlhOdelCYmuqq2V7nnyUE0TsrmIHN0PlklZVk+h4OvSJ Gd0gxhe/mIe/RxKNtwdj6OF2fZOHChhapElstdsC4A2WE96Zl1VsdGwaQ ES00A1fT7zElNR8Lf2mTwMLPvdw0GQ/IhZlOLDiNzb4yZhVd8c3tep27H A==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="3375106" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="3375106" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 06:25:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="937030138" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="937030138" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 26 Feb 2024 06:25:17 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 18FCD426; Mon, 26 Feb 2024 16:25:16 +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 , 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 v2 02/14] serial: core: Add UPIO_UNKNOWN constant for unknown port type Date: Mon, 26 Feb 2024 16:19:18 +0200 Message-ID: <20240226142514.1485246-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240226142514.1485246-1-andriy.shevchenko@linux.intel.com> References: <20240226142514.1485246-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: 1791983556021945775 X-GMAIL-MSGID: 1791983556021945775 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 */