public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] bus: imx-weim: support compile test
@ 2024-08-27  3:23 Wu Bo
  2024-08-27  3:23 ` [PATCH v2 2/2] bus: imx-weim: change to use devm_clk_get_enabled() helper Wu Bo
  2024-09-01  9:07 ` [PATCH v2 1/2] bus: imx-weim: support compile test Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Wu Bo @ 2024-08-27  3:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Lucas Stach, Rob Herring, Wu Bo, imx, linux-arm-kernel

Add COMPILE_TEST to support code compile test

Signed-off-by: Wu Bo <bo.wu@vivo.com>
---
 drivers/bus/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index 64cd2ee03aa3..ff669a8ccad9 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -89,7 +89,7 @@ config HISILICON_LPC
 
 config IMX_WEIM
 	bool "Freescale EIM DRIVER"
-	depends on ARCH_MXC
+	depends on ARCH_MXC || COMPILE_TEST
 	help
 	  Driver for i.MX WEIM controller.
 	  The WEIM(Wireless External Interface Module) works like a bus.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 2/2] bus: imx-weim: change to use devm_clk_get_enabled() helper
  2024-08-27  3:23 [PATCH v2 1/2] bus: imx-weim: support compile test Wu Bo
@ 2024-08-27  3:23 ` Wu Bo
  2024-09-01  9:07 ` [PATCH v2 1/2] bus: imx-weim: support compile test Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Wu Bo @ 2024-08-27  3:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Lucas Stach, Rob Herring, Wu Bo, imx, linux-arm-kernel

Make the code cleaner and avoid call clk_disable_unprepare()

Signed-off-by: Wu Bo <bo.wu@vivo.com>
---
 drivers/bus/imx-weim.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 837bf9d51c6e..83d623d97f5f 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -282,22 +282,18 @@ static int weim_probe(struct platform_device *pdev)
 	dev_set_drvdata(&pdev->dev, priv);
 
 	/* get the clock */
-	clk = devm_clk_get(&pdev->dev, NULL);
+	clk = devm_clk_get_enabled(&pdev->dev, NULL);
 	if (IS_ERR(clk))
 		return PTR_ERR(clk);
 
-	ret = clk_prepare_enable(clk);
-	if (ret)
-		return ret;
-
 	/* parse the device node */
 	ret = weim_parse_dt(pdev);
 	if (ret)
-		clk_disable_unprepare(clk);
-	else
-		dev_info(&pdev->dev, "Driver registered.\n");
+		return ret;
 
-	return ret;
+	dev_info(&pdev->dev, "Driver registered.\n");
+
+	return 0;
 }
 
 #if IS_ENABLED(CONFIG_OF_DYNAMIC)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/2] bus: imx-weim: support compile test
  2024-08-27  3:23 [PATCH v2 1/2] bus: imx-weim: support compile test Wu Bo
  2024-08-27  3:23 ` [PATCH v2 2/2] bus: imx-weim: change to use devm_clk_get_enabled() helper Wu Bo
@ 2024-09-01  9:07 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2024-09-01  9:07 UTC (permalink / raw)
  To: Wu Bo
  Cc: linux-kernel, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Lucas Stach, Rob Herring, imx, linux-arm-kernel

On Mon, Aug 26, 2024 at 09:23:47PM -0600, Wu Bo wrote:
> Add COMPILE_TEST to support code compile test
> 
> Signed-off-by: Wu Bo <bo.wu@vivo.com>

Applied both, thanks!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-01  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27  3:23 [PATCH v2 1/2] bus: imx-weim: support compile test Wu Bo
2024-08-27  3:23 ` [PATCH v2 2/2] bus: imx-weim: change to use devm_clk_get_enabled() helper Wu Bo
2024-09-01  9:07 ` [PATCH v2 1/2] bus: imx-weim: support compile test Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox