devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] .gitattributes: Use 'dts' diff driver for dts files
@ 2019-10-04 21:23 Stephen Boyd
  2019-10-04 22:08 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2019-10-04 21:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Rob Herring, Frank Rowand, devicetree

Git is gaining support to display the closest node to the diff in the
hunk header via the 'dts' diff driver. Use that driver for all dts and
dtsi files so we can gain some more context on where the diff is. Taking
a recent commit in the kernel dts files you can see the difference.

With this patch and an updated git

 diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
 index 62e07e1197cc..4c38426a6969 100644
 --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
 +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
 @@ -289,5 +289,29 @@ vdd_hdmi: regulator@1 {
                         gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>;
                         enable-active-high;
                 };
 +
 +               vdd_3v3_pcie: regulator@2 {
 +                       compatible = "regulator-fixed";

vs. without this patch

 diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
 index 62e07e1197cc..4c38426a6969 100644
 --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
 +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
 @@ -289,5 +289,29 @@
                         gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>;
                         enable-active-high;
                 };
 +
 +               vdd_3v3_pcie: regulator@2 {
 +                       compatible = "regulator-fixed";

You can see that we don't know what the context node is because it isn't shown
after the '@@'.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---

Sending to Andrew but I suppose it can go through dt tree too.

 .gitattributes | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitattributes b/.gitattributes
index 89c411b5ce6b..4b32eaa9571e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,4 @@
 *.c   diff=cpp
 *.h   diff=cpp
+*.dtsi diff=dts
+*.dts  diff=dts
-- 
Sent by a computer through tubes

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

* Re: [PATCH] .gitattributes: Use 'dts' diff driver for dts files
  2019-10-04 21:23 [PATCH] .gitattributes: Use 'dts' diff driver for dts files Stephen Boyd
@ 2019-10-04 22:08 ` Randy Dunlap
  2019-10-04 23:50   ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2019-10-04 22:08 UTC (permalink / raw)
  To: Stephen Boyd, Andrew Morton
  Cc: linux-kernel, Rob Herring, Frank Rowand, devicetree

On 10/4/19 2:23 PM, Stephen Boyd wrote:
> Git is gaining support to display the closest node to the diff in the
> hunk header via the 'dts' diff driver. Use that driver for all dts and
> dtsi files so we can gain some more context on where the diff is. Taking
> a recent commit in the kernel dts files you can see the difference.
> 
> With this patch and an updated git
> 
>  diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
>  index 62e07e1197cc..4c38426a6969 100644
>  --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
>  +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
>  @@ -289,5 +289,29 @@ vdd_hdmi: regulator@1 {
>                          gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>;
>                          enable-active-high;
>                  };
>  +
>  +               vdd_3v3_pcie: regulator@2 {
>  +                       compatible = "regulator-fixed";
> 
> vs. without this patch
> 
>  diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
>  index 62e07e1197cc..4c38426a6969 100644
>  --- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
>  +++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
>  @@ -289,5 +289,29 @@
>                          gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>;
>                          enable-active-high;
>                  };
>  +
>  +               vdd_3v3_pcie: regulator@2 {
>  +                       compatible = "regulator-fixed";
> 
> You can see that we don't know what the context node is because it isn't shown
> after the '@@'.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: <devicetree@vger.kernel.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
> 
> Sending to Andrew but I suppose it can go through dt tree too.
> 
>  .gitattributes | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/.gitattributes b/.gitattributes
> index 89c411b5ce6b..4b32eaa9571e 100644
> --- a/.gitattributes
> +++ b/.gitattributes
> @@ -1,2 +1,4 @@
>  *.c   diff=cpp
>  *.h   diff=cpp
> +*.dtsi diff=dts
> +*.dts  diff=dts
> 

Hm, I have a "cpp" installed but not a "dts".
Where would I find this "dts" so that I can install it?

Thanks.
-- 
~Randy

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

* Re: [PATCH] .gitattributes: Use 'dts' diff driver for dts files
  2019-10-04 22:08 ` Randy Dunlap
@ 2019-10-04 23:50   ` Stephen Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2019-10-04 23:50 UTC (permalink / raw)
  To: Andrew Morton, Randy Dunlap
  Cc: linux-kernel, Rob Herring, Frank Rowand, devicetree

Quoting Randy Dunlap (2019-10-04 15:08:08)
> On 10/4/19 2:23 PM, Stephen Boyd wrote:
> > 
> > diff --git a/.gitattributes b/.gitattributes
> > index 89c411b5ce6b..4b32eaa9571e 100644
> > --- a/.gitattributes
> > +++ b/.gitattributes
> > @@ -1,2 +1,4 @@
> >  *.c   diff=cpp
> >  *.h   diff=cpp
> > +*.dtsi diff=dts
> > +*.dts  diff=dts
> > 
> 
> Hm, I have a "cpp" installed but not a "dts".
> Where would I find this "dts" so that I can install it?
> 

It's not released yet but it is staged to be in the next release[1]. You
can probably build git from source and try it out if you're interested.

[1] https://git.kernel.org/pub/scm/git/git.git/commit/?id=d49c2c3466d2c8cb0b3d0a43e6b406b07078fdb1

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

end of thread, other threads:[~2019-10-04 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 21:23 [PATCH] .gitattributes: Use 'dts' diff driver for dts files Stephen Boyd
2019-10-04 22:08 ` Randy Dunlap
2019-10-04 23:50   ` Stephen Boyd

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