linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the devicetree tree with the sound-asoc tree
@ 2017-06-14  2:54 Stephen Rothwell
  2017-06-14 13:55 ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2017-06-14  2:54 UTC (permalink / raw)
  To: Rob Herring, Mark Brown
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Kuninori Morimoto, Sakari Ailus

Hi all,

Today's linux-next merge of the devicetree tree got a conflict in:

  drivers/of/base.c

between commits:

  4c9c3d595f1b ("of_graph: add of_graph_get_remote_endpoint()")
  0ef472a973eb ("of_graph: add of_graph_get_port_parent()")
  ac1e6958d3be ("of_graph: add of_graph_get_endpoint_count()")

from the sound-asoc tree and commit:

  1df09bc66f9b ("of: Move OF property and graph API from base.c to property.c")

from the devicetree tree.

I fixed it up (I used the latter version of drivers/of/base.c and then
added the patch below) and can carry the fix as necessary. This is now
fixed as far as linux-next is concerned, but any non trivial conflicts
should be mentioned to your upstream maintainer when your tree is
submitted for merging.  You may also want to consider cooperating with
the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 14 Jun 2017 12:45:29 +1000
Subject: [PATCH] of_graph: merge fix up for creating of drivers/of/property.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/of/property.c | 60 ++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 50 insertions(+), 10 deletions(-)

diff --git a/drivers/of/property.c b/drivers/of/property.c
index 457c313a8924..07c7c36c5ca8 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -684,6 +684,41 @@ struct device_node *of_graph_get_endpoint_by_regs(
 EXPORT_SYMBOL(of_graph_get_endpoint_by_regs);
 
 /**
+ * of_graph_get_remote_endpoint() - get remote endpoint node
+ * @node: pointer to a local endpoint device_node
+ *
+ * Return: Remote endpoint node associated with remote endpoint node linked
+ *	   to @node. Use of_node_put() on it when done.
+ */
+struct device_node *of_graph_get_remote_endpoint(const struct device_node *node)
+{
+	/* Get remote endpoint node. */
+	return of_parse_phandle(node, "remote-endpoint", 0);
+}
+EXPORT_SYMBOL(of_graph_get_remote_endpoint);
+
+/**
+ * of_graph_get_port_parent() - get port's parent node
+ * @node: pointer to a local endpoint device_node
+ *
+ * Return: device node associated with endpoint node linked
+ *	   to @node. Use of_node_put() on it when done.
+ */
+struct device_node *of_graph_get_port_parent(struct device_node *node)
+{
+	unsigned int depth;
+
+	/* Walk 3 levels up only if there is 'ports' node. */
+	for (depth = 3; depth && node; depth--) {
+		node = of_get_next_parent(node);
+		if (depth == 2 && of_node_cmp(node->name, "ports"))
+			break;
+	}
+	return node;
+}
+EXPORT_SYMBOL(of_graph_get_port_parent);
+
+/**
  * of_graph_get_remote_port_parent() - get remote port's parent node
  * @node: pointer to a local endpoint device_node
  *
@@ -694,18 +729,11 @@ struct device_node *of_graph_get_remote_port_parent(
 			       const struct device_node *node)
 {
 	struct device_node *np;
-	unsigned int depth;
 
 	/* Get remote endpoint node. */
-	np = of_parse_phandle(node, "remote-endpoint", 0);
+	np = of_graph_get_remote_endpoint(node);
 
-	/* Walk 3 levels up only if there is 'ports' node. */
-	for (depth = 3; depth && np; depth--) {
-		np = of_get_next_parent(np);
-		if (depth == 2 && of_node_cmp(np->name, "ports"))
-			break;
-	}
-	return np;
+	return of_graph_get_port_parent(np);
 }
 EXPORT_SYMBOL(of_graph_get_remote_port_parent);
 
@@ -721,13 +749,25 @@ struct device_node *of_graph_get_remote_port(const struct device_node *node)
 	struct device_node *np;
 
 	/* Get remote endpoint node. */
-	np = of_parse_phandle(node, "remote-endpoint", 0);
+	np = of_graph_get_remote_endpoint(node);
 	if (!np)
 		return NULL;
 	return of_get_next_parent(np);
 }
 EXPORT_SYMBOL(of_graph_get_remote_port);
 
