All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] slimbus: patches for 5.6
@ 2020-01-09 10:31 Srinivas Kandagatla
  2020-01-09 10:31 ` [PATCH 1/4] dt-bindings: SLIMBus: add slim devices optional properties Srinivas Kandagatla
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2020-01-09 10:31 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla

Hi Greg,

Here are some trival SLIMBus fixes + a new bindings for 5.6.

Can you please queue them up for 5.6.

thanks,
Srini


Chuhong Yuan (1):
  slimbus: qcom: add missed clk_disable_unprepare in remove

Nishad Kamdar (1):
  slimbus: Use the correct style for SPDX License Identifier

Peter Ujfalusi (1):
  slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead
    dma_request_slave_channel()

Srinivas Kandagatla (1):
  dt-bindings: SLIMBus: add slim devices optional properties

 .../devicetree/bindings/slimbus/bus.txt       | 10 ++++++++++
 drivers/slimbus/qcom-ctrl.c                   |  2 ++
 drivers/slimbus/qcom-ngd-ctrl.c               | 20 +++++++++++--------
 drivers/slimbus/slimbus.h                     |  2 +-
 4 files changed, 25 insertions(+), 9 deletions(-)

-- 
2.21.0


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

* [PATCH 1/4] dt-bindings: SLIMBus: add slim devices optional properties
  2020-01-09 10:31 [PATCH 0/4] slimbus: patches for 5.6 Srinivas Kandagatla
@ 2020-01-09 10:31 ` Srinivas Kandagatla
  2020-01-09 10:31 ` [PATCH 2/4] slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel() Srinivas Kandagatla
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2020-01-09 10:31 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Srinivas Kandagatla, Rob Herring

This patch adds an optional SLIMBus Interface device phandle property
that could be used by some of the SLIMBus devices.

Interface device is mostly used with devices that are dealing
with streaming.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/slimbus/bus.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/slimbus/bus.txt b/Documentation/devicetree/bindings/slimbus/bus.txt
index 52fa6426388c..bbe871f82a8b 100644
--- a/Documentation/devicetree/bindings/slimbus/bus.txt
+++ b/Documentation/devicetree/bindings/slimbus/bus.txt
@@ -32,6 +32,10 @@ Required property for SLIMbus child node if it is present:
 	 	  Product Code, shall be in lower case hexadecimal with leading
 		  zeroes suppressed
 
+Optional property for SLIMbus child node if it is present:
+- slim-ifc-dev	- Should be phandle to SLIMBus Interface device.
+		  Required for devices which deal with streams.
+
 SLIMbus example for Qualcomm's slimbus manager component:
 
 	slim@28080000 {
@@ -43,8 +47,14 @@ SLIMbus example for Qualcomm's slimbus manager component:
 		#address-cells = <2>;
 		#size-cell = <0>;
 
+		codec_ifd: ifd@0,0{
+			compatible = "slim217,60";
+			reg = <0 0>;
+		};
+
 		codec: wcd9310@1,0{
 			compatible = "slim217,60";
 			reg = <1 0>;
+			slim-ifc-dev  = <&codec_ifd>;
 		};
 	};
-- 
2.21.0


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

* [PATCH 2/4] slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel()
  2020-01-09 10:31 [PATCH 0/4] slimbus: patches for 5.6 Srinivas Kandagatla
  2020-01-09 10:31 ` [PATCH 1/4] dt-bindings: SLIMBus: add slim devices optional properties Srinivas Kandagatla
