From patchwork Tue Feb 20 08:40:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Todi X-Patchwork-Id: 774793 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (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 C9A2064A94 for ; Tue, 20 Feb 2024 11:21:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708428089; cv=none; b=lBc8da+lIGem+BoFtZZMFvud5AnZcIykDYsDEIH4Fuq+yj5Vpe6LjHEBrknBuzmSVZmuSzNs9s+KwYP7cifQxB3sJM8dB5smWrzFVKu/fXygQrObsiAdlzVqUnyocFtUOuTs/fKDx8O1tfAq659l6JELTQjv2oJE8ZMYalFHYAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708428089; c=relaxed/simple; bh=tMJxfwCSSr3p+ijPgpOexopN0A0/RTNz2LXt/jouBIg=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:References; b=PRgUw7H0AVsIHAFpgY/7cadzpHsgUwz7/t7OIQoN8mG+idyrEVWz9ZhNx1oXv0YRQorko2QL2M6/Y0d1JN0/8ceKmt5hSd8ZTetcXzVJSr1z1cNsC/PmBjVAIOaww3bHQ1bBeSrAGK/FdSRb9zUco6xSymgNyiXA9L3KCsalhcQ= 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=DRAYm8BL; arc=none smtp.client-ip=203.254.224.34 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="DRAYm8BL" Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20240220112118epoutp04805212febfe32d5b664340b426671732~1jkk0WK3T2599725997epoutp04Y for ; Tue, 20 Feb 2024 11:21:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20240220112118epoutp04805212febfe32d5b664340b426671732~1jkk0WK3T2599725997epoutp04Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1708428078; bh=1cWhqeulLVD72A386JFQUZWJu92N4UiwYI/DcEzmtt8=; h=From:To:Cc:Subject:Date:References:From; b=DRAYm8BLEzlPkmljiLn6/vofVK2QFZ79msvhsf/8DJ1zztz4oeM6JfWsCOwYpmU4n +iTFpeXMCFiwsTUZMGtbgs+np4t8WudnLCDXOVyjyGcJ8z/LXlziaB2Bd+B3VlJgL4 x62MbxmFVmIdrUXlXkjf4Mrh+DPghgZ2Q+245sBc= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20240220112118epcas5p20e5f933caf48ebe9fd389527410327b9~1jkkQo-0i3136231362epcas5p2z; Tue, 20 Feb 2024 11:21:18 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.177]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4TfH6430w6z4x9Q0; Tue, 20 Feb 2024 11:21:16 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 3E.E3.09672.C2B84D56; Tue, 20 Feb 2024 20:21:16 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20240220084109epcas5p3dc6b95a0ed69b63e93f4aa0a6fc919fe~1hYvSgQxt0823808238epcas5p33; Tue, 20 Feb 2024 08:41:09 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240220084109epsmtrp2dfee0aa01819adbc0797640442582a6b~1hYvRlQBS1186311863epsmtrp2X; Tue, 20 Feb 2024 08:41:09 +0000 (GMT) X-AuditID: b6c32a4b-60bfd700000025c8-e2-65d48b2ccbca Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 0F.7B.07368.5A564D56; Tue, 20 Feb 2024 17:41:09 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240220084106epsmtip194af0d0ce4318e40dae18b6a06aa7df0~1hYsoDfGI2979629796epsmtip1j; Tue, 20 Feb 2024 08:41:06 +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 v6 0/2] Add helper function to get and enable all bulk clocks Date: Tue, 20 Feb 2024 14:10:44 +0530 Message-Id: <20240220084046.23786-1-shradha.t@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFJsWRmVeSWpSXmKPExsWy7bCmlq5O95VUg7d/BC0ezNvGZrGkKcP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z3KvFvl6 z/PGdMXPVYvXtCzfwDWTc5UWz6fahyp1m8otd2qpegTH/XpZsj5glf+UO1f+GhZdEL6fN6tZ 0MQxq9OQd7OrsWrFdPUr85qmfj90LC4qhuHIkQhmJZbijERDLeai4kQASN4U4OcCAAA= X-CMS-MailID: 20240220084109epcas5p3dc6b95a0ed69b63e93f4aa0a6fc919fe X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240220084109epcas5p3dc6b95a0ed69b63e93f4aa0a6fc919fe References: Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: - https://lore.kernel.org/lkml/20240213132751.46813-1-shradha.t@samsung.com/ - Rephrased comments for better readability v6: - Removed extra new line 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 | 22 ++++++++++ 3 files changed, 66 insertions(+), 50 deletions(-)