From patchwork Mon Dec 21 12:30:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1419012 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CzzNP5B6Rz9sVk for ; Mon, 21 Dec 2020 23:31:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C0C1A8292E; Mon, 21 Dec 2020 13:30:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 20D14828E0; Mon, 21 Dec 2020 13:30:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2ED0682829 for ; Mon, 21 Dec 2020 13:30:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=andriy.shevchenko@linux.intel.com IronPort-SDR: oX2X744xFcIGJzgFmdsvfOUNNdxoz584Ya0P/sd00rn687m2w6stA8JlM3cyRFIbailgd1DPTp /PSsu54bMfKQ== X-IronPort-AV: E=McAfee;i="6000,8403,9841"; a="163441213" X-IronPort-AV: E=Sophos;i="5.78,436,1599548400"; d="scan'208";a="163441213" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2020 04:30:12 -0800 IronPort-SDR: IbJbdXzpneQdxvv6RO+DFDjrn05HewE645GFTNxd0Y+YZ7oFc3FQuVTX2+BQ2VDAe4ABupm3WF ZykxHFptAczA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,436,1599548400"; d="scan'208";a="344759886" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 21 Dec 2020 04:30:10 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id B86AD17E; Mon, 21 Dec 2020 14:30:09 +0200 (EET) From: Andy Shevchenko To: Tom Rini , U-Boot Mailing List Cc: Andy Shevchenko , Simon Glass Subject: [PATCH v3 5/9] console: Provide a documentation for console_search_dev() Date: Mon, 21 Dec 2020 14:30:04 +0200 Message-Id: <20201221123008.9930-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221123008.9930-1-andriy.shevchenko@linux.intel.com> References: <20201221123008.9930-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Provide a documentation for console_search_dev(). Suggested-by: Simon Glass Signed-off-by: Andy Shevchenko --- v3: new patch include/console.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/console.h b/include/console.h index bb186e7be04d..7e628c0cf836 100644 --- a/include/console.h +++ b/include/console.h @@ -25,6 +25,16 @@ void clear_ctrlc(void); /* clear the Control-C condition */ int disable_ctrlc(int); /* 1 to disable, 0 to enable Control-C detect */ int confirm_yesno(void); /* 1 if input is "y", "Y", "yes" or "YES" */ +/** + * console_search_dev() - search for stdio device with given flags and name + * @flags: device flags as per input/output/system + * @name: device name + * + * Iterates over registered STDIO devices and match them with given @flags + * and @name. + * + * @return pointer to the &struct stdio_dev if found, or NULL otherwise + */ struct stdio_dev *console_search_dev(int flags, const char *name); #ifdef CONFIG_CONSOLE_RECORD