Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp6229310rwj; Wed, 21 Dec 2022 12:31:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXtPZ1XUI5jNNh+9qbasiVzutFQ/mbeggTAxfYCTHGuXRZ4rhkhkKt0unNoaj8sI0WhiHOmN X-Received: by 2002:a05:6402:194b:b0:45c:834b:eb44 with SMTP id f11-20020a056402194b00b0045c834beb44mr3334083edz.15.1671654685888; Wed, 21 Dec 2022 12:31:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671654685; cv=none; d=google.com; s=arc-20160816; b=VSFb1tfNEwZPObNG5g/brlqmYcktsEw4JpOJXSSicTNlWiX1guQ36DLgL63IOoykHQ Es6N9F1WtWB3/ZMPCic1p8HgBk2nJ/ATw/9ES3xybuPkpnTKlvZqYurSV6wJRGAD+04p DS7SNuB2dJdMxp0dJwJOayKEoN1HtbKKXu7soG0ieXpSljZaXCOvCRefDxf+6EfsU9LC e/huF6//qHFfL8MEX1aaNyHn6JemQNLW2VDXRoA0T1vXdJoRtPAawVWJB3FOQ3caZ34P 71YszN/P1jHfZAfo4s7xval5N9BWsN0syq64eS1Fa87tl5gO+x7nkMFYkoB34fsmRs2v VU/A== 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=a4Oi2w/TXu3ruBBNQfqB1luqQEdA0homP27jeQWVwRXLG06yHnIgrdTrDi6YShEXx9 L68kR7qxsSoNJEuxJBJfp9hg9LE5nlPjr0WjO4a99RVNBwCzXqhtjtb4o1fmn7PXXrM4 3o/6tSgP4GL6o9+iPKvz0rbV7+jRnGwo8wgmo/mg7gU7c7jXptxSPS9BEe4mARNOSwi/ ea6jq4cb4erJifga8UbVF3VdnnnxzSN+omD0QTJY12UHYhZCRN+RTJorL0a5rYgOerFh NC4LT+mnqFiWx01ZQ7bq22zQ/16IAMDKxeYUXaJ+ankyU+uGYnZvP+RFPCi127jkO7Dv 7lbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=r4PbESKX; dkim=neutral (no key) header.i=@linutronix.de; 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 y10-20020a056402440a00b0046c9a4ab639si16472013eda.548.2022.12.21.12.31.09; Wed, 21 Dec 2022 12:31:25 -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=r4PbESKX; dkim=neutral (no key) header.i=@linutronix.de; 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 S234914AbiLUU2F (ORCPT + 67 others); Wed, 21 Dec 2022 15:28:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234852AbiLUU1s (ORCPT ); Wed, 21 Dec 2022 15:27:48 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABD4B2528D for ; Wed, 21 Dec 2022 12:27:45 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1671654456; 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=r4PbESKXOL3kCggBPqyUPhgRbSc8To8Kef7clkha0yXtBADOKJ4tD7scZbSKGVRBtaoXd4 9iSnQ5azRTbrzoFmgK+Gpl1KSp5MAF4YilrXzOnu1+plFbp9FomLdtXta+WoGhhlIBXtUH MSjANCfhHNIiEskP+/QcZ/tenk4pY/Hm+MUKz4qRmiYehn5EgESjgnHmwgQqgNwNo6z2gp abSKVQv+mN7XIWpnM+KTZtaRXsGk60QI6CaUvNbtL/FzOm2WnYlE5AmlAWTnXS71L70UUO z7VmfdUJpdcYg/Zps09xusOMghL84wlg/6kCrjKjIchVfNojbgztFKAv7TBO2w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1671654456; 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=ZkyOoCL+G6d76XUi8UG/eVSRiG7d37JqkdZbW0drIhSv/9/8dX6I9yJfQG/ybG1q9r4SPF gNhMhrCfU1gIi9DQ== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH printk v3 3/6] console: Document struct console Date: Wed, 21 Dec 2022 21:33:01 +0106 Message-Id: <20221221202704.857925-4-john.ogness@linutronix.de> In-Reply-To: <20221221202704.857925-1-john.ogness@linutronix.de> References: <20221221202704.857925-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