+int of_graph_get_endpoint_count(const struct device_node *np)
+{
+	struct device_node *endpoint;
+	int num = 0;
+
+	for_each_endpoint_of_node(np, endpoint)
+		num++;
+
+	return num;
+}
+EXPORT_SYMBOL(of_graph_get_endpoint_count);
+
 /**
  * of_graph_get_remote_node() - get remote parent device_node for given port/endpoint
  * @node: pointer to parent device_node containing graph port/endpoint
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: manual merge of the devicetree tree with the sound-asoc tree
  2017-06-14  2:54 linux-next: manual merge of the devicetree tree with the sound-asoc tree Stephen Rothwell
@ 2017-06-14 13:55 ` Rob Herring
  2017-06-14 14:30   ` Mark Brown
  2017-06-14 20:52   ` Sakari Ailus
  0 siblings, 2 replies; 6+ messages in thread
From: Rob Herring @ 2017-06-14 13:55 UTC (permalink / raw)
  To: Stephen Rothwell, Sakari Ailus
  Cc: Mark Brown, Linux-Next Mailing List, Linux Kernel Mailing List,
	Kuninori Morimoto

On Tue, Jun 13, 2017 at 9:54 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi all,
>
> Today's linux-next merge of the devicetree tree got a conflict in:
>
>   drivers/of/base.c
>
> between commits:
>
>   4c9c3d595f1b ("of_graph: add of_graph_get_remote_endpoint()")
>   0ef472a973eb ("of_graph: add of_graph_get_port_parent()")
>   ac1e6958d3be ("of_graph: add of_graph_get_endpoint_count()")
>
> from the sound-asoc tree and commit:
>
>   1df09bc66f9b ("of: Move OF property and graph API from base.c to property.c")
>
> from the devicetree tree.

Sakari, I forgot about these other changes and the resolution is more
complex than I want to pass on to Linus. Has the branch I provided
been pulled in (I guess not since this is the first I've seen of the
conflict)? We should drop the move for now and do it late in the merge
window or post -rc1. It can be after your other changes.

Rob

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

* Re: linux-next: manual merge of the devicetree tree with the sound-asoc tree
  2017-06-14 13:55 ` Rob Herring
@ 2017-06-14 14:30   ` Mark Brown
  2017-06-14 20:52   ` Sakari Ailus
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2017-06-14 14:30 UTC (permalink / raw)
  To: Rob Herring
  Cc: Stephen Rothwell, Sakari Ailus, Linux-Next Mailing List,
	Linux Kernel Mailing List, Kuninori Morimoto

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

On Wed, Jun 14, 2017 at 08:55:37AM -0500, Rob Herring wrote:

> Sakari, I forgot about these other changes and the resolution is more
> complex than I want to pass on to Linus. Has the branch I provided
> been pulled in (I guess not since this is the first I've seen of the
> conflict)? We should drop the move for now and do it late in the merge
> window or post -rc1. It can be after your other changes.

I can send you a pull request for the changes in my tree so you can do
the resolution if that helps?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: manual merge of the devicetree tree with the sound-asoc tree
  2017-06-14 13:55 ` Rob Herring
  2017-06-14 14:30   ` Mark Brown
@ 2017-06-14 20:52   ` Sakari Ailus
  1 sibling, 0 replies; 6+ messages in thread
From: Sakari Ailus @ 2017-06-14 20:52 UTC (permalink / raw)
  To: Rob Herring, Stephen Rothwell
  Cc: Mark Brown, Linux-Next Mailing List, Linux Kernel Mailing List,
	Kuninori Morimoto

Hi Rob,

Rob Herring wrote:
> On Tue, Jun 13, 2017 at 9:54 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> Hi all,
>>
>> Today's linux-next merge of the devicetree tree got a conflict in:
>>
>>   drivers/of/base.c
>>
>> between commits:
>>
>>   4c9c3d595f1b ("of_graph: add of_graph_get_remote_endpoint()")
>>   0ef472a973eb ("of_graph: add of_graph_get_port_parent()")
>>   ac1e6958d3be ("of_graph: add of_graph_get_endpoint_count()")
>>
>> from the sound-asoc tree and commit:
>>
>>   1df09bc66f9b ("of: Move OF property and graph API from base.c to property.c")
>>
>> from the devicetree tree.
>
> Sakari, I forgot about these other changes and the resolution is more
> complex than I want to pass on to Linus. Has the branch I provided
> been pulled in (I guess not since this is the first I've seen of the
> conflict)? We should drop the move for now and do it late in the merge
> window or post -rc1. It can be after your other changes.

Good that this came up now --- I was about to send a pull request to 
Rafael. :-) So no, nothing has been pulled yet that would have included 
the immutable branch you provided.

Regarding the fwnode cleanups through linux-pm on the dt/property-move 
branch --- I'm ok waiting for the next rc1.

After that I'd like to get them in for I have patches for media-tree (of 
which not all are mine) that in turn depend on the fwnode cleanups. 
There still have been surprisingly few conflicts so far.

-- 
Kind regards,

Sakari Ailus
sakari.ailus@linux.intel.com

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

* linux-next: manual merge of the devicetree tree with the sound-asoc tree
@ 2023-03-31  1:47 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2023-03-31  1:47 UTC (permalink / raw)
  To: Rob Herring, Mark Brown, Liam Girdwood
  Cc: Krzysztof Kozlowski, Linux Kernel Mailing List,
	Linux Next Mailing List, Rob Herring

[-- Attachment #1: Type: text/plain, Size: 853 bytes --]

Hi all,

Today's linux-next merge of the devicetree tree got a conflict in:

  Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml

between commit:

  cfad817095e1 ("ASoC: dt-bindings: qcom,lpass-va-macro: Add missing NPL clock")

from the sound-asoc tree and commit:

  d0dcd0ce8437 ("dt-bindings: yamllint: Require a space after a comment '#'")

from the devicetree tree.

I fixed it up (the former removed the text updated by the latter) and
can carry the fix as necessary. This is now fixed as far as linux-next
is concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: manual merge of the devicetree tree with the sound-asoc tree
@ 2023-03-28 23:32 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2023-03-28 23:32 UTC (permalink / raw)
  To: Rob Herring, Mark Brown, Liam Girdwood
  Cc: Krzysztof Kozlowski, Linux Kernel Mailing List,
	Linux Next Mailing List, Rob Herring

[-- Attachment #1: Type: text/plain, Size: 5019 bytes --]

Hi all,

Today's linux-next merge of the devicetree tree got conflicts in:

  Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml
  Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml

between commits:

  e4cf7805f084 ("ASoC: dt-bindings: qcom,lpass-rx-macro: narrow clocks per variants")
  bf4afbf95093 ("ASoC: dt-bindings: qcom,lpass-tx-macro: narrow clocks per variants")

from the sound-asoc tree and commit:

  d0dcd0ce8437 ("dt-bindings: yamllint: Require a space after a comment '#'")

from the devicetree tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml
index 78e462e2cdcf,e6fcf542cf87..000000000000
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml
@@@ -50,65 -61,6 +50,65 @@@ required
    - reg
    - "#sound-dai-cells"
  
 +allOf:
 +  - $ref: dai-common.yaml#
 +  - if:
 +      properties:
 +        compatible:
 +          enum:
 +            - qcom,sc7280-lpass-rx-macro
 +    then:
 +      properties:
 +        clock-names:
 +          oneOf:
-             - items:   #for ADSP based platforms
++            - items:   # for ADSP based platforms
 +                - const: mclk
 +                - const: npl
 +                - const: macro
 +                - const: dcodec
 +                - const: fsgen
-             - items:   #for ADSP bypass based platforms
++            - items:   # for ADSP bypass based platforms
 +                - const: mclk
 +                - const: npl
 +                - const: fsgen
 +
 +  - if:
 +      properties:
 +        compatible:
 +          enum:
 +            - qcom,sc8280xp-lpass-rx-macro
 +            - qcom,sm8250-lpass-rx-macro
 +            - qcom,sm8450-lpass-rx-macro
 +    then:
 +      properties:
 +        clocks:
 +          minItems: 5
 +          maxItems: 5
 +        clock-names:
 +          items:
 +            - const: mclk
 +            - const: npl
 +            - const: macro
 +            - const: dcodec
 +            - const: fsgen
 +
 +  - if:
 +      properties:
 +        compatible:
 +          enum:
 +            - qcom,sm8550-lpass-rx-macro
 +    then:
 +      properties:
 +        clocks:
 +          minItems: 4
 +          maxItems: 4
 +        clock-names:
 +          items:
 +            - const: mclk
 +            - const: macro
 +            - const: dcodec
 +            - const: fsgen
 +
  unevaluatedProperties: false
  
  examples:
diff --cc Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
index 9d6e67524daf,6c8751497d36..000000000000
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
@@@ -55,65 -67,6 +55,65 @@@ required
    - reg
    - "#sound-dai-cells"
  
 +allOf:
 +  - $ref: dai-common.yaml#
 +  - if:
 +      properties:
 +        compatible:
 +          enum:
 +            - qcom,sc7280-lpass-tx-macro
 +    then:
 +      properties:
 +        clock-names:
 +          oneOf:
-             - items:   #for ADSP based platforms
++            - items:   # for ADSP based platforms
 +                - const: mclk
 +                - const: npl
 +                - const: macro
 +                - const: dcodec
 +                - const: fsgen
-             - items:   #for ADSP bypass based platforms
++            - items:   # for ADSP bypass based platforms
 +                - const: mclk
 +                - const: npl
 +                - const: fsgen
 +
 +  - if:
 +      properties:
 +        compatible:
 +          enum:
 +            - qcom,sc8280xp-lpass-tx-macro
 +            - qcom,sm8250-lpass-tx-macro
 +            - qcom,sm8450-lpass-tx-macro
 +    then:
 +      properties:
 +        clocks:
 +          minItems: 5
 +          maxItems: 5
 +        clock-names:
 +          items:
 +            - const: mclk
 +            - const: npl
 +            - const: macro
 +            - const: dcodec
 +            - const: fsgen
 +
 +  - if:
 +      properties:
 +        compatible:
 +          enum:
 +            - qcom,sm8550-lpass-tx-macro
 +    then:
 +      properties:
 +        clocks:
 +          minItems: 4
 +          maxItems: 4
 +        clock-names:
 +          items:
 +            - const: mclk
 +            - const: macro
 +            - const: dcodec
 +            - const: fsgen
 +
  unevaluatedProperties: false
  
  examples:

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2023-03-31  1:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14  2:54 linux-next: manual merge of the devicetree tree with the sound-asoc tree Stephen Rothwell
2017-06-14 13:55 ` Rob Herring
2017-06-14 14:30   ` Mark Brown
2017-06-14 20:52   ` Sakari Ailus
2023-03-28 23:32 Stephen Rothwell
2023-03-31  1:47 Stephen Rothwell

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).