@ 2020-01-09 10:31 ` Srinivas Kandagatla
  2020-01-09 10:31 ` [PATCH 3/4] slimbus: Use the correct style for SPDX License Identifier Srinivas Kandagatla
  2020-01-09 10:31 ` [PATCH 4/4] slimbus: qcom: add missed clk_disable_unprepare in remove Srinivas Kandagatla
  3 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2020-01-09 10:31 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Peter Ujfalusi, Srinivas Kandagatla

From: Peter Ujfalusi <peter.ujfalusi@ti.com>

dma_request_slave_channel() is a wrapper on top of dma_request_chan()
eating up the error code.

By using dma_request_chan() directly the driver can support deferred
probing against DMA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 29fbab55c3b3..e3f5ebc0c05e 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -666,10 +666,12 @@ static int qcom_slim_ngd_init_rx_msgq(struct qcom_slim_ngd_ctrl *ctrl)
 	struct device *dev = ctrl->dev;
 	int ret, size;
 
-	ctrl->dma_rx_channel = dma_request_slave_channel(dev, "rx");
-	if (!ctrl->dma_rx_channel) {
-		dev_err(dev, "Failed to request dma channels");
-		return -EINVAL;
+	ctrl->dma_rx_channel = dma_request_chan(dev, "rx");
+	if (IS_ERR(ctrl->dma_rx_channel)) {
+		dev_err(dev, "Failed to request RX dma channel");
+		ret = PTR_ERR(ctrl->dma_rx_channel);
+		ctrl->dma_rx_channel = NULL;
+		return ret;
 	}
 
 	size = QCOM_SLIM_NGD_DESC_NUM * SLIM_MSGQ_BUF_LEN;
@@ -703,10 +705,12 @@ static int qcom_slim_ngd_init_tx_msgq(struct qcom_slim_ngd_ctrl *ctrl)
 	int ret = 0;
 	int size;
 
-	ctrl->dma_tx_channel = dma_request_slave_channel(dev, "tx");
-	if (!ctrl->dma_tx_channel) {
-		dev_err(dev, "Failed to request dma channels");
-		return -EINVAL;
+	ctrl->dma_tx_channel = dma_request_chan(dev, "tx");
+	if (IS_ERR(ctrl->dma_tx_channel)) {
+		dev_err(dev, "Failed to request TX dma channel");
+		ret = PTR_ERR(ctrl->dma_tx_channel);
+		ctrl->dma_tx_channel = NULL;
+		return ret;
 	}
 
 	size = ((QCOM_SLIM_NGD_DESC_NUM + 1) * SLIM_MSGQ_BUF_LEN);
-- 
2.21.0


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

* [PATCH 3/4] slimbus: Use the correct style for SPDX License Identifier
  2020-01-09 10:31 [PATCH 0/4] slimbus: patches for 5.6 Srinivas Kandagatla
  2020-01-09 10:31 ` [PATCH 1/4] dt-bindings: SLIMBus: add slim devices optional properties Srinivas Kandagatla
  2020-01-09 10:31 ` [PATCH 2/4] slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel() Srinivas Kandagatla
@ 2020-01-09 10:31 ` Srinivas Kandagatla
  2020-01-09 10:31 ` [PATCH 4/4] slimbus: qcom: add missed clk_disable_unprepare in remove Srinivas Kandagatla
  3 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2020-01-09 10:31 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Nishad Kamdar, Joe Perches, Srinivas Kandagatla

From: Nishad Kamdar <nishadkamdar@gmail.com>

This patch corrects the SPDX License Identifier style in
header file related to SLIMbus driver.
For C header files Documentation/process/license-rules.rst
mandates C-like comments (opposed to C source files where
C++ style should be used).

Changes made by using a script provided by Joe Perches here:
https://lkml.org/lkml/2019/2/7/46.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/slimbus/slimbus.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/slimbus/slimbus.h b/drivers/slimbus/slimbus.h
index b2f013bfe42e..c73035915f1d 100644
--- a/drivers/slimbus/slimbus.h
+++ b/drivers/slimbus/slimbus.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2011-2017, The Linux Foundation
  */
-- 
2.21.0


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

* [PATCH 4/4] slimbus: qcom: add missed clk_disable_unprepare in remove
  2020-01-09 10:31 [PATCH 0/4] slimbus: patches for 5.6 Srinivas Kandagatla
                   ` (2 preceding siblings ...)
  2020-01-09 10:31 ` [PATCH 3/4] slimbus: Use the correct style for SPDX License Identifier Srinivas Kandagatla
@ 2020-01-09 10:31 ` Srinivas Kandagatla
  3 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2020-01-09 10:31 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Chuhong Yuan, Srinivas Kandagatla

From: Chuhong Yuan <hslester96@gmail.com>

The remove misses to disable and unprepare rclk and hclk.
Add calls to clk_disable_unprepare to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/slimbus/qcom-ctrl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index a444badd8df5..4aad2566f52d 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -641,6 +641,8 @@ static int qcom_slim_remove(struct platform_device *pdev)
 
 	pm_runtime_disable(&pdev->dev);
 	slim_unregister_controller(&ctrl->ctrl);
+	clk_disable_unprepare(ctrl->rclk);
+	clk_disable_unprepare(ctrl->hclk);
 	destroy_workqueue(ctrl->rxwq);
 	return 0;
 }
-- 
2.21.0


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

end of thread, other threads:[~2020-01-09 10:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 10:31 [PATCH 0/4] slimbus: patches for 5.6 Srinivas Kandagatla
2020-01-09 10:31 ` [PATCH 1/4] dt-bindings: SLIMBus: add slim devices optional properties Srinivas Kandagatla
2020-01-09 10:31 ` [PATCH 2/4] slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel() Srinivas Kandagatla
2020-01-09 10:31 ` [PATCH 3/4] slimbus: Use the correct style for SPDX License Identifier Srinivas Kandagatla
2020-01-09 10:31 ` [PATCH 4/4] slimbus: qcom: add missed clk_disable_unprepare in remove Srinivas Kandagatla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.