* [PATCH 0/4] slimbus: patches for 7.4
@ 2026-10-02 10:15 srini
2026-10-02 10:15 ` [PATCH 1/4] slimbus: fix typos in comments srini
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: srini @ 2026-10-02 10:15 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla
From: Srinivas Kandagatla <srini@kernel.org>
Hi Greg,
Here are few slimbus patches for 7.4, Could you please queue
these for 7.4.
Patches include
- qcom-ngd-ctrl: implement disable_stream callback so clients
can cleanly shut down a channel before switching frequency.
- qcom-ngd-ctrl: switch to platform_device_set_fwnode() and
drop redundant dev_err_probe() calls around devm_request_irq().
- fix typos in comments.
Thanks,
Srini
Bartosz Golaszewski (1):
slimbus: qcom-ngd-ctrl: use platform_device_set_fwnode()
Hemanth Selam (1):
slimbus: fix typos in comments
Pan Chuang (1):
slimbus: qcom-ngd-ctrl: Remove redundant dev_err_probe()
Viken Dadhaniya (1):
slimbus: qcom-ngd-ctrl: Implement disable_stream callback
drivers/slimbus/qcom-ngd-ctrl.c | 82 ++++++++++++++++++++++++++++++++-
drivers/slimbus/slimbus.h | 14 +++++-
include/linux/slimbus.h | 2 +-
3 files changed, 94 insertions(+), 4 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] slimbus: fix typos in comments
2026-10-02 10:15 [PATCH 0/4] slimbus: patches for 7.4 srini
@ 2026-10-02 10:15 ` srini
2026-10-02 10:15 ` [PATCH 2/4] slimbus: qcom-ngd-ctrl: use platform_device_set_fwnode() srini
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: srini @ 2026-10-02 10:15 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Hemanth Selam, Srinivas Kandagatla
From: Hemanth Selam <hemanth.selam@gmail.com>
Fix typos in comments, reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt. Only touches comments, no code
changes.
Assisted-by: Cursor:claude-opus-5
Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
drivers/slimbus/slimbus.h | 2 +-
include/linux/slimbus.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/slimbus/slimbus.h b/drivers/slimbus/slimbus.h
index 00a7f112574b..3a03993c3ac8 100644
--- a/drivers/slimbus/slimbus.h
+++ b/drivers/slimbus/slimbus.h
@@ -325,7 +325,7 @@ enum slim_transport_protocol {
* @prot: Transport protocol used in this stream
* @rate: Data rate of samples *
* @bps: bits per sample
- * @ratem: rate multipler which is super frame rate/data rate
+ * @ratem: rate multiplier which is super frame rate/data rate
* @num_ports: number of ports
* @ports: pointer to instance of ports
* @node: list head for stream associated with slim device.
diff --git a/include/linux/slimbus.h b/include/linux/slimbus.h
index ca6f1da4bdf3..1a2d3aa0e033 100644
--- a/include/linux/slimbus.h
+++ b/include/linux/slimbus.h
@@ -98,7 +98,7 @@ struct slim_driver {
* @start_offset: Specifies starting offset in information/value element map
* @rbuf: buffer to read the values
* @wbuf: buffer to write
- * @num_bytes: upto 16. This ensures that the message will fit the slicesize
+ * @num_bytes: up to 16. This ensures that the message will fit the slicesize
* per SLIMbus spec
* @comp: completion for asynchronous operations, valid only if TID is
* required for transaction, like REQUEST operations.
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] slimbus: qcom-ngd-ctrl: use platform_device_set_fwnode()
2026-10-02 10:15 [PATCH 0/4] slimbus: patches for 7.4 srini
2026-10-02 10:15 ` [PATCH 1/4] slimbus: fix typos in comments srini
@ 2026-10-02 10:15 ` srini
2026-10-02 10:15 ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: Remove redundant dev_err_probe() srini
2026-10-02 10:15 ` [PATCH 4/4] slimbus: qcom-ngd-ctrl: Implement disable_stream callback srini
3 siblings, 0 replies; 5+ messages in thread
From: srini @ 2026-10-02 10:15 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Bartosz Golaszewski, Srinivas Kandagatla
From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Prefer the higher-level platform_device_set_fwnode() over the
OF-specific platform_device_set_of_node() for dynamically allocated
platform devices.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
drivers/slimbus/qcom-ngd-ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 6e89415712ce..eb0ccb31e907 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1539,7 +1539,7 @@ static int of_qcom_slim_ngd_register(struct device *parent,
kfree(ngd);
return ret;
}
- platform_device_set_of_node(ngd->pdev, node);
+ platform_device_set_fwnode(ngd->pdev, of_fwnode_handle(node));
ctrl->ngd = ngd;
ret = platform_device_add(ngd->pdev);
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] slimbus: qcom-ngd-ctrl: Remove redundant dev_err_probe()
2026-10-02 10:15 [PATCH 0/4] slimbus: patches for 7.4 srini
2026-10-02 10:15 ` [PATCH 1/4] slimbus: fix typos in comments srini
2026-10-02 10:15 ` [PATCH 2/4] slimbus: qcom-ngd-ctrl: use platform_device_set_fwnode() srini
@ 2026-10-02 10:15 ` srini
2026-10-02 10:15 ` [PATCH 4/4] slimbus: qcom-ngd-ctrl: Implement disable_stream callback srini
3 siblings, 0 replies; 5+ messages in thread
From: srini @ 2026-10-02 10:15 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Pan Chuang, Srinivas Kandagatla
From: Pan Chuang <panchuang@vivo.com>
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs
detailed error messages on failure. Remove the now-redundant
driver-specific dev_err_probe() calls.
Signed-off-by: Pan Chuang <panchuang@vivo.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
drivers/slimbus/qcom-ngd-ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index eb0ccb31e907..4124a848676d 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1614,7 +1614,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
IRQF_TRIGGER_HIGH | IRQF_NO_AUTOEN,
"slim-ngd", ctrl);
if (ret)
- return dev_err_probe(&pdev->dev, ret, "request IRQ failed\n");
+ return ret;
ctrl->dev = dev;
ctrl->framer.rootfreq = SLIM_ROOT_FREQ >> 3;
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] slimbus: qcom-ngd-ctrl: Implement disable_stream callback
2026-10-02 10:15 [PATCH 0/4] slimbus: patches for 7.4 srini
` (2 preceding siblings ...)
2026-10-02 10:15 ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: Remove redundant dev_err_probe() srini
@ 2026-10-02 10:15 ` srini
3 siblings, 0 replies; 5+ messages in thread
From: srini @ 2026-10-02 10:15 UTC (permalink / raw)
To: gregkh
Cc: linux-kernel, Viken Dadhaniya, Mukesh Savaliya, Srinivas Kandagatla
From: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Switching a channel to a new frequency without first disabling the stream
causes the channel to be re-enabled without a clean shutdown, leading to a
crash on the DSP subsystem.
Implement qcom_slim_ngd_disable_stream() so clients can properly close a
channel before switching to a new frequency.
Acked-by: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com>
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
drivers/slimbus/qcom-ngd-ctrl.c | 78 +++++++++++++++++++++++++++++++++
drivers/slimbus/slimbus.h | 12 +++++
2 files changed, 90 insertions(+)
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 4124a848676d..eb983b6d1815 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -2,6 +2,7 @@
// Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
// Copyright (c) 2018, Linaro Limited
+#include <linux/bitfield.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/init.h>
@@ -87,6 +88,10 @@
#define SLIM_ROOT_FREQ 24576000
#define LADDR_RETRY 5
+#define SLIM_CHAN_CTRL_CMD GENMASK(7, 6)
+#define SLIM_CHAN_CTRL_LADDR GENMASK(4, 0)
+#define SLIM_MSG_HDR_LEN 4
+
/* Per spec.max 40 bytes per received message */
#define SLIM_MSGQ_BUF_LEN 40
#define QCOM_SLIM_NGD_DESC_NUM 32
@@ -1086,6 +1091,78 @@ static int qcom_slim_ngd_enable_stream(struct slim_stream_runtime *rt)
return ret;
}
+static int qcom_slim_ngd_disable_stream(struct slim_stream_runtime *rt)
+{
+ struct slim_device *sdev = rt->dev;
+ struct slim_controller *ctrl = sdev->ctrl;
+ struct slim_msg_txn txn = { 0 };
+ struct slim_val_inf msg = { 0 };
+ u8 wbuf[SLIM_MSGQ_BUF_LEN];
+ u8 rbuf[SLIM_MSGQ_BUF_LEN];
+ int i, ret;
+
+ txn.mt = SLIM_MSG_MT_DEST_REFERRED_USER;
+ txn.dt = SLIM_MSG_DEST_LOGICALADDR;
+ txn.la = SLIM_LA_MGR;
+ txn.ec = 0;
+ txn.msg = &msg;
+ txn.msg->num_bytes = 0;
+ txn.msg->wbuf = wbuf;
+ txn.msg->rbuf = rbuf;
+
+ for (i = 0; i < rt->num_ports; i++) {
+ struct slim_port *port = &rt->ports[i];
+
+ if (txn.msg->num_bytes == 0) {
+ wbuf[txn.msg->num_bytes++] =
+ FIELD_PREP(SLIM_CHAN_CTRL_CMD, SLIM_CH_REMOVE) |
+ FIELD_PREP(SLIM_CHAN_CTRL_LADDR, sdev->laddr);
+
+ ret = slim_alloc_txn_tid(ctrl, &txn);
+ if (ret) {
+ dev_err(&sdev->dev, "Fail to allocate TID ret:%d\n", ret);
+ return ret;
+ }
+ wbuf[txn.msg->num_bytes++] = txn.tid;
+ }
+ wbuf[txn.msg->num_bytes++] = port->ch.id;
+ }
+
+ txn.mc = SLIM_USR_MC_CHAN_CTRL;
+ txn.rl = txn.msg->num_bytes + SLIM_MSG_HDR_LEN;
+ ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn);
+ if (ret) {
+ slim_free_txn_tid(ctrl, &txn);
+ /* Controller restarting, the channels are gone anyway */
+ if (ret == -EREMOTEIO)
+ return 0;
+ dev_err(&sdev->dev, "TX timed out: MC: 0x%x, mt: 0x%x, laddr: 0x%x, ret: %d\n",
+ txn.mc, txn.mt, sdev->laddr, ret);
+ return ret;
+ }
+
+ txn.mc = SLIM_USR_MC_RECONFIG_NOW;
+ txn.msg->num_bytes = 2;
+ wbuf[1] = sdev->laddr;
+ txn.rl = txn.msg->num_bytes + SLIM_MSG_HDR_LEN;
+
+ ret = slim_alloc_txn_tid(ctrl, &txn);
+ if (ret) {
+ dev_err(&sdev->dev, "Fail to allocate TID ret:%d\n", ret);
+ return ret;
+ }
+
+ wbuf[0] = txn.tid;
+ ret = qcom_slim_ngd_xfer_msg_sync(ctrl, &txn);
+ if (ret) {
+ slim_free_txn_tid(ctrl, &txn);
+ dev_err(&sdev->dev, "TX timed out: MC: 0x%x, mt: 0x%x, laddr: 0x%x, ret: %d\n",
+ txn.mc, txn.mt, sdev->laddr, ret);
+ }
+
+ return ret;
+}
+
static int qcom_slim_ngd_get_laddr(struct slim_controller *ctrl,
struct slim_eaddr *ea, u8 *laddr)
{
@@ -1625,6 +1702,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
ctrl->ctrl.clkgear = SLIM_MAX_CLK_GEAR;
ctrl->ctrl.get_laddr = qcom_slim_ngd_get_laddr;
ctrl->ctrl.enable_stream = qcom_slim_ngd_enable_stream;
+ ctrl->ctrl.disable_stream = qcom_slim_ngd_disable_stream;
ctrl->ctrl.xfer_msg = qcom_slim_ngd_xfer_msg;
ctrl->ctrl.wakeup = NULL;
ctrl->state = QCOM_SLIM_NGD_CTRL_DOWN;
diff --git a/drivers/slimbus/slimbus.h b/drivers/slimbus/slimbus.h
index 3a03993c3ac8..8e34f30601d3 100644
--- a/drivers/slimbus/slimbus.h
+++ b/drivers/slimbus/slimbus.h
@@ -316,6 +316,18 @@ enum slim_transport_protocol {
SLIM_PROTO_EXT_HALF_DUP,
};
+/**
+ * enum slim_ch_control: Channel control.
+ * @SLIM_CH_ACTIVATE: Schedules channel or group of channels in the TDM frame.
+ * @SLIM_CH_SUSPEND: Keeps the TDM schedule but halts data transfer.
+ * @SLIM_CH_REMOVE: Drops the channel or group from the TDM frame.
+ */
+enum slim_ch_control {
+ SLIM_CH_ACTIVATE,
+ SLIM_CH_SUSPEND,
+ SLIM_CH_REMOVE,
+};
+
/**
* struct slim_stream_runtime - SLIMbus stream runtime instance
*
--
2.53.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-02 10:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 10:15 [PATCH 0/4] slimbus: patches for 7.4 srini
2026-10-02 10:15 ` [PATCH 1/4] slimbus: fix typos in comments srini
2026-10-02 10:15 ` [PATCH 2/4] slimbus: qcom-ngd-ctrl: use platform_device_set_fwnode() srini
2026-10-02 10:15 ` [PATCH 3/4] slimbus: qcom-ngd-ctrl: Remove redundant dev_err_probe() srini
2026-10-02 10:15 ` [PATCH 4/4] slimbus: qcom-ngd-ctrl: Implement disable_stream callback srini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®