From nobody Fri Jun 12 23:47:59 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 EB87727BF79 for ; Tue, 12 May 2026 01:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778549743; cv=none; b=LQUdUTMbTzEt6CuwOc/w1w4++N2OqGWoJTFMeQ5HiWxUKE7y2rKsRs/0/Jk18hPnSV4pj3TJrxlPeT+oJyvHQ8tszZLSau+3Dg3v7Pzm2Vysaely8MCqqlyR6VtHmQwAB/Y6gCNirlqw3FRDmD4AfPPziEZABBqv7ksWm/jh/qo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778549743; c=relaxed/simple; bh=JcS0PBiexjUmxANNsma/LGKNMCI48CNd8j71XULK4UQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kabuKYCBaIY9hzxyT7m4JCgksueeaf/J5hdt3rbLyOyfLL3E3a5Jcry5sPqTaq/2DPH0W2wM5tTaFRHRxqk7dQcQloqZw26LbhpGfMH7dfbmvgZ5rOb9DozhgWa+N4NQFrVDnNQ32ed4GSInuG3t7aIBfqeW3upjXVgSB4BhJmQ= 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=I9+kn49/; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=eJkjWyYz; arc=none smtp.client-ip=170.10.129.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="I9+kn49/"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="eJkjWyYz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778549740; 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=oV/kQDo/wRMnIi8Dylb19q8LjihJ2zEmf7whdFoofyU=; b=I9+kn49/80/UJq9eaPDFn9FDiUTULAAvKOu2jaHIG2T/kjGfT9+wWJfTxp4kwNeJ2ULzoK 8uqRj8xkFjjk/HkP1xIZjB0ztq0OePcxuroQWHHd2BMFmAbSTp+gbHG4D1j4NiFWHQtYFc 8Fm6boi7OcJX50JQOTceJPSay9yO13o= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-633-WcuTtqe7Nqiruby7NKeUFQ-1; Mon, 11 May 2026 21:35:39 -0400 X-MC-Unique: WcuTtqe7Nqiruby7NKeUFQ-1 X-Mimecast-MFC-AGG-ID: WcuTtqe7Nqiruby7NKeUFQ_1778549738 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-50faf575af4so115506881cf.0 for ; Mon, 11 May 2026 18:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778549738; x=1779154538; 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=oV/kQDo/wRMnIi8Dylb19q8LjihJ2zEmf7whdFoofyU=; b=eJkjWyYzWU03gOzdlya56VnA5vsoeJvfsYPaL9GNi7eY98z6jmjtVCZC1V6n3egKiR PARQyAAYdiOvevMkv6cRpl4jSFaITt+4ZbsDYHp8OfF2kBoleSHr28QxD7mcAq/oCuXH HP/QA4Y7yNcFQaQOg2KBe/aSrkEIhRGOGLqxYXXqC58W2828ddmZvtsLOYcb5O99+qVM uq7J7geTFjmodBnqAlytnu0aXUTbiiGN5QC3cdQJMsu57ZvJbvvLNnQinspasqIb9LkV CRsozwBorweoEhGcRNzBXvETJPfXh1Ky3wFY8Rqo02AL6sZhJhq0jQPMqiw3AJjL77MT iaCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778549738; x=1779154538; 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=oV/kQDo/wRMnIi8Dylb19q8LjihJ2zEmf7whdFoofyU=; b=SDXbAKEUN8GOSD7SKKx+rggSI/+gawSJ2C6i5vz7GGWX6eDge0Fj7EhsH0yKN+6y/m +ji8CJ1UYipx6qex2+ZVCu7szgWF5T6l79iWPTGZ0sdKooV3H2+/PP+XdK8tuxlzJfxY mC4BZlGZENoiVzRpmqzAku1+W7bRHcKdijOMjwMWlykHPvC7oZmbBS/2LeVz/ouoar83 KvmBWvBMHAub/IAQ7kGb/3INBkEiQTEc7HM/BIf3BB8DMo8D6rE38bOMF9bAqFIjVSeQ 7tlazv2AvI+oUlbUexOWzMWN5YTQt6lstZy11DQBsS/CVBClTey9Z/NBwYPRWuzWR0+W iIoA== X-Forwarded-Encrypted: i=1; AFNElJ/FGayMeZdkYAgFREIk7R1FJlsux97N5CI9Afr+wHUbGqmpUzVhzbQb1mlHPDJMVOh5EISkXC07HxW0Ju4=@vger.kernel.org X-Gm-Message-State: AOJu0YzEhesEDSzoVAULvVikhmPX2l7+HR9ySo6QbFMrdacsgg52d3Ko M+A6C3L5R7LZkXkWJNr3qoCF6iYuOBsTHLAHH2QCqhu40V61xVsje6qBCIlhI5A/QjtbWNj5BtV LzHg3iH4giO9dBCTS5vdXFmb1Pyw5NtV21+mCzOO1V32cmL4MbkhjZFLSDgpihLxUKw== X-Gm-Gg: Acq92OHXWGRSa0XKqnplwP5jBHmqd7/jiLdMjuI7CFAMLestOsyJWjK/McjDZWw4Xer uzY8X5wY8RApZaxZ7UtjH6ZQXeyxTwJ7i7qm8cWaXDJgmZvirpCEw+YFtEsBgl08PRgk7e90Kix Z3kfk86v49h2bk9qfUe9E/Zdm87t3y8uTgaf6mI1ZRxCXEHc3e7NsRx1rkvLmIWF6VefBeCVriv RZEd3nxqvc9452GQZ6L+FXI3v68lVJEIwR9cnPCRyMRnexuqfid9QqnEdjGDI/G5fHH8SiCzjAD LaRDe2ksDid3wZxPEbceLNvXsZ9AZxYyPuU/g8dvTbvhNtFgNTlLzhoYIRB4cV6m+0zHL+na8jt 4WP0mrp+a4g6P0chDRr70kTItuobJbLkkQE/8vXdXk7r3ismTjMY+5ML5zy00vA== X-Received: by 2002:a05:622a:24e:b0:50d:a8f5:d51f with SMTP id d75a77b69052e-514a0b6f2c1mr166887951cf.45.1778549738308; Mon, 11 May 2026 18:35:38 -0700 (PDT) X-Received: by 2002:a05:622a:24e:b0:50d:a8f5:d51f with SMTP id d75a77b69052e-514a0b6f2c1mr166887761cf.45.1778549737851; Mon, 11 May 2026 18:35:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 18:35:37 -0700 (PDT) From: Brian Masney Date: Mon, 11 May 2026 21:35:04 -0400 Subject: [PATCH v3 1/4] clk: add kernel docs for the core flags 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: quoted-printable Message-Id: <20260511-clk-docs-v3-1-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=3542; i=bmasney@redhat.com; s=20250903; h=from:subject:message-id; bh=JcS0PBiexjUmxANNsma/LGKNMCI48CNd8j71XULK4UQ=; b=owGbwMvMwCW2/dJd9di6A+2Mp9WSGLKYmh+zd52Rc1gdL8btY34lkOWp7Lame5LJvjvjppstz VbvN4/sKGVhEONikBVTZFmSa1QQkbrK9t4dTRaYOaxMIEMYuDgFYCKNfIwMb96KrAw7ENk9Ye/y sOyHBTYTf7nKPXXzUmjcYv7V7mf6C4b/qR/iXbUNN7VdrQm+9nFf4jPH11d/PjbzLVKp+bGR6yI PMwA= X-Developer-Key: i=bmasney@redhat.com; a=openpgp; fpr=A46D32705865AA3DDEDC2904B7D2DD275D7EC087 Let's add a DOC section for the clk core flags, and move the documentation for each flag into the doc header so that it can be easily referenced in the generated kernel documentation. Note: The comment about "Please update clk_flags..." is included as a separate comment so it doesn't show up in the generated documents. Signed-off-by: Brian Masney Reviewed-by: Maxime Ripard --- include/linux/clk-provider.h | 46 ++++++++++++++++++++++++++++------------= ---- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index b01a38fef8cf..151ebdc20a29 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -9,28 +9,40 @@ #include #include =20 -/* - * flags used across common struct clk. these flags should only affect the - * top-level framework. custom flags for dealing with hardware specifics - * belong in struct clk_foo +/** + * DOC: clk framework flags * - * Please update clk_flags[] in drivers/clk/clk.c when making changes here! + * Flags used across common struct clk. These flags should only affect the + * top-level framework. Custom flags for dealing with hardware specifics + * belong in struct clk_foo. + * + * * CLK_SET_RATE_GATE - must be gated across rate change + * * CLK_SET_PARENT_GATE - must be gated across re-parent + * * CLK_SET_RATE_PARENT - propagate rate change up one level + * * CLK_IGNORE_UNUSED - do not gate even if unused + * * CLK_GET_RATE_NOCACHE - do not use the cached clk rate + * * CLK_SET_RATE_NO_REPARENT - don't re-parent on rate change + * * CLK_GET_ACCURACY_NOCACHE - do not use the cached clk accuracy + * * CLK_RECALC_NEW_RATES - recalc rates after notifications + * * CLK_SET_RATE_UNGATE - clock needs to run to set rate + * * CLK_IS_CRITICAL - do not gate, ever + * * CLK_OPS_PARENT_ENABLE - parents need enable during gate/ungate, set r= ate and re-parent + * * CLK_DUTY_CYCLE_PARENT - duty cycle call may be forwarded to the paren= t clock */ -#define CLK_SET_RATE_GATE BIT(0) /* must be gated across rate change */ -#define CLK_SET_PARENT_GATE BIT(1) /* must be gated across re-parent */ -#define CLK_SET_RATE_PARENT BIT(2) /* propagate rate change up one level */ -#define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ +/* Please update clk_flags[] in drivers/clk/clk.c when making changes here= ! */ +#define CLK_SET_RATE_GATE BIT(0) +#define CLK_SET_PARENT_GATE BIT(1) +#define CLK_SET_RATE_PARENT BIT(2) +#define CLK_IGNORE_UNUSED BIT(3) /* unused */ /* unused */ -#define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */ -#define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate change = */ -#define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accur= acy */ -#define CLK_RECALC_NEW_RATES BIT(9) /* recalc rates after notifications */ -#define CLK_SET_RATE_UNGATE BIT(10) /* clock needs to run to set rate */ -#define CLK_IS_CRITICAL BIT(11) /* do not gate, ever */ -/* parents need enable during gate/ungate, set rate and re-parent */ +#define CLK_GET_RATE_NOCACHE BIT(6) +#define CLK_SET_RATE_NO_REPARENT BIT(7) +#define CLK_GET_ACCURACY_NOCACHE BIT(8) +#define CLK_RECALC_NEW_RATES BIT(9) +#define CLK_SET_RATE_UNGATE BIT(10) +#define CLK_IS_CRITICAL BIT(11) #define CLK_OPS_PARENT_ENABLE BIT(12) -/* duty cycle call may be forwarded to the parent clock */ #define CLK_DUTY_CYCLE_PARENT BIT(13) =20 struct clk; --=20 2.54.0 From nobody Fri Jun 12 23:47:59 2026 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 738E328F948 for ; Tue, 12 May 2026 01:35:42 +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=1778549744; cv=none; b=EHP0Mplq2WdP+W4Sqy+hlD6A57ItkQD1IRPgZRA9xfu01U272ONu2ThjuLObH9XLAATFaSc7hG6cCuzIA0IquG0dg6QPgMnf+ffcPqu7JQh7Jktuk4KXrT5SjIiSDN6oSAeuC4ERR58UXAve+n1YaSielYiNypLQbEuACOhYjg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778549744; c=relaxed/simple; bh=jTrBLk1qWkVHCmc3+UYIHvnHjmNTUClNGQ3B8tv7dsc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bI3nZi15AgLCpCuOIHLzIOxdN4P4e1m5xmp88cw3hTkKK/z+cd/O3BeUsEdP+6bEqBihQDee7cYKmwBKS9SAYRFDJOz0QuiuNbnLesCInTir373JIWgSUScfLpFpuJ7xbcH3WJwjbpXni+rcb5bQYAmnnC56luxZWRM+qLTjr7w= 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=FSB0hSLj; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=oTKP5UEg; 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="FSB0hSLj"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="oTKP5UEg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778549741; 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=HmY3+GxwfazDrDrdiT8VzZ8cqwFuEeiFZpdTxM7euIo=; b=FSB0hSLj4nCz+2bD7suPTq9LMoe7VkpJ2/5bIga6+uuGchdxT+j+G/7xu2xc+loweV7tOM NMbjHB++w1QtaOpowwb9qKelH1UL9218dhhOsvfyHxnbRQw7/tht/I9FDerbDBadaFLVUO FT4vR9U1W3UGO85C3A3bVt0EErMpVo0= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-308-GpurRqKVOwe4Dol2mA5sWg-1; Mon, 11 May 2026 21:35:40 -0400 X-MC-Unique: GpurRqKVOwe4Dol2mA5sWg-1 X-Mimecast-MFC-AGG-ID: GpurRqKVOwe4Dol2mA5sWg_1778549740 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-8c3bdb60dadso16754676d6.1 for ; Mon, 11 May 2026 18:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778549740; x=1779154540; 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=HmY3+GxwfazDrDrdiT8VzZ8cqwFuEeiFZpdTxM7euIo=; b=oTKP5UEgfTpApU6HSSyPIg68D746s9w5dJ4R68bmvP2o9JfMvwTcbjKtyJHmm+OkMK 5oJQl2iG/3hBekv0ziyqBZNKtGZnWr0iwgRuelal+q4h3Sb6VcPxbd/itFbCaqaQHA4t 9fwaN+I0p/l5z04lbT3kG16vUl3rckDER/SVXZ6LOHzM8koUNLeYhngTAnDqH6jlQnuw +Rpu2JX2JmMM2N0lAz756YW8raeodXdUG+1ex+GO0NvCgcPdnqt4F7W14zF7FyDJmvmW EaimJcNLt2s+SPEkBDcv7s1QCLQjHNusX7iUxPeVhR7v5KbttiMJ6TXBRBCrPQ5eG3wl g89w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778549740; x=1779154540; 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=HmY3+GxwfazDrDrdiT8VzZ8cqwFuEeiFZpdTxM7euIo=; b=F2r4xmBwkWDIEKaxMFm5bKQ6I6vBgwXGz+3Rnd4OS+/jr5ZNqDoPhmx+4tC1i7nkm0 QvMlJrCS44epc9Nk/G6u1xluTzemPGa7xwzrf5rE1BxxUTlZKSa6ntsFSH5GAIdY/I4b P2CYusSCgE2WksS75xmqvP0rFUKrf/dB7axCt5kMIz0AxyYmQKs3qF+yd4AhcnPk9bxS x6653Vz5dcU/cW/tXS4ffLRZqcN3p4mSUUUgkwxvwgCStHGM5VGd2XiO9fu0gh7C1rqd HQnwII1Z3dbI3kPBr5uSEWq73mpHp3x63NGt136O4DeljRtnS6Uz9zXjFUZfpZWWI3Nh BAgg== X-Forwarded-Encrypted: i=1; AFNElJ+Ho6tzUm+gXGZrh24BMIO4vxcYRwEXJsB5U11eHxm1sBp3XUSp6pvgOx4/SwwbfywXpIdG3ffO1w4r5DI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy1th8X8qXJaFDmqKIUxPZFQR0PgjKN/Vvdql+dFWXatxfzcg0X POHKXY2WvvIIzelTgzDtQSnMhLOUHnExSbaIo7flCAqnG2zbcNX4zqjfT/3NpeEesonzNz3F90N ENX1/tVF+vkbpHgU2LvMSv9WvRg5Mi2ijHzjkk8frX2222NJpNyVL1KwcNTdeQM9xJw== X-Gm-Gg: Acq92OE3ENiu1HtM8wG5MstP3BhXaYXm1nilK+CYwr2VRG3ANnA7V1k0agPXaLzj3jX FGqTS3nLZfQ22aCOjrG9Ryiwf5tsiv6RBMNorAyvfTtQtY5LERr/Bq/000tyHw9/ZfwHapAE2QU dUBVDYb3lWkBlCXTRonGsEjWXc78K2IBj6lgnK0NxrziMQ1/NXdPanQ9iYLF4AY9Vliq6LGyrcA YXas9bdYMydjTToSNQuOWeybDvmQKdkB/WeF+0xRvN+2pDAazEi/P7UflptzBqov0BTJ6s5uwMG 8TrivxJPaAQLtmMhBfzu+SND4kVlsh3jzr2K+RWP5G7tDhkDFSfzbTq3Z2KyFXzOy05WYbXdGnn KRIvTA/357atY7AESCQPfdjEqZ5hGEk203M/RSZ/YWK7LnPOoufMGLGspQowY5w== X-Received: by 2002:a05:6214:2aa8:b0:8bb:2e70:7a2c with SMTP id 6a1803df08f44-8bc43146784mr416115446d6.13.1778549739646; Mon, 11 May 2026 18:35:39 -0700 (PDT) X-Received: by 2002:a05:6214:2aa8:b0:8bb:2e70:7a2c with SMTP id 6a1803df08f44-8bc43146784mr416115016d6.13.1778549739162; Mon, 11 May 2026 18:35:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 18:35:38 -0700 (PDT) From: Brian Masney Date: Mon, 11 May 2026 21:35:05 -0400 Subject: [PATCH v3 2/4] clk: add kernel docs for struct clk_core 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: quoted-printable Message-Id: <20260511-clk-docs-v3-2-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=3804; i=bmasney@redhat.com; s=20250903; h=from:subject:message-id; bh=jTrBLk1qWkVHCmc3+UYIHvnHjmNTUClNGQ3B8tv7dsc=; b=owGbwMvMwCW2/dJd9di6A+2Mp9WSGLKYmp9e0buTk6rMK/Js7rLjrpeLpoZkVbp9MJtf3lUhH 7vpAnN8RykLgxgXg6yYIsuSXKOCiNRVtvfuaLLAzGFlAhnCwMUpABNhlmf4HzHNcqfo5kk3Tfv+ pSqduyK70e5/Ap/3smghOefbs3V8OBgZThxc8511zQz3vu0SUVv35uV6qk2Zq+m4MyXBqWBDdkc 0IwA= X-Developer-Key: i=bmasney@redhat.com; a=openpgp; fpr=A46D32705865AA3DDEDC2904B7D2DD275D7EC087 Document all of the members of struct clk_core. Signed-off-by: Brian Masney Acked-by: Randy Dunlap Reviewed-by: Maxime Ripard Tested-by: Randy Dunlap --- drivers/clk/clk.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 048adfa86a5d..0b519d95bbcb 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -63,6 +63,57 @@ struct clk_parent_map { int index; }; =20 +/** + * struct clk_core - The internal state of a clk in the clk tree. + * @name: Unique name of the clk for identification. + * @ops: Pointer to hardware-specific operations for this cl= k. + * @hw: Pointer for traversing from a struct clk to its + * corresponding hardware-specific structure. + * @owner: Kernel module owning this clk (for reference counti= ng). + * @dev: Device associated with this clk (optional) + * @rpm_node: Node for runtime power management list management. + * @of_node: Device tree node associated with this clk (if appli= cable) + * @parent: Pointer to the current parent in the clock tree. + * @parents: Array of possible parents (for muxes/selectable par= ents). + * @num_parents: Number of possible parents. + * @new_parent_index: Index of the new parent during parent change operat= ions. + * @rate: Current cached clock rate (Hz). + * @req_rate: The last rate requested by a call to clk_set_rate()= . It's + * initialized to clk_core->rate. It's also updated to + * clk_core->rate every time the clock is reparented, = and + * when we're doing the orphan -> !orphan transition. + * @new_rate: New rate to be set during a rate change operation. + * @new_parent: Pointer to new parent during parent change. This is= also + * used when a clk's rate is changed. + * @new_child: Pointer to new child during reparenting. This is al= so + * used when a clk's rate is changed. + * @flags: Clock property and capability flags. See + * `clk framework flags`. + * @orphan: True if this clk is currently orphaned. + * @rpm_enabled: True if runtime power management is enabled for thi= s clk. + * @enable_count: Reference count of enables. + * @prepare_count: Reference count of prepares. + * @protect_count: Protection reference count against disable. + * @min_rate: Minimum supported clock rate (Hz). + * @max_rate: Maximum supported clock rate (Hz). + * @accuracy: Accuracy of the clock rate (parts per billion). + * @phase: Current phase (degrees). + * @duty: Current duty cycle configuration (as ratio: num/den= ). + * @children: All of the children of this clk. + * @child_node: Node for linking as a child in the parent's list. + * @hashtable_node: Node for hash table that allows fast clk lookup by = name. + * @clks: All of the clk consumers registered. + * @notifier_count: Number of notifiers registered for this clk. + * @dentry: DebugFS entry for this clk. + * @debug_node: DebugFS node for this clk. + * @ref: Reference count for structure lifetime management. + * + * Managed by the clk framework. Clk providers and consumers do not intera= ct + * with this structure directly. Instead, clk operations flow through the + * framework and the framework manipulates this structure to keep track of + * parent/child relationships, rate, enable state, etc. + * + */ struct clk_core { const char *name; const struct clk_ops *ops; --=20 2.54.0 From nobody Fri Jun 12 23:47:59 2026 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: quoted-printable 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 Acked-by: Randy Dunlap Reviewed-by: Maxime Ripard Tested-by: Randy Dunlap --- 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/cl= k.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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =20 -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 =20 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/cl= k.h. =20 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. =20 - 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 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. kernel-doc:: include/linux/clk-provider.h + :doc: clk framework flags =20 Hardware clk implementations =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D --=20 2.54.0 From nobody Fri Jun 12 23:47:59 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 223102874F8 for ; Tue, 12 May 2026 01:35:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778549747; cv=none; b=JZAPrDXu+v4gkLTpcShWc5scyWjlUQmoD+cIdbSpAojLRbMD6r0VWKSMcj6AEM5kBlDGe637u8Inj7ZXzlADmbbm8/SmR20/l8rs1/fMhOXe2s7wMpsRrsgdBSWDIis+0ujQ5pPMBqeIWPBsOMoojlrk7i+Q4wr1NeQa1C20OJs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778549747; c=relaxed/simple; bh=g+j2MFkZRvRsBFDhiFAG6DyUYIOKWDt1Nt42ezFjD6s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CYS+58x7/ZMHXVtPUaxcnQOuWy6xbQICFp4W5Aet2peywee7+rjA6MFHbE+/niUXT6BWymNi6BuNRWcT3rusByhNwL5bG6R4EJiPj19rl071SqOyLOoJCsBX5ohm1/yqOitgZWWSUYqbUpo1QwjfthhsgU3ERbm+/CA7NoH3fS8= 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=OHyBA6YG; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=m/k57CBu; arc=none smtp.client-ip=170.10.129.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="OHyBA6YG"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="m/k57CBu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778549744; 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=UxuGTicMxGGHlkwI+vY7fNgMYqkX8pEUM+UIKSypDBg=; b=OHyBA6YGyc3/tpiTE3ZpV8ogKf8aFtU/a6u8h597amQ1BJVWuTCDJ9Guer6cVTX5mpFTiJ waeuRqH4rKoBfG9/OZJs2AvSrcoPk46K/r6UtdPekOiE/2lfdA8gix5Nlh2z5gw2lRQh6t lJq4qhIPiv9Hz0l4t1aIzNCoh4VZ8k8= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-399-wn8FNOQZPsKHzWXWtpxeLQ-1; Mon, 11 May 2026 21:35:42 -0400 X-MC-Unique: wn8FNOQZPsKHzWXWtpxeLQ-1 X-Mimecast-MFC-AGG-ID: wn8FNOQZPsKHzWXWtpxeLQ_1778549742 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-8b46c014a26so104724506d6.0 for ; Mon, 11 May 2026 18:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778549742; x=1779154542; 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=UxuGTicMxGGHlkwI+vY7fNgMYqkX8pEUM+UIKSypDBg=; b=m/k57CBuxSjiINzG1D0RhbPmuoFU91HCWPop4N8iIVZM+4u55N02hv9zxB8eJS00gp YEBriSZTeqSJR1Xg4eISVuQurZNm85UDypMlog17FFc5XMUsimrvK92ISV20RgFuMpoV I5zKg/jLKoaLJtyCuXNUa94zoomIss8N78pWuowCOoTBkpkPhd2lK44BgkfwL3bNW4XV gPv85evbx4aXMHTVFyoj3/N/mMLoXvloNkR6OqzMRd7g4VJyE4LP2qwHu4sb36mb390r VI9p3i0oSJ54Cwrw+829TUVovO4xQ/QDuKr3FJN/Cz05XN9aFnk8NTlN0sdkBAV7Ox7P YMkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778549742; x=1779154542; 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=UxuGTicMxGGHlkwI+vY7fNgMYqkX8pEUM+UIKSypDBg=; b=N4Gn9jvsNZ+/isuW0VxQOVoTTTITVayfeNPX6etra3JGKbsz0mW8HPdXsh5ZajR/b7 NbGmHoB7RZUSFEjHNyqOGh0KeS0LzFNcGbBnBt5LNE5HLJ5iB1xEhvXlWj0Lqm/O4grI YkA9eNGQr6wRszZdwVzW6gn9+dtql9YxWMj8jNx+E9UPFBFEVPaaBveoqddfpEaIsOGu iQbdfCEBnVMr2SfXhymevCnlgqo/Zg1qoSGWTA7X1N/HpGsC/JMlwEY72gk7HDyXb1kI BRuTIT8ffMdJhqD//gCPKokoni94b51wLN6CK4WNlG76sr6Md40iURyG9PjyncYa+Iu+ fFEw== X-Forwarded-Encrypted: i=1; AFNElJ/6Xxa/8m2hH757ImR5GY0vZBHW3godH8fjL5i1diPO1HrPs742Z0GkjUhWDWAoOu1CzTHBledLjE6DqUw=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3uTTPPHli/5HPRpMBLqCA2Ync8m9SO2PQTfSBzdiQglAkCfzS qzcBlSrUcJdzF+J1A5CKw5ZRr8jzbXPJSgPoibUGYnl9D78skxBrjgNdq/8cMPbaGPoviL5RthQ 0i7C0ZLyBsx1GqPUyZRyhjXiY5+isCD6NBjG6WroDrJXgIM12XLmEVX3v6EExFaQyEw== X-Gm-Gg: Acq92OFI3nMRPbFqMV0eOElG8lTyg8hnrRBVYmdCidDxpmLnU1HIF7mYWhOtBWLP2Om 4Hqtnt+w1SiTAQ6fatXw6ErPGE4NOXV8dBNrPenPkT+RxasOZX29VqwLtdZ+qz3+LyO7kf5rDzd lj61Rf+04jHixBCY193D5tWAMFdC9LarHxq2Mxhkq1pZcAwp06LTx2GIdPRx2GfK3iXAD7Dw8oN nAYDLZe0bXUavjvB8QiwOW58jhcpk0YfNx/0AeYDIg4PyjhBpTmDhPQvUBiUacZFGeN6pC6/xjS CJDP1hW9COzBGzXfMTTojILCBY8k0Y1GwSi29kpP/LNPsYPi10ylCmZd1MJq7gEgsFRBUEfmDNe BCxZwlKQZerTwgtj6YkoWQqFlGzlWmej7y8epPHiof1BjFA93J2eact1+kfGn2g== X-Received: by 2002:a05:6214:478f:b0:8ae:6282:df2e with SMTP id 6a1803df08f44-8c1b0192344mr173898176d6.44.1778549742331; Mon, 11 May 2026 18:35:42 -0700 (PDT) X-Received: by 2002:a05:6214:478f:b0:8ae:6282:df2e with SMTP id 6a1803df08f44-8c1b0192344mr173897886d6.44.1778549741856; Mon, 11 May 2026 18:35:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 18:35:41 -0700 (PDT) From: Brian Masney Date: Mon, 11 May 2026 21:35:07 -0400 Subject: [PATCH v3 4/4] clk: test: convert constants to use HZ_PER_MHZ 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: quoted-printable Message-Id: <20260511-clk-docs-v3-4-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=1009; i=bmasney@redhat.com; s=20250903; h=from:subject:message-id; bh=g+j2MFkZRvRsBFDhiFAG6DyUYIOKWDt1Nt42ezFjD6s=; b=owGbwMvMwCW2/dJd9di6A+2Mp9WSGLKYmp+99HIpuHBYUXEXd+pW23U7/SaFLio0uFp27k+Hv +k7toyvHaUsDGJcDLJiiixLco0KIlJX2d67o8kCM4eVCWQIAxenAExkmwPDX7mJ26axOMeurTNj 2Xz6+m77C399buwNFGKYw1a0JKZZrJeR4VnV6nMn/b3MTIL1trk+/Tz5+vrO/b15fX+2Wz2K/Py ZjxMA X-Developer-Key: i=bmasney@redhat.com; a=openpgp; fpr=A46D32705865AA3DDEDC2904B7D2DD275D7EC087 Convert the DUMMY_CLOCK_* constants over to use HZ_PER_MHZ. Signed-off-by: Brian Masney Reviewed-by: Maxime Ripard --- drivers/clk/clk_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk_test.c b/drivers/clk/clk_test.c index b1961daac5e2..497db4e54d03 100644 --- a/drivers/clk/clk_test.c +++ b/drivers/clk/clk_test.c @@ -7,6 +7,7 @@ #include #include #include +#include =20 /* Needed for clk_hw_get_clk() */ #include "clk.h" @@ -21,9 +22,9 @@ =20 static const struct clk_ops empty_clk_ops =3D { }; =20 -#define DUMMY_CLOCK_INIT_RATE (42 * 1000 * 1000) -#define DUMMY_CLOCK_RATE_1 (142 * 1000 * 1000) -#define DUMMY_CLOCK_RATE_2 (242 * 1000 * 1000) +#define DUMMY_CLOCK_INIT_RATE (42 * HZ_PER_MHZ) +#define DUMMY_CLOCK_RATE_1 (142 * HZ_PER_MHZ) +#define DUMMY_CLOCK_RATE_2 (242 * HZ_PER_MHZ) =20 struct clk_dummy_context { struct clk_hw hw; --=20 2.54.0