From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BFE829ACF6 for ; Tue, 12 May 2026 01:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778549751; cv=none; b=JrO1t7y4/Dtltk/dH5DtvfzC3XB7OJHQwY+fgsldJdR023A88h9HqWm5d1rZALjD8EEX2StfMUgzGSum9uoV1KSl8adudNFL3wlHGJ1jYI0caLdkGl3JwFiaKpPJEtY/i/DGyfXSJ2Qu+5JPV5M30nCXpvo3ioRRObKDc2LKv/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778549751; c=relaxed/simple; bh=skbb3Q/KpEBzJJ4+xxmqbXyYsu3zxBB1F90017Iknys=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gxwRsG8Avr4NFx9pte65891U6qH2QdkgAw51TvpFR1ZlJaeWA3sIVIywkg6lBSvb2yiJfmEdTX2DGMtsW5HWRksD0fpJactMjM9Pt3YlM53qekCbUq94Xu0XKM8WjWqyioP9abtgZJUqxp6c/Jv0/IbMnfkTjRdaqc/6C7oZEMU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VSK3QCLi; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=aZn5pdml; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VSK3QCLi"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="aZn5pdml" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778549745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=112UUGSndB0Np08m28dkWfuXBUXp3flZD9ag2HuDsVM=; b=VSK3QCLiyzH7lQJ9IX49hoN1e9TJPeKuTvldbekWcz7GiiJGCv6KIbFPr+ikjwpMQQTrPK yFS6ps+N3H9yrw4Ow2oRNoJ8iYiqnozmRQYeZ24qpim44s1NjFLM90mF2eSpRusvtCmoZh 79kt37wpzGUt6YGSR7fZvbdAUNWPOQc= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-30-yaQaknx0P0u_yaDw15tXIg-1; Mon, 11 May 2026 21:35:41 -0400 X-MC-Unique: yaQaknx0P0u_yaDw15tXIg-1 X-Mimecast-MFC-AGG-ID: yaQaknx0P0u_yaDw15tXIg_1778549741 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-8b3fe2f190bso135969956d6.2 for ; Mon, 11 May 2026 18:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778549741; x=1779154541; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=112UUGSndB0Np08m28dkWfuXBUXp3flZD9ag2HuDsVM=; b=aZn5pdmlFziVvA6r9QT73vRGA3LMYnETmTGReIRYfApgbVb4Nu4OGzWOB8FaoRBnl0 lYlri1OCp5bTDUYuzC4vh17ftWWQ6D9zmiaAIoG6lVyJ+hNvzlZY2M7/wbzOlcXrZ2q9 gPsx7MKoYd9GwsZkVrsepnavPW5dDNTg4HLSfqEIRssE+EEJjstealolgQu1ab7UBDDJ BtDCPPWCmLhMbFQ2mZNHyslHTwL2DhsONDPNgtWqQzNdj8ouViCIAuRQQHiAt5y59fg5 AdBkIK57sm+5ORcvcfyxWnYulj/YxeJ0YSGQy/bshMz2I1WAsGGyrlr85HZ3ORnU/4me 6Y4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778549741; x=1779154541; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=112UUGSndB0Np08m28dkWfuXBUXp3flZD9ag2HuDsVM=; b=SSNCtQa+5b8QIR6u8TYbfgqqADTf8y5qwC3EBNbpWHKHvOIei5sRpxAYHV13FVa7P4 fIT+JcWHQj6zPS6OnkCVXf4TRTwBM8hMj2NjOHpJSL++MxPugHevg8C7MJ+9HgGxTI5h QdzXr18AGTjDbIvQMkOYG4Vg1CheNT7E+VYPznDlW1Zhc6x8hAlVPGBkzoBx4UzoZZJ3 E4AdydaPJZJm7IYlakVjvNqxtheAkb2deKl8R1rdxqRvvATLEu+MjDlpZgp6used4Xcq thbNN9tQP3d7EoIsxTLvmUuIfe4Z15JWmpwvxHStAWJIQvoBzu1bMM5q3+iJEMr8xQnH BW6Q== X-Forwarded-Encrypted: i=1; AFNElJ8oQB4VN/kNqf7E7DK2QM6ldz2ebNzbuBmjVpeS5n68oF+WXi17Ek9NYVH0Kzhwr5GPRwuhSKeU0NeduEM=@vger.kernel.org X-Gm-Message-State: AOJu0YwDfe9rwkN1fKhE79IY9FeB2ZWMY4uVJBVyFkWInwewVyssoZDf FQdB33lPvR4Xp27vzOxSTwdtzeM7pLENLYetwLtdXvQmVnw7QMXkE8f7KBlYFHxt4w22V2XzKDe qabDGPV+IvZywsy/TrVsrQ6rc5G2hdYZv5ye4L9nj8y+vqUXWkGM+yH/jTXUetz2XPw== X-Gm-Gg: Acq92OE/eZg1BJN1dhH6BGvjLGoXFSWZsJwiCCKU2CbSQczPbRoDOjYP031M551Ytb0 HD5AFra0dTJhNAtMWvUACLRFHVVUsXlrVa7MD+cttE/XnyN1oRWAll+ZKRHNBZqWZjjdsJfSF3A ooo2Blp0V99jhuHpqntwU6skoA0FO4wurfVeNG71BSdZaA7JmT67OnmgqmUPzk+SwdxgQtw/bCZ qEpO87Dxb7TJq+10PpbcJp36y5EqfBWj6+J+0rB0JK0tZsap+UwK7t3szHlpIR087kO0bnoEfOK 1ZjXpDO6dfbN+a+0PB3ZJ1qg9ZL7INZq60TjafWesqggo6wZimCtUcSX8F9p2xYMzyruy5EY3fH qefMGeb3XBp+bzk7k85dD6qVMkZNmrNEVDQH59YHZrInsewr9om0EMG5YpNOc2A== X-Received: by 2002:a05:6214:484a:b0:8b7:7594:b37c with SMTP id 6a1803df08f44-8c6619b4bbdmr15253066d6.17.1778549740910; Mon, 11 May 2026 18:35:40 -0700 (PDT) X-Received: by 2002:a05:6214:484a:b0:8b7:7594:b37c with SMTP id 6a1803df08f44-8c6619b4bbdmr15252816d6.17.1778549740505; Mon, 11 May 2026 18:35:40 -0700 (PDT) Received: from [192.168.1.15] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8bf39c7e2e5sm109704006d6.34.2026.05.11.18.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 18:35:39 -0700 (PDT) From: Brian Masney Date: Mon, 11 May 2026 21:35:06 -0400 Subject: [PATCH v3 3/4] docs: clk: include some identifiers to keep documentation up to date Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260511-clk-docs-v3-3-ed67e1065809@redhat.com> References: <20260511-clk-docs-v3-0-ed67e1065809@redhat.com> In-Reply-To: <20260511-clk-docs-v3-0-ed67e1065809@redhat.com> To: Michael Turquette , Stephen Boyd , Maxime Ripard , Jonathan Corbet , Shuah Khan Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Brian Masney X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3303; i=bmasney@redhat.com; s=20250903; h=from:subject:message-id; bh=skbb3Q/KpEBzJJ4+xxmqbXyYsu3zxBB1F90017Iknys=; b=owGbwMvMwCW2/dJd9di6A+2Mp9WSGLKYmp+eStNSy2efyhoat3uV8vy/B+6dM/Zck7c3voclv WtaWs71jlIWBjEuBlkxRZYluUYFEamrbO/d0WSBmcPKBDKEgYtTACYi68rw36eteYq8jJ7a44U5 lUZHezyvHn339Lpq2v0XMy0ETOr+8jIyXLztI5/OPu3B4bYEtcNNTafXqNXzXi7xOhdwNtshjv0 hLwA= X-Developer-Key: i=bmasney@redhat.com; a=openpgp; fpr=A46D32705865AA3DDEDC2904B7D2DD275D7EC087 The clk documentation currently has a separate list of some members of struct clk_core and struct clk_ops. Now that all of these structures have proper kernel docs, let's go ahead and just include them here via the identifiers statement in kerneldoc. While changes are being made here, let's also include the clk flags. Signed-off-by: Brian Masney --- Documentation/driver-api/clk.rst | 58 +++++++++------------------------------- 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/Documentation/driver-api/clk.rst b/Documentation/driver-api/clk.rst index c6aca8186a78..294ead519bbf 100644 --- a/Documentation/driver-api/clk.rst +++ b/Documentation/driver-api/clk.rst @@ -42,21 +42,8 @@ clock interface. Common data structures and api ============================== -Below is the common struct clk_core definition from -drivers/clk/clk.c, modified for brevity:: - - struct clk_core { - const char *name; - const struct clk_ops *ops; - struct clk_hw *hw; - struct module *owner; - struct clk_core *parent; - const char **parent_names; - struct clk_core **parents; - u8 num_parents; - u8 new_parent_index; - ... - }; +.. kernel-doc:: drivers/clk/clk.c + :identifiers: struct clk_core The members above make up the core of the clk tree topology. The clk api itself defines several driver-facing functions which operate on @@ -64,38 +51,17 @@ struct clk. That api is documented in include/linux/clk.h. Platforms and devices utilizing the common struct clk_core use the struct clk_ops pointer in struct clk_core to perform the hardware-specific parts of -the operations defined in clk-provider.h:: +the operations defined in clk-provider.h, and can set one or more +framework-level flags documented below. - struct clk_ops { - int (*prepare)(struct clk_hw *hw); - void (*unprepare)(struct clk_hw *hw); - int (*is_prepared)(struct clk_hw *hw); - void (*unprepare_unused)(struct clk_hw *hw); - int (*enable)(struct clk_hw *hw); - void (*disable)(struct clk_hw *hw); - int (*is_enabled)(struct clk_hw *hw); - void (*disable_unused)(struct clk_hw *hw); - unsigned long (*recalc_rate)(struct clk_hw *hw, - unsigned long parent_rate); - int (*determine_rate)(struct clk_hw *hw, - struct clk_rate_request *req); - int (*set_parent)(struct clk_hw *hw, u8 index); - u8 (*get_parent)(struct clk_hw *hw); - int (*set_rate)(struct clk_hw *hw, - unsigned long rate, - unsigned long parent_rate); - int (*set_rate_and_parent)(struct clk_hw *hw, - unsigned long rate, - unsigned long parent_rate, - u8 index); - unsigned long (*recalc_accuracy)(struct clk_hw *hw, - unsigned long parent_accuracy); - int (*get_phase)(struct clk_hw *hw); - int (*set_phase)(struct clk_hw *hw, int degrees); - void (*init)(struct clk_hw *hw); - void (*debug_init)(struct clk_hw *hw, - struct dentry *dentry); - }; +.. kernel-doc:: include/linux/clk-provider.h + :identifiers: struct clk_ops + +Core flags +========== + +.. kernel-doc:: include/linux/clk-provider.h + :doc: clk framework flags Hardware clk implementations ============================ -- 2.54.0