Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp657752rwl; Thu, 5 Jan 2023 02:42:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXtdmp5Zi1AvyFk7AAsS8phJSjfgcOxnsXnC/Wimm726yEtYYpFJSQDTSfstBtZ15FO/G7OS X-Received: by 2002:a17:90a:2ca2:b0:223:fa53:b368 with SMTP id n31-20020a17090a2ca200b00223fa53b368mr54418661pjd.34.1672915361339; Thu, 05 Jan 2023 02:42:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672915361; cv=none; d=google.com; s=arc-20160816; b=HtF3pDS0xWYORhgmSGMMwnESnvNyYWFx8iqeuARMDPTZnrefHDN0aUCo1kLcCucTAL eUPvEoXIJrDFYc545w3hgwgPXXRBJOIIb7JwflCTl2dvWlLl4dc08jCxWgAyR33yItqu JsNVdh7SgGineCywfVmweSJ3NX4apg9qwD7rQAR32ox5IY7B5A2p90Iu5L1o4xK04hE+ 1fw2J6FhfvNzJebEoyUcdHJXg46jpyGYD67K+ohT8dZqUZXHeUrMXCkhP/ElYIIdLuVR /Y8mf1KFIhWcOLF9Sdk3lf4fCLRo1uw27rt8fiL0rj8XbrP7UiHZBLTtFOv0xSSBEe+z hUCw== 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=UNX6iS3+xoSR8BPs6GU7/Gusoqbb7joxZVTz394KqaFDOHGc2+ZhL/jLIje2j4VOAl eVOKckP9lZHNmq5+saOMa9Td5TLNB6Mwg12LA1DYAWmwJiVrudB+F9ncVCmBdYrTE5t3 i128DwE6TJJdp5piq1KxGhg18B0ZabBBsiECHAHq4UFvLuEaZskArBecrhpQKXPQ5Ejl c+Jw7yG/ocZ4S6OgOkiO3cG+aNG+m9Uu9nBR9n/lZ/OcOixc1uTWGmciXKJcidoZaeK4 xrE121no1eJfLMBwpJu4r+NWNrbMnahLSB4NPgeFOmbhCHyos08CL9uq+n34TEYoxaSt I9KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=V9egSrOF; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=tzeP+Qq7; 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 h19-20020a17090acf1300b00225e6117a20si1563809pju.25.2023.01.05.02.42.34; Thu, 05 Jan 2023 02:42:41 -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=V9egSrOF; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=tzeP+Qq7; 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 S232947AbjAEKiq (ORCPT + 55 others); Thu, 5 Jan 2023 05:38:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233062AbjAEKiS (ORCPT ); Thu, 5 Jan 2023 05:38:18 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 841773D9D3 for ; Thu, 5 Jan 2023 02:38:17 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1672915096; 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=V9egSrOFJEbDO1+JjPphw36K4ufP/XN2d3lp5A8JMAHXg9jcUdL3dbyQp4feXHjXf3k5MK b8+f3ILzJF1dVYm6dCyRtwbPNJkSxI+apJ+oKp+pk3dVYiEuvZA5PgNIb+c4wc/6xNUxwb I5CZ3gDz03F/gjJxWDW8WY4mHk8P8eM8tFNUk7xaAMRyWK7faBap84DbmJant5mvNQvkTj yPNwVHzLL1zfRNk3AiP6ZQEXwbenpIPPscUCYOkG3vAzzRgXa01FZRtgL3ktCSPz9xNiNo mLZv87YHiFbb+WRImmO0dZVcZMGg4Kt4fGIBQfAkIQdm1vXjPK0uZtGCZpsa1Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1672915096; 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=tzeP+Qq74Q1FePBoqTmV4oz8bIVL4B7nq1CqqR/2JbsAQsxDO6zja9DhMzb6V0q8MZ/Ryw h63Q3Le6yJtQXLAg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH printk v4 3/8] console: Document struct console Date: Thu, 5 Jan 2023 11:43:30 +0106 Message-Id: <20230105103735.880956-4-john.ogness@linutronix.de> In-Reply-To: <20230105103735.880956-1-john.ogness@linutronix.de> References: <20230105103735.880956-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