From patchwork Tue Feb 13 13:27:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 20309 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp568503dyb; Tue, 13 Feb 2024 06:20:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUk1omXfZ4Gfa3qWj2J56qpPCPjjk4VE79GLFqLb2JXV9PViiF7+lLgbW7Uoxqr4nRJp0AqfnXkb4DiWIr5fZtaKY72+Q== X-Google-Smtp-Source: AGHT+IF7i0ZPLDatcgfXloCzI1h2t4Rg9U4PIEgsHox8Lxo9V6wmgpDHIqiPG820NStqU+gkT67g X-Received: by 2002:a05:6358:78b:b0:176:56b9:d4e1 with SMTP id n11-20020a056358078b00b0017656b9d4e1mr5226493rwj.23.1707834023342; Tue, 13 Feb 2024 06:20:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707834023; cv=pass; d=google.com; s=arc-20160816; b=TnTpaEqpD+AnPq3+syaZNopT/PzU8l5yx0db4/s0V6fB78/khGyzKjkh59339xzKKw Y2KS1rgV/sWl9qt0G4lbDTxr9ctdfpt0l92ZlCYArIrPzLJ+yfRldv5IXtiw/RhpUF13 mx5FBfxthep/6UCmKAU0n0xpVPR8JU/GxedmG9faiGXBX1p6ByXtFaT4WsKSY5FL63Xf QyOtW7Tzr5R3gYUTIctX5ReG0NAQxg5uALvJcdvE8inCB37FCfKwJJjqIq656ki1W/6o 2Uwvpr5iXmSrTg2NI4BBUSQl7TGWNA1EMB6gjKF2Clf2BdYfgjmDrPLN5S7tIzkH7gc4 9aWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :dlp-filter:cms-type:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=uILFgGO0TM9PDxvRkmFO/3dPB4/T//4OL4gPS7QNllw=; fh=pfWU4qVJHHbeRQmwMwDBgo544IRrSD7wNG5gVs6J0/U=; b=C3aWMZuJUqf8JewQeQRl7hskePfmul9ubysyFRZOWDlmRy5Qf66YjDHyF/LxvyZqk4 tmRgbfcvJ+4riRah46yErAMGOUK5pJxOy2dXTNv58y8Jq8AOz8u0dgU8hz7DyegfxSNv nNNMNh9BQ3L81YPWHQoW49nEISR+qPF9ek+W7Q0cXDtF4HpoSxSdYqLITNseLQVA6ehL OLMtG/yVxVrAeNBo2HFXrcpqCHiZRCsh346RLWCwSK0M/BrbQpNUXCnDIYS5j42YITXx nOOpaWTdSc+yVqCZEVFpHT2+2Cgkct8iSzNTFu45Ges/r7A6LEk2LfHf0FuYR3bfJw3B /EYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ue+Uhuca; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-63655-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63655-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com X-Forwarded-Encrypted: i=2; AJvYcCVHUvp4y6eRywXnkiM2MIWs0tUZA/lbzxoLDzv96MOSnZ4Gj/B2unNkrW1OjjnVzSjNNH65VzedmNaXpuFZH7bLaN+htQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e4-20020a656784000000b005d8d56cd646si2065182pgr.130.2024.02.13.06.20.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 06:20:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63655-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ue+Uhuca; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-63655-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63655-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B7187281FF0 for ; Tue, 13 Feb 2024 14:19:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 673BA5788F; Tue, 13 Feb 2024 14:19:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="ue+Uhuca" Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 6E80A56767 for ; Tue, 13 Feb 2024 14:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707833961; cv=none; b=HI6/DUbO2tkzFLe/OmfsRXI3Qgk+UkqijWtA+BIITQHRt1WxUeFY/IL+Cm6RKNCEfqeZK3k1MlGiT/a5vomVFOXd4uY57oxDtxvP3RvlVpgXqYIBX2TU8DoiMzS8wt9DO6pQ1KTueSbikevOhIiXt6dcoD8fDWW5S7POEUxVggY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707833961; c=relaxed/simple; bh=XLMbgpPxKs6nZIg4i0hUeBHypGjLhHRIJjFph+4LgWY=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:References; b=l2Egv6WvUSAkkcbonV4UPaSj34lEnR2smr8oEdSqtttrBxda1kkY5tlQFZbKKcggtSTB2iY0Q3uUF2tvCwOYhJrfSS063q7l7K6BiOT37Ff2Z0UW3Dktds0hfmLs/Ek5ACQrqjJyd3L+NRVPjUXeb/PnXGqFmmAkMkNvGDWPlj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=ue+Uhuca; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240213141914epoutp01e6e7e0235644a54d6750fb4ba9846a91~zce7XWcBV2344623446epoutp012 for ; Tue, 13 Feb 2024 14:19:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240213141914epoutp01e6e7e0235644a54d6750fb4ba9846a91~zce7XWcBV2344623446epoutp012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1707833954; bh=uILFgGO0TM9PDxvRkmFO/3dPB4/T//4OL4gPS7QNllw=; h=From:To:Cc:Subject:Date:References:From; b=ue+Uhuca/wLmQi4G071TYruMRnW8bEVwID4ah81qVvnInKrMKRN3sC1EQNL1ICoL1 vRk4//z6D6lB2tuT+KTYllE8hTtxZz+wnphDOZJnFbHyauggHE1ecr2YeB+ijRodYM hUu6yH26HYEcNQDtG96bK9uYgoJPndvCSamFhOow= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20240213141913epcas5p398960dbe2c122016560562ecd5e53139~zce6zbWgn0171201712epcas5p3f; Tue, 13 Feb 2024 14:19:13 +0000 (GMT) Received: from epsmgec5p1new.samsung.com (unknown [182.195.38.180]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4TZ3Nb4bPKz4x9Pv; Tue, 13 Feb 2024 14:19:11 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmgec5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 0E.80.08567.C5A7BC56; Tue, 13 Feb 2024 23:19:08 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20240213132759epcas5p4896fd9d0b1af7762ff98ae9e586492dc~zbyMHWueF2842628426epcas5p4e; Tue, 13 Feb 2024 13:27:59 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240213132759epsmtrp242439ce4bb944f565b3f71b978c01e1a~zbyMGZctb2153621536epsmtrp2J; Tue, 13 Feb 2024 13:27:59 +0000 (GMT) X-AuditID: b6c32a44-3abff70000002177-44-65cb7a5c2184 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F4.C1.08755.F5E6BC56; Tue, 13 Feb 2024 22:27:59 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240213132757epsmtip1dea7f6a38eea4362c023f4a38a4e1b8e~zbyJZdfoC1530215302epsmtip1N; Tue, 13 Feb 2024 13:27:56 +0000 (GMT) From: Shradha Todi To: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: mturquette@baylibre.com, sboyd@kernel.org, jingoohan1@gmail.com, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, linux@armlinux.org.uk, m.szyprowski@samsung.com, manivannan.sadhasivam@linaro.org, pankaj.dubey@samsung.com, gost.dev@samsung.com, Shradha Todi Subject: [PATCH v5 0/2] Add helper function to get and enable all bulk clocks Date: Tue, 13 Feb 2024 18:57:49 +0530 Message-Id: <20240213132751.46813-1-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJJsWRmVeSWpSXmKPExsWy7bCmpm5M1elUg8NvVC0ezNvGZrGkKcPi 5oGdTBYrvsxkt9j7eiu7RUPPb1aLTY+vsVp87LnHanF51xw2i7PzjrNZzDi/j8ni0NS9jBYt f1pYLNYeuctucbelk9Xi4ilXi0Vbv7Bb/N+zg93i37WNLBa9h2sdRDwuX7vI7PH+Riu7x85Z d9k9Fmwq9di0qpPN4861PWweT65MZ/LYvKTeo2/LKkaPz5vkAriism0yUhNTUosUUvOS81My 89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVcfAJ03TJzgH5TUihLzCkFCgUkFhcr6dvZFOWX lqQqZOQXl9gqpRak5BSYFOgVJ+YWl+al6+WlllgZGhgYmQIVJmRnnH85ibXgEVdF648ZrA2M jzm6GDk5JARMJJa+ucfaxcjFISSwm1Gipe0dM4TziVHi15TPUJlvjBKPGvYxwrR0XNnHBmIL CexllJg/TxmiqJVJ4vTt9SwgCTYBLYnGr11go0QEFjNK3NqxGWwUs8AvJol9jZuYQKqEBfwl Jj6+BjaKRUBVYsapD6wgNq+AlcS5xdPYIdbJS6zecABskoTAWg6JX+v7WSASLhIHz/WwQtjC Eq+Ob4FqkJL4/G4vG4Sd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avXcwgCRGB5YwSP08+BetgFuhhljjQGgJiCwv4Sqz9e5wF xGYRUJWYceoDK4jNK2AlcW7xNHaIDfISqzccYJ7AyLOAkWEVo2RqQXFuem6xYYFhXmq5XnFi bnFpXrpecn7uJkZwwGtp7mDcvuqD3iFGJg7GQ4wSHMxKIryXZpxIFeJNSaysSi3Kjy8qzUkt PsQozcGiJM4r/qI3RUggPbEkNTs1tSC1CCbLxMEp1cCUE6o4Xdx6fVFQSWOoV7nNoWVrau4Y 7H+9+NklhUNq1/X1xBb5bpLNCV/8o7Tx1Ev5uXJiHOETFhw6k5J3/o78h9Pn+/QWFLqLVq4s mrNIjHvLIxO99EtKX/wmbzV4ccr0sldzyN+83JUT570qVzlyVDijNePwsg6pOrdzCVtOnfNQ kzfq21Ozx2jTp48K9+8Gf29Ztajx9fSi0qVbNU+Gf73m4zvvkdrDurkvqgvzHnaGHJm4Lr7/ /wnD60sae1lE8+W5vnTsWi5zWP9+0/bn52o2cKivUXkV9JgtydHUSjIwmHWbr46i9YEaK56Y FUHzI1ZPYGWU4kjiEr0StTTtRrzG8tYJzn80WCSWixUosRRnJBpqMRcVJwIA49QBgOcCAAA= X-CMS-MailID: 20240213132759epcas5p4896fd9d0b1af7762ff98ae9e586492dc X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240213132759epcas5p4896fd9d0b1af7762ff98ae9e586492dc References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790793768927512297 X-GMAIL-MSGID: 1790793768927512297 Create a managed API wrapper to get all the bulk clocks and enable them as it is a very common practice in many drivers. The second patch uses this API to adapt to clk_bulk_* APIs in the exynos driver. v1: - https://lore.kernel.org/lkml/20231009062216.6729-1-shradha.t@samsung.com/ v2: - https://lore.kernel.org/lkml/20231115065621.27014-1-shradha.t@samsung.com/ - Addressed Manivannan's comments to improve patch v3: - https://lore.kernel.org/all/20240110110115.56270-1-shradha.t@samsung.com/ - Took Marek's suggestion to make a common bulk clk wrapper and use it in the exynos driver v4: - https://lore.kernel.org/all/20240124103838.32478-1-shradha.t@samsung.com/ - Addressed Alim and Manivannan's comments - Changed enabled->enable and disabled->disable in function name - Remove num_clks out parameter as it is not required by user - Removed exit callback and used function name directly in release v5: - Rephrased comments for better readability Shradha Todi (2): clk: Provide managed helper to get and enable bulk clocks PCI: exynos: Adapt to clk_bulk_* APIs drivers/clk/clk-devres.c | 40 ++++++++++++++++++ drivers/pci/controller/dwc/pci-exynos.c | 54 ++----------------------- include/linux/clk.h | 23 +++++++++++ 3 files changed, 67 insertions(+), 50 deletions(-)