linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: Update properties for smem state referencing
@ 2016-06-10  4:11 Bjorn Andersson
  2016-06-10  5:26 ` [PATCH v2] " Bjorn Andersson
  2016-06-10 17:58 ` [PATCH] " Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Andersson @ 2016-06-10  4:11 UTC (permalink / raw)
  To: Rob Herring, Andy Gross
  Cc: devicetree, linux-kernel, linux-arm-msm, linux-soc

Update the property names to match device tree bindings, the correct
values should be qcom,smem-states and qcom,smem-state-names.

Also update the #qcom,smem-state-cells for consistency, before we merge
any users of these properties.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt |  4 ++--
 Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt  |  4 ++--
 drivers/soc/qcom/smem_state.c                             | 12 ++++++------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt
index 5cc82b8353d8..af9ca37221ce 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt
@@ -68,7 +68,7 @@ important.
 	Value type: <u32>
 	Definition: must be 2 - denoting the bit in the entry and IRQ flags
 
-- #qcom,state-cells:
+- #qcom,smem-state-cells:
 	Usage: required for outgoing entries
 	Value type: <u32>
 	Definition: must be 1 - denoting the bit in the entry
@@ -92,7 +92,7 @@ wcnss-smp2p {
 	wcnss_smp2p_out: master-kernel {
 		qcom,entry-name = "master-kernel";
 
-		#qcom,state-cells = <1>;
+		#qcom,smem-state-cells = <1>;
 	};
 
 	wcnss_smp2p_in: slave-kernel {
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt
index a6634c70850d..2993b5a97dd6 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt
@@ -51,7 +51,7 @@ important.
 	Definition: specifies the offset, in words, of the first bit for this
 		    entry
 
-- #qcom,state-cells:
+- #qcom,smem-state-cells:
 	Usage: required for local entry
 	Value type: <u32>
 	Definition: must be 1 - denotes bit number
@@ -91,7 +91,7 @@ smsm {
 	apps_smsm: apps@0 {
 		reg = <0>;
 
-		#qcom,state-cells = <1>;
+		#qcom,smem-state-cells = <1>;
 	};
 
 	wcnss_smsm: wcnss@7 {
diff --git a/drivers/soc/qcom/smem_state.c b/drivers/soc/qcom/smem_state.c
index 54261decb369..d5437ca76ed9 100644
--- a/drivers/soc/qcom/smem_state.c
+++ b/drivers/soc/qcom/smem_state.c
@@ -104,26 +104,26 @@ struct qcom_smem_state *qcom_smem_state_get(struct device *dev,
 
 	if (con_id) {
 		index = of_property_match_string(dev->of_node,
-						 "qcom,state-names",
+						 "qcom,smem-state-names",
 						 con_id);
 		if (index < 0) {
-			dev_err(dev, "missing qcom,state-names\n");
+			dev_err(dev, "missing qcom,smem-state-names\n");
 			return ERR_PTR(index);
 		}
 	}
 
 	ret = of_parse_phandle_with_args(dev->of_node,
-					 "qcom,state",
-					 "#qcom,state-cells",
+					 "qcom,smem-states",
+					 "#qcom,smem-state-cells",
 					 index,
 					 &args);
 	if (ret) {
-		dev_err(dev, "failed to parse qcom,state property\n");
+		dev_err(dev, "failed to parse qcom,smem-states property\n");
 		return ERR_PTR(ret);
 	}
 
 	if (args.args_count != 1) {
-		dev_err(dev, "invalid #qcom,state-cells\n");
+		dev_err(dev, "invalid #qcom,smem-state-cells\n");
 		return ERR_PTR(-EINVAL);
 	}
 
-- 
2.5.0

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

* [PATCH v2] soc: qcom: Update properties for smem state referencing
  2016-06-10  4:11 [PATCH] soc: qcom: Update properties for smem state referencing Bjorn Andersson
@ 2016-06-10  5:26 ` Bjorn Andersson
  2016-06-10 17:58 ` [PATCH] " Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2016-06-10  5:26 UTC (permalink / raw)
  To: Rob Herring, Andy Gross
  Cc: devicetree, linux-kernel, linux-arm-msm, linux-soc

Update the property names to match device tree bindings, the correct
values should be qcom,smem-states and qcom,smem-state-names.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Realised that we already define the smp2p and smsm nodes in mainline, so don't
change the #qcom,state-cells property.

 drivers/soc/qcom/smem_state.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/smem_state.c b/drivers/soc/qcom/smem_state.c
index 54261decb369..4e4d5cd3b3cc 100644
--- a/drivers/soc/qcom/smem_state.c
+++ b/drivers/soc/qcom/smem_state.c
@@ -104,21 +104,21 @@ struct qcom_smem_state *qcom_smem_state_get(struct device *dev,
 
 	if (con_id) {
 		index = of_property_match_string(dev->of_node,
-						 "qcom,state-names",
+						 "qcom,smem-state-names",
 						 con_id);
 		if (index < 0) {
-			dev_err(dev, "missing qcom,state-names\n");
+			dev_err(dev, "missing qcom,smem-state-names\n");
 			return ERR_PTR(index);
 		}
 	}
 
 	ret = of_parse_phandle_with_args(dev->of_node,
-					 "qcom,state",
+					 "qcom,smem-states",
 					 "#qcom,state-cells",
 					 index,
 					 &args);
 	if (ret) {
-		dev_err(dev, "failed to parse qcom,state property\n");
+		dev_err(dev, "failed to parse qcom,smem-states property\n");
 		return ERR_PTR(ret);
 	}
 
-- 
2.5.0

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

* Re: [PATCH] soc: qcom: Update properties for smem state referencing
  2016-06-10  4:11 [PATCH] soc: qcom: Update properties for smem state referencing Bjorn Andersson
  2016-06-10  5:26 ` [PATCH v2] " Bjorn Andersson
@ 2016-06-10 17:58 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2016-06-10 17:58 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, devicetree, linux-kernel, linux-arm-msm, linux-soc

On Thu, Jun 09, 2016 at 09:11:22PM -0700, Bjorn Andersson wrote:
> Update the property names to match device tree bindings, the correct
> values should be qcom,smem-states and qcom,smem-state-names.
> 
> Also update the #qcom,smem-state-cells for consistency, before we merge
> any users of these properties.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt |  4 ++--
>  Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt  |  4 ++--

Acked-by: Rob Herring <robh@kernel.org>

>  drivers/soc/qcom/smem_state.c                             | 12 ++++++------
>  3 files changed, 10 insertions(+), 10 deletions(-)

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

end of thread, other threads:[~2016-06-10 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-10  4:11 [PATCH] soc: qcom: Update properties for smem state referencing Bjorn Andersson
2016-06-10  5:26 ` [PATCH v2] " Bjorn Andersson
2016-06-10 17:58 ` [PATCH] " Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).