[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231016154632.2851957-2-Frank.Li@nxp.com>
Date: Mon, 16 Oct 2023 11:46:28 -0400
From: Frank Li <Frank.Li@....com>
To: alexandre.belloni@...tlin.com, miquel.raynal@...tlin.com,
conor.culhane@...vaco.com, joe@...ches.com,
linux-i3c@...ts.infradead.org, linux-kernel@...r.kernel.org,
imx@...ts.linux.dev
Subject: [PATCH 1/5] i3c: master: svc: enable hotjoin default
Hotjoin require clock running and enable SLVSTART irq.
Add module parameter 'hotjoin' to disable hotjoin and enable runtime_pm to
save power.
Signed-off-by: Frank Li <Frank.Li@....com>
---
drivers/i3c/master/svc-i3c-master.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 18bc277edc8a..f0d99b029e5f 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -128,6 +128,9 @@
/* This parameter depends on the implementation and may be tuned */
#define SVC_I3C_FIFO_SIZE 16
+static bool hotjoin = true;
+module_param(hotjoin, bool, S_IRUGO | S_IWUSR);
+
struct svc_i3c_cmd {
u8 addr;
bool rnw;
@@ -1623,8 +1626,12 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
if (ret)
goto rpm_disable;
- pm_runtime_mark_last_busy(&pdev->dev);
- pm_runtime_put_autosuspend(&pdev->dev);
+ if (hotjoin) {
+ svc_i3c_master_enable_interrupts(master, SVC_I3C_MINT_SLVSTART);
+ } else {
+ pm_runtime_mark_last_busy(&pdev->dev);
+ pm_runtime_put_autosuspend(&pdev->dev);
+ }
return 0;
--
2.34.1
Powered by blists - more mailing lists