Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5989563rwl; Mon, 9 Jan 2023 02:41:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXsRBZw6Ok1RN/Xm0+jpPExe+z6N9zGTxKS3EeFdn6SwRs2EDfBxMrXmEofaNAgorYfnh8H7 X-Received: by 2002:a17:906:264c:b0:7c1:1b1c:5ecb with SMTP id i12-20020a170906264c00b007c11b1c5ecbmr52660145ejc.7.1673260894814; Mon, 09 Jan 2023 02:41:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673260894; cv=none; d=google.com; s=arc-20160816; b=isfbSFnxpuzrLGY8baP8f8vq83RCRRfvb2lzMVvA58kfOqUrw0KRQL2xh/q8ZfPiMp SFWo292k1dpB10b8ucA+1MUN+ZXb+D3LRhPrLIF/pJYfVjWLoBMKHVACU++PCd3I+Cny 7OidcpMhcYuFqPQGWN7YSLT/IRAe+/OlXjZqfxtk/iGib0i9xSgQ0AeqF9jG3DtEJlqG wwE99P4ADz7qA25Jui+tqZM1skWwskDs/LvbeSS7qu0ONJarf26ZKloJAQ3xpmvHElkD Bf5EmH+CQSG3HjU5FIrW5Y+0HZlB8nvJ6raod+pMz4bqCU5sYmw+L7uI/PemziQyfc0a 4qeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=Z+UJBfU/8l7fpxJzETJJj+Hr/lkYjP0wgmBYzutEocw=; b=oL4Rrzrx88EnteHsq+Uy49/Eu3Rqd2jASa7yZ/O/Vla74qZrRD27cJNbbYI/vb3ArV enP8wjL26yMP026uMYET/dVn/ydJ32dPlO3rOnYd9FZe0ApkVmTSbVhsHgHl2Z8hjh3O PbAV+V+T6sdWHxMq5Rzv5+cQ5PY5/qytpZyFi/LI3J4s6JF5QQQhKh2814uyLT/dZ7HO UnTWzJqHGLYImWWsBPUwQ7X5fFLUz0MuuYeWRveXcHIdXb3v/JazHid1HbyzWRnMM7eB 5albqykwFpWM4eFjNgLjzo04BA3Rrjd7GARegjiVAMlWl87vfVqdIRLLOp4ZQYMFWV/1 Ga4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=o+xsj0DT; dkim=neutral (no key) header.i=@linutronix.de header.b=yEh83H4S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y2-20020a50e602000000b0048bd3a68aa1si8593379edm.171.2023.01.09.02.41.22; Mon, 09 Jan 2023 02:41:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=o+xsj0DT; dkim=neutral (no key) header.i=@linutronix.de header.b=yEh83H4S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233876AbjAIKJk (ORCPT + 54 others); Mon, 9 Jan 2023 05:09:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236862AbjAIKIs (ORCPT ); Mon, 9 Jan 2023 05:08:48 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FC3210B7F for ; Mon, 9 Jan 2023 02:08:46 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673258925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z+UJBfU/8l7fpxJzETJJj+Hr/lkYjP0wgmBYzutEocw=; b=o+xsj0DTLpnugqT9ezmLgLNWgnTCNkkIYxDcBf/DHJnSdw0TmM+P1+bM69x1RHK+N0fiSP gQc//PgyqQWgX+dSbAad/NlcvnNw7JF8lfwvQ//eVwuY2qJLyEiGlcQpOcpnsyd6BgeAsm /oJOn11Z2t5RoVgfzvL921AKPbPVScZXRWrvrBX15YClQlbqWhZ0NVSb3jMeCtcLt2+ClA vAzxezes34pH/f74KXeE7mkEjB8HY80eIQxGrqS4Z9TGIze+lw7zoz0nQvZOJbphhaoAle IvHVkjvM6tWi4CUkOvaK/TfXNkSjsJTZh9CWTVAw/vazsse+u7sXuJjExyU2HA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673258925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z+UJBfU/8l7fpxJzETJJj+Hr/lkYjP0wgmBYzutEocw=; b=yEh83H4SphijnQjwG181Gkplaik4ycqGsuEg2bxBiRVNkLT6PBi+TOsYLWto9F0TmYO3U1 8iaIRJ7+CRup0pDA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH printk v5 3/8] console: Document struct console Date: Mon, 9 Jan 2023 11:13:55 +0106 Message-Id: <20230109100800.1085541-4-john.ogness@linutronix.de> In-Reply-To: <20230109100800.1085541-1-john.ogness@linutronix.de> References: <20230109100800.1085541-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner Add kerneldoc comments to struct console. Signed-off-by: Thomas Gleixner Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- include/linux/console.h | 54 ++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/include/linux/console.h b/include/linux/console.h index ed804dd7c2e8..1e36958aa656 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -164,24 +164,44 @@ enum cons_flags { CON_EXTENDED = BIT(6), }; +/** + * struct console - The console descriptor structure + * @name: The name of the console driver + * @write: Write callback to output messages (Optional) + * @read: Read callback for console input (Optional) + * @device: The underlying TTY device driver (Optional) + * @unblank: Callback to unblank the console (Optional) + * @setup: Callback for initializing the console (Optional) + * @exit: Callback for teardown of the console (Optional) + * @match: Callback for matching a console (Optional) + * @flags: Console flags. See enum cons_flags + * @index: Console index, e.g. port number + * @cflag: TTY control mode flags + * @ispeed: TTY input speed + * @ospeed: TTY output speed + * @seq: Sequence number of the next ringbuffer record to print + * @dropped: Number of unreported dropped ringbuffer records + * @data: Driver private data + * @node: hlist node for the console list + */ struct console { - char name[16]; - void (*write)(struct console *, const char *, unsigned); - int (*read)(struct console *, char *, unsigned); - struct tty_driver *(*device)(struct console *, int *); - void (*unblank)(void); - int (*setup)(struct console *, char *); - int (*exit)(struct console *); - int (*match)(struct console *, char *name, int idx, char *options); - short flags; - short index; - int cflag; - uint ispeed; - uint ospeed; - u64 seq; - unsigned long dropped; - void *data; - struct hlist_node node; + char name[16]; + void (*write)(struct console *co, const char *s, unsigned int count); + int (*read)(struct console *co, char *s, unsigned int count); + struct tty_driver *(*device)(struct console *co, int *index); + void (*unblank)(void); + int (*setup)(struct console *co, char *options); + int (*exit)(struct console *co); + int (*match)(struct console *co, char *name, int idx, char *options); + short flags; + short index; + int cflag; + uint ispeed; + uint ospeed; + u64 seq; + unsigned long dropped; + void *data; + struct hlist_node node; }; #ifdef CONFIG_LOCKDEP -- 2.30.2