From patchwork Mon Jan 9 10:07:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 40776 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2071652wrt; Mon, 9 Jan 2023 02:12:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXuUJR3XOyEC2DjJRSXtJ1t7X9DFYU5Z9iqdPMKs54/Rk6muS61qWAR6SqfoHQrDbKcYItib X-Received: by 2002:aa7:d689:0:b0:46c:3f90:f5d9 with SMTP id d9-20020aa7d689000000b0046c3f90f5d9mr54712241edr.5.1673259168878; Mon, 09 Jan 2023 02:12:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673259168; cv=none; d=google.com; s=arc-20160816; b=ls092yk91SdTrXvzuyjVJlaIb/oB9VI/PDG1GHMIeTom9Yu4b9Ov87kXKUEjoB4WoJ cjzRBmuz6pkQ57Pe4Q77Ob75rah+D88umCWnV1mFKg/G+rxut3oVOFj2tbS06xrXl/0s FWuAOwmtc3OvQfM8EBb87pRhZkxCi7sphFPQUW+6gUy71GwDYmAhxQlxDNc8XE2AKysq CjQHA0kup/8cF0F6tz2Uz6JG0yIFy58JhqwUgkLS5COEPyOXvmARsOdh0X2isfocQ+9Y AiNdVRL2szBC5kWGOX4lg33P7C7/eXtTet2WKlasuDyxF7237WdsZnvoHIcfTnfbKnTM WImg== 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; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc19-20020a1709078a1300b007ce3aef9498si9402969ejc.628.2023.01.09.02.12.25; Mon, 09 Jan 2023 02:12:48 -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; 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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754539406229611496?= X-GMAIL-MSGID: =?utf-8?q?1754539406229611496?= 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