diff mbox series

[v2,47/67] media: platform: rename sunxi/ to allwinner/

Message ID 85266b480902079391d4206b8aa276ff131a730f.1647274407.git.mchehab@kernel.org (mailing list archive)
State New, archived
Headers show
Series media: Kconfig/Makefile reorg | expand

Commit Message

Mauro Carvalho Chehab March 14, 2022, 4:34 p.m. UTC
As the end goal is to have platform drivers split by vendor,
rename sunxi/ to allwinner/.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH v2 00/67] at: https://lore.kernel.org/all/cover.1647274406.git.mchehab@kernel.org/

 MAINTAINERS                                               | 8 ++++----
 drivers/media/platform/Kconfig                            | 2 +-
 drivers/media/platform/Makefile                           | 2 +-
 drivers/media/platform/allwinner/Kconfig                  | 6 ++++++
 drivers/media/platform/{sunxi => allwinner}/Makefile      | 0
 .../media/platform/{sunxi => allwinner}/sun4i-csi/Kconfig | 0
 .../platform/{sunxi => allwinner}/sun4i-csi/Makefile      | 0
 .../platform/{sunxi => allwinner}/sun4i-csi/sun4i_csi.c   | 0
 .../platform/{sunxi => allwinner}/sun4i-csi/sun4i_csi.h   | 0
 .../platform/{sunxi => allwinner}/sun4i-csi/sun4i_dma.c   | 0
 .../platform/{sunxi => allwinner}/sun4i-csi/sun4i_v4l2.c  | 0
 .../media/platform/{sunxi => allwinner}/sun6i-csi/Kconfig | 0
 .../platform/{sunxi => allwinner}/sun6i-csi/Makefile      | 0
 .../platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi.c   | 0
 .../platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi.h   | 0
 .../{sunxi => allwinner}/sun6i-csi/sun6i_csi_reg.h        | 0
 .../platform/{sunxi => allwinner}/sun6i-csi/sun6i_video.c | 0
 .../platform/{sunxi => allwinner}/sun6i-csi/sun6i_video.h | 0
 .../media/platform/{sunxi => allwinner}/sun8i-di/Kconfig  | 0
 .../media/platform/{sunxi => allwinner}/sun8i-di/Makefile | 0
 .../platform/{sunxi => allwinner}/sun8i-di/sun8i-di.c     | 0
 .../platform/{sunxi => allwinner}/sun8i-di/sun8i-di.h     | 0
 .../platform/{sunxi => allwinner}/sun8i-rotate/Kconfig    | 0
 .../platform/{sunxi => allwinner}/sun8i-rotate/Makefile   | 0
 .../{sunxi => allwinner}/sun8i-rotate/sun8i-formats.h     | 0
 .../{sunxi => allwinner}/sun8i-rotate/sun8i-rotate.h      | 0
 .../{sunxi => allwinner}/sun8i-rotate/sun8i_formats.c     | 0
 .../{sunxi => allwinner}/sun8i-rotate/sun8i_rotate.c      | 0
 drivers/media/platform/sunxi/Kconfig                      | 6 ------
 29 files changed, 12 insertions(+), 12 deletions(-)
 create mode 100644 drivers/media/platform/allwinner/Kconfig
 rename drivers/media/platform/{sunxi => allwinner}/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/Kconfig (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_csi.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_csi.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_dma.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun4i-csi/sun4i_v4l2.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/Kconfig (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_csi_reg.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_video.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun6i-csi/sun6i_video.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/Kconfig (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/sun8i-di.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-di/sun8i-di.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/Kconfig (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/Makefile (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i-formats.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i-rotate.h (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i_formats.c (100%)
 rename drivers/media/platform/{sunxi => allwinner}/sun8i-rotate/sun8i_rotate.c (100%)
 delete mode 100644 drivers/media/platform/sunxi/Kconfig

Comments

Jernej Škrabec March 14, 2022, 5:22 p.m. UTC | #1
Dne ponedeljek, 14. marec 2022 ob 17:34:42 CET je Mauro Carvalho Chehab 
napisal(a):
> As the end goal is to have platform drivers split by vendor,
> rename sunxi/ to allwinner/.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

I would rather not do that. Everything related to Allwinner is called sunxi, 
albeit there are a few outliers. This is similar to Amlogic/meson situation.

Best regards,
Jernej
Mauro Carvalho Chehab March 15, 2022, 5:40 a.m. UTC | #2
Em Mon, 14 Mar 2022 18:22:20 +0100
Jernej Škrabec <jernej.skrabec@gmail.com> escreveu:

> Dne ponedeljek, 14. marec 2022 ob 17:34:42 CET je Mauro Carvalho Chehab 
> napisal(a):
> > As the end goal is to have platform drivers split by vendor,
> > rename sunxi/ to allwinner/.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>  
> 
> I would rather not do that. Everything related to Allwinner is called sunxi, 
> albeit there are a few outliers. This is similar to Amlogic/meson situation.

The rationale of having one directory per manufacturer is that, if drivers
for newer platforms with different names from the same manufacturers are 
added, those will still fit under allwinner/ and amlogic/.

The Kconfig names for sunxi and meson didn't change, nor the driver's name. 
Also, the directories under allwinner preserve sun<x>i name on them:

	drivers/media/platform/allwinner/
	├── sun4i-csi
	├── sun6i-csi
	├── sun8i-di
	└── sun8i-rotate

and so the directory under amlogic/:

	drivers/media/platform/amlogic/
	└── meson-ge2d

Now, if Allinner decides to release a new platforms named after another star,
let's say, "Vega" and "Rigel", it would be just a matter of adding 
"vega/" and "rigel/" directories under allwinner. No need to touch
media/platform/Kconfig and media/platform/Makefile. Everything will happen
on much more smaller vendor-specific Kconfig/Makefile.

See for instance, TI. We had initially a single driver, and everywhere it
was called "omap", which was had gained different versions (omap2, omap3, 
...). Then, TI decided to use other names for newer IP (davinci, am437x), 
and now the current development is at cal and vpe.

If we had placed a ti/ directory by the time omap were added (and the
same for the other vendors), we would have avoided the need of this
reorg.

Thanks,
Mauro
Laurent Pinchart March 15, 2022, 6:54 a.m. UTC | #3
Hi Mauro,

On Tue, Mar 15, 2022 at 06:40:05AM +0100, Mauro Carvalho Chehab wrote:
> Em Mon, 14 Mar 2022 18:22:20 +0100 Jernej Škrabec escreveu:
> 
> > Dne ponedeljek, 14. marec 2022 ob 17:34:42 CET je Mauro Carvalho Chehab 
> > napisal(a):
> > > As the end goal is to have platform drivers split by vendor,
> > > rename sunxi/ to allwinner/.
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>  
> > 
> > I would rather not do that. Everything related to Allwinner is called sunxi, 
> > albeit there are a few outliers. This is similar to Amlogic/meson situation.
> 
> The rationale of having one directory per manufacturer is that, if drivers
> for newer platforms with different names from the same manufacturers are 
> added, those will still fit under allwinner/ and amlogic/.
> 
> The Kconfig names for sunxi and meson didn't change, nor the driver's name. 
> Also, the directories under allwinner preserve sun<x>i name on them:
> 
> 	drivers/media/platform/allwinner/
> 	├── sun4i-csi
> 	├── sun6i-csi
> 	├── sun8i-di
> 	└── sun8i-rotate
> 
> and so the directory under amlogic/:
> 
> 	drivers/media/platform/amlogic/
> 	└── meson-ge2d
> 
> Now, if Allinner decides to release a new platforms named after another star,
> let's say, "Vega" and "Rigel", it would be just a matter of adding 
> "vega/" and "rigel/" directories under allwinner. No need to touch
> media/platform/Kconfig and media/platform/Makefile. Everything will happen
> on much more smaller vendor-specific Kconfig/Makefile.

But the day Allwinner changes its name to Noloser, we'll have a similar
problem. Thnk about Freescale vs. NXP, or Altera bought by Intel. No
naming scheme is totally future-proof. If the accepted standard through
the kernel is to use sunxi to refer to Allwinner SoCs, I don't think
it's a bit idea to go with that.

> See for instance, TI. We had initially a single driver, and everywhere it
> was called "omap", which was had gained different versions (omap2, omap3, 
> ...). Then, TI decided to use other names for newer IP (davinci, am437x), 
> and now the current development is at cal and vpe.
> 
> If we had placed a ti/ directory by the time omap were added (and the
> same for the other vendors), we would have avoided the need of this
> reorg.
Mauro Carvalho Chehab March 15, 2022, 8:27 a.m. UTC | #4
Em Tue, 15 Mar 2022 08:54:25 +0200
Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:

> Hi Mauro,
> 
> On Tue, Mar 15, 2022 at 06:40:05AM +0100, Mauro Carvalho Chehab wrote:
> > Em Mon, 14 Mar 2022 18:22:20 +0100 Jernej Škrabec escreveu:
> >   
> > > Dne ponedeljek, 14. marec 2022 ob 17:34:42 CET je Mauro Carvalho Chehab 
> > > napisal(a):  
> > > > As the end goal is to have platform drivers split by vendor,
> > > > rename sunxi/ to allwinner/.
> > > > 
> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>    
> > > 
> > > I would rather not do that. Everything related to Allwinner is called sunxi, 
> > > albeit there are a few outliers. This is similar to Amlogic/meson situation.  
> > 
> > The rationale of having one directory per manufacturer is that, if drivers
> > for newer platforms with different names from the same manufacturers are 
> > added, those will still fit under allwinner/ and amlogic/.
> > 
> > The Kconfig names for sunxi and meson didn't change, nor the driver's name. 
> > Also, the directories under allwinner preserve sun<x>i name on them:
> > 
> > 	drivers/media/platform/allwinner/
> > 	├── sun4i-csi
> > 	├── sun6i-csi
> > 	├── sun8i-di
> > 	└── sun8i-rotate
> > 
> > and so the directory under amlogic/:
> > 
> > 	drivers/media/platform/amlogic/
> > 	└── meson-ge2d
> > 
> > Now, if Allinner decides to release a new platforms named after another star,
> > let's say, "Vega" and "Rigel", it would be just a matter of adding 
> > "vega/" and "rigel/" directories under allwinner. No need to touch
> > media/platform/Kconfig and media/platform/Makefile. Everything will happen
> > on much more smaller vendor-specific Kconfig/Makefile.  
> 
> But the day Allwinner changes its name to Noloser, we'll have a similar
> problem. 

Not really. It will still be a single directory per vendor (whatever
name it is).

> Thnk about Freescale vs. NXP, or Altera bought by Intel.

Yeah, when some drivers move from one vendor to another one that
already exists there, we should probably move the directories, in
order to keep things well organized.

The worse case scenario is really if, let's say, TI decides to sell their
omap architecture to NXP, keeping the rest. On such case, the best would
be to move platform/ti/omap* to the directory of its newer owner.

That's said, when things like that happen, there are usually a change
at MAINTAINERS, as e-mails, mailing lists and contact people will
likely change. So, this will very likely generate patches anyway.

> No
> naming scheme is totally future-proof. If the accepted standard through
> the kernel is to use sunxi to refer to Allwinner SoCs, I don't think
> it's a bit idea to go with that.

I'm not too concerned about the name here, but rather about the
process. Needing to do reorg like this is painful, as it causes 
all pending work to fail merging against upstream, requiring rebases.
So, we should avoid needing to re-do it by trying our best to avoid
the need of another global change like that in the future.

By organizing entries per vendor, while we may need to do puntual
per-vendor adjustments when they rename and change IP with other
vendors, the global platform Kconfig/Make will contain a single entry
per vendor. I can't foresee any need to change this in the future,
if we take care of keeping the entries there properly sorted.

With regards to naming the per-vendor directory, while I do prefer to have
the  directories named after the vendor, and not after a vendor's nick 
name, It should also be ok to use a vendor's nick name, provided that 
such name is meant to be used by all their current and future IP.

Not sure if "sunxi" is actually a vendor's nick name. It sounds
much likely that it is, instead, a brand name that covers their 
current media-related SoC. 

Can someone from the vendor shed a light on it?

Thanks,
Mauro
Laurent Pinchart March 15, 2022, 8:35 a.m. UTC | #5
On Tue, Mar 15, 2022 at 09:27:36AM +0100, Mauro Carvalho Chehab wrote:
> Em Tue, 15 Mar 2022 08:54:25 +0200
> Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:
> 
> > Hi Mauro,
> > 
> > On Tue, Mar 15, 2022 at 06:40:05AM +0100, Mauro Carvalho Chehab wrote:
> > > Em Mon, 14 Mar 2022 18:22:20 +0100 Jernej Škrabec escreveu:
> > >   
> > > > Dne ponedeljek, 14. marec 2022 ob 17:34:42 CET je Mauro Carvalho Chehab 
> > > > napisal(a):  
> > > > > As the end goal is to have platform drivers split by vendor,
> > > > > rename sunxi/ to allwinner/.
> > > > > 
> > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>    
> > > > 
> > > > I would rather not do that. Everything related to Allwinner is called sunxi, 
> > > > albeit there are a few outliers. This is similar to Amlogic/meson situation.  
> > > 
> > > The rationale of having one directory per manufacturer is that, if drivers
> > > for newer platforms with different names from the same manufacturers are 
> > > added, those will still fit under allwinner/ and amlogic/.
> > > 
> > > The Kconfig names for sunxi and meson didn't change, nor the driver's name. 
> > > Also, the directories under allwinner preserve sun<x>i name on them:
> > > 
> > > 	drivers/media/platform/allwinner/
> > > 	├── sun4i-csi
> > > 	├── sun6i-csi
> > > 	├── sun8i-di
> > > 	└── sun8i-rotate
> > > 
> > > and so the directory under amlogic/:
> > > 
> > > 	drivers/media/platform/amlogic/
> > > 	└── meson-ge2d
> > > 
> > > Now, if Allinner decides to release a new platforms named after another star,
> > > let's say, "Vega" and "Rigel", it would be just a matter of adding 
> > > "vega/" and "rigel/" directories under allwinner. No need to touch
> > > media/platform/Kconfig and media/platform/Makefile. Everything will happen
> > > on much more smaller vendor-specific Kconfig/Makefile.  
> > 
> > But the day Allwinner changes its name to Noloser, we'll have a similar
> > problem. 
> 
> Not really. It will still be a single directory per vendor (whatever
> name it is).
> 
> > Thnk about Freescale vs. NXP, or Altera bought by Intel.
> 
> Yeah, when some drivers move from one vendor to another one that
> already exists there, we should probably move the directories, in
> order to keep things well organized.

I'm not sure we should. We still have arch/arm64/boot/dts/freescale/ for
instance. We can answer that question later though, when confronted with
the situation.

> The worse case scenario is really if, let's say, TI decides to sell their
> omap architecture to NXP, keeping the rest. On such case, the best would
> be to move platform/ti/omap* to the directory of its newer owner.
> 
> That's said, when things like that happen, there are usually a change
> at MAINTAINERS, as e-mails, mailing lists and contact people will
> likely change. So, this will very likely generate patches anyway.
> 
> > No
> > naming scheme is totally future-proof. If the accepted standard through
> > the kernel is to use sunxi to refer to Allwinner SoCs, I don't think
> > it's a bit idea to go with that.
> 
> I'm not too concerned about the name here, but rather about the
> process. Needing to do reorg like this is painful, as it causes 
> all pending work to fail merging against upstream, requiring rebases.
> So, we should avoid needing to re-do it by trying our best to avoid
> the need of another global change like that in the future.

Most of the pain we'll go through in the immediate future comes from the
fact that we never really cared about this. I think renames (of vendors
or product lines) will be infrequent enough that picking sunxi for
Allwinner drivers wouldn't be an issue.

There's a similar think with Renesas, which had an SH product line and
then moved to ARM, creating R-Mobile and R-Car (among other product
liens). That's why we still have drivers/dma/sh/ for Renesas DMA
drivers.

> By organizing entries per vendor, while we may need to do puntual
> per-vendor adjustments when they rename and change IP with other
> vendors, the global platform Kconfig/Make will contain a single entry
> per vendor. I can't foresee any need to change this in the future,
> if we take care of keeping the entries there properly sorted.
> 
> With regards to naming the per-vendor directory, while I do prefer to have
> the  directories named after the vendor, and not after a vendor's nick 
> name, It should also be ok to use a vendor's nick name, provided that 
> such name is meant to be used by all their current and future IP.
> 
> Not sure if "sunxi" is actually a vendor's nick name. It sounds
> much likely that it is, instead, a brand name that covers their 
> current media-related SoC. 
> 
> Can someone from the vendor shed a light on it?

Maybe we can let the Allwinner upstream community tell us what name to
pick ? I'm sure they know better than us :-)
Jernej Škrabec March 15, 2022, 6:04 p.m. UTC | #6
Dne torek, 15. marec 2022 ob 09:35:05 CET je Laurent Pinchart napisal(a):
> On Tue, Mar 15, 2022 at 09:27:36AM +0100, Mauro Carvalho Chehab wrote:
> > Em Tue, 15 Mar 2022 08:54:25 +0200
> > Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:
> > 
> > > Hi Mauro,
> > > 
> > > On Tue, Mar 15, 2022 at 06:40:05AM +0100, Mauro Carvalho Chehab wrote:
> > > > Em Mon, 14 Mar 2022 18:22:20 +0100 Jernej Škrabec escreveu:
> > > >   
> > > > > Dne ponedeljek, 14. marec 2022 ob 17:34:42 CET je Mauro Carvalho 
Chehab 
> > > > > napisal(a):  
> > > > > > As the end goal is to have platform drivers split by vendor,
> > > > > > rename sunxi/ to allwinner/.
> > > > > > 
> > > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>    
> > > > > 
> > > > > I would rather not do that. Everything related to Allwinner is 
called sunxi, 
> > > > > albeit there are a few outliers. This is similar to Amlogic/meson 
situation.  
> > > > 
> > > > The rationale of having one directory per manufacturer is that, if 
drivers
> > > > for newer platforms with different names from the same manufacturers 
are 
> > > > added, those will still fit under allwinner/ and amlogic/.
> > > > 
> > > > The Kconfig names for sunxi and meson didn't change, nor the driver's 
name. 
> > > > Also, the directories under allwinner preserve sun<x>i name on them:
> > > > 
> > > > 	drivers/media/platform/allwinner/
> > > > 	├── sun4i-csi
> > > > 	├── sun6i-csi
> > > > 	├── sun8i-di
> > > > 	└── sun8i-rotate
> > > > 
> > > > and so the directory under amlogic/:
> > > > 
> > > > 	drivers/media/platform/amlogic/
> > > > 	└── meson-ge2d
> > > > 
> > > > Now, if Allinner decides to release a new platforms named after 
another star,
> > > > let's say, "Vega" and "Rigel", it would be just a matter of adding 
> > > > "vega/" and "rigel/" directories under allwinner. No need to touch
> > > > media/platform/Kconfig and media/platform/Makefile. Everything will 
happen
> > > > on much more smaller vendor-specific Kconfig/Makefile.  
> > > 
> > > But the day Allwinner changes its name to Noloser, we'll have a similar
> > > problem. 
> > 
> > Not really. It will still be a single directory per vendor (whatever
> > name it is).
> > 
> > > Thnk about Freescale vs. NXP, or Altera bought by Intel.
> > 
> > Yeah, when some drivers move from one vendor to another one that
> > already exists there, we should probably move the directories, in
> > order to keep things well organized.
> 
> I'm not sure we should. We still have arch/arm64/boot/dts/freescale/ for
> instance. We can answer that question later though, when confronted with
> the situation.
> 
> > The worse case scenario is really if, let's say, TI decides to sell their
> > omap architecture to NXP, keeping the rest. On such case, the best would
> > be to move platform/ti/omap* to the directory of its newer owner.
> > 
> > That's said, when things like that happen, there are usually a change
> > at MAINTAINERS, as e-mails, mailing lists and contact people will
> > likely change. So, this will very likely generate patches anyway.
> > 
> > > No
> > > naming scheme is totally future-proof. If the accepted standard through
> > > the kernel is to use sunxi to refer to Allwinner SoCs, I don't think
> > > it's a bit idea to go with that.
> > 
> > I'm not too concerned about the name here, but rather about the
> > process. Needing to do reorg like this is painful, as it causes 
> > all pending work to fail merging against upstream, requiring rebases.
> > So, we should avoid needing to re-do it by trying our best to avoid
> > the need of another global change like that in the future.
> 
> Most of the pain we'll go through in the immediate future comes from the
> fact that we never really cared about this. I think renames (of vendors
> or product lines) will be infrequent enough that picking sunxi for
> Allwinner drivers wouldn't be an issue.
> 
> There's a similar think with Renesas, which had an SH product line and
> then moved to ARM, creating R-Mobile and R-Car (among other product
> liens). That's why we still have drivers/dma/sh/ for Renesas DMA
> drivers.
> 
> > By organizing entries per vendor, while we may need to do puntual
> > per-vendor adjustments when they rename and change IP with other
> > vendors, the global platform Kconfig/Make will contain a single entry
> > per vendor. I can't foresee any need to change this in the future,
> > if we take care of keeping the entries there properly sorted.
> > 
> > With regards to naming the per-vendor directory, while I do prefer to have
> > the  directories named after the vendor, and not after a vendor's nick 
> > name, It should also be ok to use a vendor's nick name, provided that 
> > such name is meant to be used by all their current and future IP.
> > 
> > Not sure if "sunxi" is actually a vendor's nick name. It sounds
> > much likely that it is, instead, a brand name that covers their 
> > current media-related SoC. 
> > 
> > Can someone from the vendor shed a light on it?

Allwinner (as a company) isn't directly involved in maintaining upstream Linux 
support. Drivers are provided by linux-sunxi community, sometimes by cleaning 
up vendor drivers or more often by writing them from scratch.

That being said, "sunxi" is extensively used in vendor kernel, most often it's 
directory name containing vendor specific driver. It's derived from SoC family 
name, like sun4i, sun5i, sun5i, sun50i, etc. where number is replaced with X.

sunxi is synonym for Allwinner basically from the start. Community build 
around these SoCs is called linux-sunxi and even entry in MAINTAINERS contains 
both names: "ARM/Allwinner sunXi SoC support". Note that sunxi is not limited 
to ARM SoCs. RISC-V family is called sun20i.

Hope this helps.

Best regards,
Jernej

> 
> Maybe we can let the Allwinner upstream community tell us what name to
> pick ? I'm sure they know better than us :-)



> 
> -- 
> Regards,
> 
> Laurent Pinchart
>
Mauro Carvalho Chehab March 16, 2022, 1:10 p.m. UTC | #7
Em Tue, 15 Mar 2022 10:35:05 +0200
Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:

> On Tue, Mar 15, 2022 at 09:27:36AM +0100, Mauro Carvalho Chehab wrote:
> > Em Tue, 15 Mar 2022 08:54:25 +0200
> > Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu:
> >   
> > > Hi Mauro,
> > > 
> > > On Tue, Mar 15, 2022 at 06:40:05AM +0100, Mauro Carvalho Chehab wrote:  
> > > > Em Mon, 14 Mar 2022 18:22:20 +0100 Jernej Škrabec escreveu:
> > > >     
> > > > > Dne ponedeljek, 14. marec 2022 ob 17:34:42 CET je Mauro Carvalho Chehab 
> > > > > napisal(a):    
> > > > > > As the end goal is to have platform drivers split by vendor,
> > > > > > rename sunxi/ to allwinner/.
> > > > > > 
> > > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>      
> > > > > 
> > > > > I would rather not do that. Everything related to Allwinner is called sunxi, 
> > > > > albeit there are a few outliers. This is similar to Amlogic/meson situation.    
> > > > 
> > > > The rationale of having one directory per manufacturer is that, if drivers
> > > > for newer platforms with different names from the same manufacturers are 
> > > > added, those will still fit under allwinner/ and amlogic/.
> > > > 
> > > > The Kconfig names for sunxi and meson didn't change, nor the driver's name. 
> > > > Also, the directories under allwinner preserve sun<x>i name on them:
> > > > 
> > > > 	drivers/media/platform/allwinner/
> > > > 	├── sun4i-csi
> > > > 	├── sun6i-csi
> > > > 	├── sun8i-di
> > > > 	└── sun8i-rotate
> > > > 
> > > > and so the directory under amlogic/:
> > > > 
> > > > 	drivers/media/platform/amlogic/
> > > > 	└── meson-ge2d
> > > > 
> > > > Now, if Allinner decides to release a new platforms named after another star,
> > > > let's say, "Vega" and "Rigel", it would be just a matter of adding 
> > > > "vega/" and "rigel/" directories under allwinner. No need to touch
> > > > media/platform/Kconfig and media/platform/Makefile. Everything will happen
> > > > on much more smaller vendor-specific Kconfig/Makefile.    
> > > 
> > > But the day Allwinner changes its name to Noloser, we'll have a similar
> > > problem.   
> > 
> > Not really. It will still be a single directory per vendor (whatever
> > name it is).
> >   
> > > Thnk about Freescale vs. NXP, or Altera bought by Intel.  
> > 
> > Yeah, when some drivers move from one vendor to another one that
> > already exists there, we should probably move the directories, in
> > order to keep things well organized.  
> 
> I'm not sure we should. We still have arch/arm64/boot/dts/freescale/ for
> instance. We can answer that question later though, when confronted with
> the situation.

It would be messy if some drivers under a

	media/platform/vendor_a/

directory would actually belong to vendor_b, which also has its own
media/platform/vendor_b/ directory.

On such case, I do think we should move stuff. Now, if everything
under a "media/platform/vendor_a/" directory are now property of
a vendor_c which doesn't have yet any directory there, I don't see
and problems on not renaming - and even adding new drivers there
that would belong to vendor_c.

> 
> > The worse case scenario is really if, let's say, TI decides to sell their
> > omap architecture to NXP, keeping the rest. On such case, the best would
> > be to move platform/ti/omap* to the directory of its newer owner.
> > 
> > That's said, when things like that happen, there are usually a change
> > at MAINTAINERS, as e-mails, mailing lists and contact people will
> > likely change. So, this will very likely generate patches anyway.
> >   
> > > No
> > > naming scheme is totally future-proof. If the accepted standard through
> > > the kernel is to use sunxi to refer to Allwinner SoCs, I don't think
> > > it's a bit idea to go with that.  
> > 
> > I'm not too concerned about the name here, but rather about the
> > process. Needing to do reorg like this is painful, as it causes 
> > all pending work to fail merging against upstream, requiring rebases.
> > So, we should avoid needing to re-do it by trying our best to avoid
> > the need of another global change like that in the future.  
> 
> Most of the pain we'll go through in the immediate future comes from the
> fact that we never really cared about this. 

Nah, we had other reorgs in the past, also trying to better organize
stuff, like splitting M2M from V4L and DVB platform drivers.

The thing is that the number of entries at platform/ increased
a lot, and that justifies a major change.

> I think renames (of vendors
> or product lines) will be infrequent enough that picking sunxi for
> Allwinner drivers wouldn't be an issue.

Agreed.

> There's a similar think with Renesas, which had an SH product line and
> then moved to ARM, creating R-Mobile and R-Car (among other product
> liens). That's why we still have drivers/dma/sh/ for Renesas DMA
> drivers.
> 
> > By organizing entries per vendor, while we may need to do puntual
> > per-vendor adjustments when they rename and change IP with other
> > vendors, the global platform Kconfig/Make will contain a single entry
> > per vendor. I can't foresee any need to change this in the future,
> > if we take care of keeping the entries there properly sorted.
> > 
> > With regards to naming the per-vendor directory, while I do prefer to have
> > the  directories named after the vendor, and not after a vendor's nick 
> > name, It should also be ok to use a vendor's nick name, provided that 
> > such name is meant to be used by all their current and future IP.
> > 
> > Not sure if "sunxi" is actually a vendor's nick name. It sounds
> > much likely that it is, instead, a brand name that covers their 
> > current media-related SoC. 
> > 
> > Can someone from the vendor shed a light on it?  
> 
> Maybe we can let the Allwinner upstream community tell us what name to
> pick ? I'm sure they know better than us :-)

Works for me.

Thanks,
Mauro
Mauro Carvalho Chehab March 16, 2022, 1:13 p.m. UTC | #8
Em Tue, 15 Mar 2022 19:04:05 +0100
Jernej Škrabec <jernej.skrabec@gmail.com> escreveu:

> > > By organizing entries per vendor, while we may need to do puntual
> > > per-vendor adjustments when they rename and change IP with other
> > > vendors, the global platform Kconfig/Make will contain a single entry
> > > per vendor. I can't foresee any need to change this in the future,
> > > if we take care of keeping the entries there properly sorted.
> > > 
> > > With regards to naming the per-vendor directory, while I do prefer to have
> > > the  directories named after the vendor, and not after a vendor's nick 
> > > name, It should also be ok to use a vendor's nick name, provided that 
> > > such name is meant to be used by all their current and future IP.
> > > 
> > > Not sure if "sunxi" is actually a vendor's nick name. It sounds
> > > much likely that it is, instead, a brand name that covers their 
> > > current media-related SoC. 
> > > 
> > > Can someone from the vendor shed a light on it?  
> 
> Allwinner (as a company) isn't directly involved in maintaining upstream Linux 
> support. Drivers are provided by linux-sunxi community, sometimes by cleaning 
> up vendor drivers or more often by writing them from scratch.
> 
> That being said, "sunxi" is extensively used in vendor kernel, most often it's 
> directory name containing vendor specific driver. It's derived from SoC family 
> name, like sun4i, sun5i, sun5i, sun50i, etc. where number is replaced with X.
> 
> sunxi is synonym for Allwinner basically from the start. Community build 
> around these SoCs is called linux-sunxi and even entry in MAINTAINERS contains 
> both names: "ARM/Allwinner sunXi SoC support". Note that sunxi is not limited 
> to ARM SoCs. RISC-V family is called sun20i.
> 
> Hope this helps.

Ok, so let's then keep it named as "sunxi", and place all drivers from 
Allwinner there.

Thanks,
Mauro
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 58e0d42b1278..f29195850c16 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -750,7 +750,7 @@  L:	linux-media@vger.kernel.org
 S:	Maintained
 T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
-F:	drivers/media/platform/sunxi/sun4i-csi/
+F:	drivers/media/platform/allwinner/sun4i-csi/
 
 ALLWINNER CPUFREQ DRIVER
 M:	Yangtao Li <tiny.windzz@gmail.com>
@@ -5114,7 +5114,7 @@  L:	linux-media@vger.kernel.org
 S:	Maintained
 T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
-F:	drivers/media/platform/sunxi/sun6i-csi/
+F:	drivers/media/platform/allwinner/sun6i-csi/
 
 CW1200 WLAN driver
 M:	Solomon Peachy <pizza@shaftnet.org>
@@ -5391,7 +5391,7 @@  L:	linux-media@vger.kernel.org
 S:	Maintained
 T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml
-F:	drivers/media/platform/sunxi/sun8i-di/
+F:	drivers/media/platform/allwinner/sun8i-di/
 
 DELL LAPTOP DRIVER
 M:	Matthew Garrett <mjg59@srcf.ucam.org>
@@ -16746,7 +16746,7 @@  L:	linux-media@vger.kernel.org
 S:	Maintained
 T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/devicetree/bindings/media/allwinner,sun8i-a83t-de2-rotate.yaml
-F:	drivers/media/platform/sunxi/sun8i-rotate/
+F:	drivers/media/platform/allwinner/sun8i-rotate/
 
 RPMSG TTY DRIVER
 M:	Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index a9ad0c3bd0cc..61240f8226bb 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -66,6 +66,7 @@  config VIDEO_MUX
 # TODO: create per-manufacturer directories
 
 source "drivers/media/platform/allegro-dvt/Kconfig"
+source "drivers/media/platform/allwinner/Kconfig"
 source "drivers/media/platform/am437x/Kconfig"
 source "drivers/media/platform/amlogic/meson-ge2d/Kconfig"
 source "drivers/media/platform/amphion/Kconfig"
@@ -94,7 +95,6 @@  source "drivers/media/platform/s5p-jpeg/Kconfig"
 source "drivers/media/platform/s5p-mfc/Kconfig"
 source "drivers/media/platform/sti/Kconfig"
 source "drivers/media/platform/stm32/Kconfig"
-source "drivers/media/platform/sunxi/Kconfig"
 source "drivers/media/platform/tegra/vde/Kconfig"
 source "drivers/media/platform/ti-vpe/Kconfig"
 source "drivers/media/platform/via/Kconfig"
diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
index 954ad8f2cde1..88519e902919 100644
--- a/drivers/media/platform/Makefile
+++ b/drivers/media/platform/Makefile
@@ -6,6 +6,7 @@ 
 # Place here, alphabetically sorted by directory
 # (e. g. LC_ALL=C sort Makefile)
 obj-y += allegro-dvt/
+obj-y += allwinner/
 obj-y += am437x/
 obj-y += amlogic/meson-ge2d/
 obj-y += amphion/
@@ -39,7 +40,6 @@  obj-y += sti/c8sectpfe/
 obj-y += sti/delta/
 obj-y += sti/hva/
 obj-y += stm32/
-obj-y += sunxi/
 obj-y += tegra/vde/
 obj-y += ti-vpe/
 obj-y += via/
diff --git a/drivers/media/platform/allwinner/Kconfig b/drivers/media/platform/allwinner/Kconfig
new file mode 100644
index 000000000000..95a671d87e85
--- /dev/null
+++ b/drivers/media/platform/allwinner/Kconfig
@@ -0,0 +1,6 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+
+source "drivers/media/platform/allwinner/sun4i-csi/Kconfig"
+source "drivers/media/platform/allwinner/sun6i-csi/Kconfig"
+source "drivers/media/platform/allwinner/sun8i-di/Kconfig"
+source "drivers/media/platform/allwinner/sun8i-rotate/Kconfig"
diff --git a/drivers/media/platform/sunxi/Makefile b/drivers/media/platform/allwinner/Makefile
similarity index 100%
rename from drivers/media/platform/sunxi/Makefile
rename to drivers/media/platform/allwinner/Makefile
diff --git a/drivers/media/platform/sunxi/sun4i-csi/Kconfig b/drivers/media/platform/allwinner/sun4i-csi/Kconfig
similarity index 100%
rename from drivers/media/platform/sunxi/sun4i-csi/Kconfig
rename to drivers/media/platform/allwinner/sun4i-csi/Kconfig
diff --git a/drivers/media/platform/sunxi/sun4i-csi/Makefile b/drivers/media/platform/allwinner/sun4i-csi/Makefile
similarity index 100%
rename from drivers/media/platform/sunxi/sun4i-csi/Makefile
rename to drivers/media/platform/allwinner/sun4i-csi/Makefile
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c b/drivers/media/platform/allwinner/sun4i-csi/sun4i_csi.c
similarity index 100%
rename from drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
rename to drivers/media/platform/allwinner/sun4i-csi/sun4i_csi.c
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h b/drivers/media/platform/allwinner/sun4i-csi/sun4i_csi.h
similarity index 100%
rename from drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h
rename to drivers/media/platform/allwinner/sun4i-csi/sun4i_csi.h
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c b/drivers/media/platform/allwinner/sun4i-csi/sun4i_dma.c
similarity index 100%
rename from drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
rename to drivers/media/platform/allwinner/sun4i-csi/sun4i_dma.c
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c b/drivers/media/platform/allwinner/sun4i-csi/sun4i_v4l2.c
similarity index 100%
rename from drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
rename to drivers/media/platform/allwinner/sun4i-csi/sun4i_v4l2.c
diff --git a/drivers/media/platform/sunxi/sun6i-csi/Kconfig b/drivers/media/platform/allwinner/sun6i-csi/Kconfig
similarity index 100%
rename from drivers/media/platform/sunxi/sun6i-csi/Kconfig
rename to drivers/media/platform/allwinner/sun6i-csi/Kconfig
diff --git a/drivers/media/platform/sunxi/sun6i-csi/Makefile b/drivers/media/platform/allwinner/sun6i-csi/Makefile
similarity index 100%
rename from drivers/media/platform/sunxi/sun6i-csi/Makefile
rename to drivers/media/platform/allwinner/sun6i-csi/Makefile
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/allwinner/sun6i-csi/sun6i_csi.c
similarity index 100%
rename from drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
rename to drivers/media/platform/allwinner/sun6i-csi/sun6i_csi.c
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h b/drivers/media/platform/allwinner/sun6i-csi/sun6i_csi.h
similarity index 100%
rename from drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h
rename to drivers/media/platform/allwinner/sun6i-csi/sun6i_csi.h
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h b/drivers/media/platform/allwinner/sun6i-csi/sun6i_csi_reg.h
similarity index 100%
rename from drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_reg.h
rename to drivers/media/platform/allwinner/sun6i-csi/sun6i_csi_reg.h
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/allwinner/sun6i-csi/sun6i_video.c
similarity index 100%
rename from drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
rename to drivers/media/platform/allwinner/sun6i-csi/sun6i_video.c
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h b/drivers/media/platform/allwinner/sun6i-csi/sun6i_video.h
similarity index 100%
rename from drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h
rename to drivers/media/platform/allwinner/sun6i-csi/sun6i_video.h
diff --git a/drivers/media/platform/sunxi/sun8i-di/Kconfig b/drivers/media/platform/allwinner/sun8i-di/Kconfig
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-di/Kconfig
rename to drivers/media/platform/allwinner/sun8i-di/Kconfig
diff --git a/drivers/media/platform/sunxi/sun8i-di/Makefile b/drivers/media/platform/allwinner/sun8i-di/Makefile
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-di/Makefile
rename to drivers/media/platform/allwinner/sun8i-di/Makefile
diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/allwinner/sun8i-di/sun8i-di.c
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
rename to drivers/media/platform/allwinner/sun8i-di/sun8i-di.c
diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.h b/drivers/media/platform/allwinner/sun8i-di/sun8i-di.h
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-di/sun8i-di.h
rename to drivers/media/platform/allwinner/sun8i-di/sun8i-di.h
diff --git a/drivers/media/platform/sunxi/sun8i-rotate/Kconfig b/drivers/media/platform/allwinner/sun8i-rotate/Kconfig
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-rotate/Kconfig
rename to drivers/media/platform/allwinner/sun8i-rotate/Kconfig
diff --git a/drivers/media/platform/sunxi/sun8i-rotate/Makefile b/drivers/media/platform/allwinner/sun8i-rotate/Makefile
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-rotate/Makefile
rename to drivers/media/platform/allwinner/sun8i-rotate/Makefile
diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i-formats.h b/drivers/media/platform/allwinner/sun8i-rotate/sun8i-formats.h
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-rotate/sun8i-formats.h
rename to drivers/media/platform/allwinner/sun8i-rotate/sun8i-formats.h
diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i-rotate.h b/drivers/media/platform/allwinner/sun8i-rotate/sun8i-rotate.h
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-rotate/sun8i-rotate.h
rename to drivers/media/platform/allwinner/sun8i-rotate/sun8i-rotate.h
diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_formats.c b/drivers/media/platform/allwinner/sun8i-rotate/sun8i_formats.c
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-rotate/sun8i_formats.c
rename to drivers/media/platform/allwinner/sun8i-rotate/sun8i_formats.c
diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c b/drivers/media/platform/allwinner/sun8i-rotate/sun8i_rotate.c
similarity index 100%
rename from drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
rename to drivers/media/platform/allwinner/sun8i-rotate/sun8i_rotate.c
diff --git a/drivers/media/platform/sunxi/Kconfig b/drivers/media/platform/sunxi/Kconfig
deleted file mode 100644
index a10032215b08..000000000000
--- a/drivers/media/platform/sunxi/Kconfig
+++ /dev/null
@@ -1,6 +0,0 @@ 
-# SPDX-License-Identifier: GPL-2.0
-
-source "drivers/media/platform/sunxi/sun4i-csi/Kconfig"
-source "drivers/media/platform/sunxi/sun6i-csi/Kconfig"
-source "drivers/media/platform/sunxi/sun8i-di/Kconfig"
-source "drivers/media/platform/sunxi/sun8i-rotate/Kconfig"