* [PATCH] drm/tegra: Clean up GPIO includes
@ 2020-04-15 12:24 Linus Walleij
[not found] ` <20200415122427.111769-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2020-04-15 12:24 UTC (permalink / raw)
To: Thierry Reding
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA, Linus Walleij
The Tegra DRM drivers includes the legacy GPIO headers
<linux/gpio.h> and <linux/of_gpio.h> but what it really
uses is <linux/gpio/consumer.h> since only gpio_desc
structs are ever referenced.
Include the right header on the top level tegra/drm.h
file and drop all the surplus includes.
Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/gpu/drm/tegra/dpaux.c | 2 --
drivers/gpu/drm/tegra/drm.h | 2 +-
drivers/gpu/drm/tegra/hdmi.c | 1 -
drivers/gpu/drm/tegra/sor.c | 1 -
4 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
index 7dfb50f65067..105fb9cdbb3b 100644
--- a/drivers/gpu/drm/tegra/dpaux.c
+++ b/drivers/gpu/drm/tegra/dpaux.c
@@ -5,12 +5,10 @@
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_device.h>
-#include <linux/of_gpio.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index ed99b67deb29..bf0512177e8f 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -9,7 +9,7 @@
#include <linux/host1x.h>
#include <linux/iova.h>
-#include <linux/of_gpio.h>
+#include <linux/gpio/consumer.h>
#include <drm/drm_atomic.h>
#include <drm/drm_edid.h>
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index 38252c0f068d..94fb0193fa3d 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -7,7 +7,6 @@
#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
#include <linux/hdmi.h>
#include <linux/math64.h>
#include <linux/module.h>
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 81226a4953c1..b010826e86da 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -6,7 +6,6 @@
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/debugfs.h>
-#include <linux/gpio.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_device.h>
--
2.25.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tegra: Clean up GPIO includes
[not found] ` <20200415122427.111769-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2020-04-15 12:43 ` Daniel Vetter
2020-04-21 22:15 ` Thierry Reding
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2020-04-15 12:43 UTC (permalink / raw)
To: Linus Walleij
Cc: Thierry Reding, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Wed, Apr 15, 2020 at 02:24:27PM +0200, Linus Walleij wrote:
> The Tegra DRM drivers includes the legacy GPIO headers
> <linux/gpio.h> and <linux/of_gpio.h> but what it really
> uses is <linux/gpio/consumer.h> since only gpio_desc
> structs are ever referenced.
>
> Include the right header on the top level tegra/drm.h
> file and drop all the surplus includes.
>
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Hm, I wonder whether we should do similar splits for drm_bridge and
drm_panel, so that drivers don't pick the wrong interfaces ...
Anyway this looks neat, I spent a bit of time looking at how this is done,
fwiw (not much) and assuming it compiles:
Acked-by: Daniel Vetter <daniel.vetter-/w4YWyX8dFk@public.gmane.org>
> ---
> drivers/gpu/drm/tegra/dpaux.c | 2 --
> drivers/gpu/drm/tegra/drm.h | 2 +-
> drivers/gpu/drm/tegra/hdmi.c | 1 -
> drivers/gpu/drm/tegra/sor.c | 1 -
> 4 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
> index 7dfb50f65067..105fb9cdbb3b 100644
> --- a/drivers/gpu/drm/tegra/dpaux.c
> +++ b/drivers/gpu/drm/tegra/dpaux.c
> @@ -5,12 +5,10 @@
>
> #include <linux/clk.h>
> #include <linux/delay.h>
> -#include <linux/gpio.h>
> #include <linux/interrupt.h>
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
> -#include <linux/of_gpio.h>
> #include <linux/pinctrl/pinconf-generic.h>
> #include <linux/pinctrl/pinctrl.h>
> #include <linux/pinctrl/pinmux.h>
> diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
> index ed99b67deb29..bf0512177e8f 100644
> --- a/drivers/gpu/drm/tegra/drm.h
> +++ b/drivers/gpu/drm/tegra/drm.h
> @@ -9,7 +9,7 @@
>
> #include <linux/host1x.h>
> #include <linux/iova.h>
> -#include <linux/of_gpio.h>
> +#include <linux/gpio/consumer.h>
>
> #include <drm/drm_atomic.h>
> #include <drm/drm_edid.h>
> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
> index 38252c0f068d..94fb0193fa3d 100644
> --- a/drivers/gpu/drm/tegra/hdmi.c
> +++ b/drivers/gpu/drm/tegra/hdmi.c
> @@ -7,7 +7,6 @@
> #include <linux/clk.h>
> #include <linux/debugfs.h>
> #include <linux/delay.h>
> -#include <linux/gpio.h>
> #include <linux/hdmi.h>
> #include <linux/math64.h>
> #include <linux/module.h>
> diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> index 81226a4953c1..b010826e86da 100644
> --- a/drivers/gpu/drm/tegra/sor.c
> +++ b/drivers/gpu/drm/tegra/sor.c
> @@ -6,7 +6,6 @@
> #include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/debugfs.h>
> -#include <linux/gpio.h>
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
> --
> 2.25.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tegra: Clean up GPIO includes
[not found] ` <20200415122427.111769-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2020-04-15 12:43 ` Daniel Vetter
@ 2020-04-21 22:15 ` Thierry Reding
2020-04-22 15:25 ` Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2020-04-21 22:15 UTC (permalink / raw)
To: Linus Walleij
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]
On Wed, Apr 15, 2020 at 02:24:27PM +0200, Linus Walleij wrote:
> The Tegra DRM drivers includes the legacy GPIO headers
> <linux/gpio.h> and <linux/of_gpio.h> but what it really
> uses is <linux/gpio/consumer.h> since only gpio_desc
> structs are ever referenced.
>
> Include the right header on the top level tegra/drm.h
> file and drop all the surplus includes.
>
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> drivers/gpu/drm/tegra/dpaux.c | 2 --
> drivers/gpu/drm/tegra/drm.h | 2 +-
> drivers/gpu/drm/tegra/hdmi.c | 1 -
> drivers/gpu/drm/tegra/sor.c | 1 -
> 4 files changed, 1 insertion(+), 5 deletions(-)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tegra: Clean up GPIO includes
2020-04-21 22:15 ` Thierry Reding
@ 2020-04-22 15:25 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2020-04-22 15:25 UTC (permalink / raw)
To: Thierry Reding
Cc: open list:DRM PANEL DRIVERS, linux-tegra-u79uwXL29TY76Z2rM5mHXA
On Wed, Apr 22, 2020 at 12:15 AM Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Wed, Apr 15, 2020 at 02:24:27PM +0200, Linus Walleij wrote:
> > The Tegra DRM drivers includes the legacy GPIO headers
> > <linux/gpio.h> and <linux/of_gpio.h> but what it really
> > uses is <linux/gpio/consumer.h> since only gpio_desc
> > structs are ever referenced.
> >
> > Include the right header on the top level tegra/drm.h
> > file and drop all the surplus includes.
> >
> > Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > ---
> > drivers/gpu/drm/tegra/dpaux.c | 2 --
> > drivers/gpu/drm/tegra/drm.h | 2 +-
> > drivers/gpu/drm/tegra/hdmi.c | 1 -
> > drivers/gpu/drm/tegra/sor.c | 1 -
> > 4 files changed, 1 insertion(+), 5 deletions(-)
>
> Applied, thanks.
I think I already applied it to the drm misc tree the other day,
sorry if that wasn't clear. If tegra has a separate tree I suppose
git will figure it all out in the end.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-22 15:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-15 12:24 [PATCH] drm/tegra: Clean up GPIO includes Linus Walleij
[not found] ` <20200415122427.111769-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2020-04-15 12:43 ` Daniel Vetter
2020-04-21 22:15 ` Thierry Reding
2020-04-22 15:25 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox