diff mbox

i2c: mux: rename files to not have superfluous prefixes

Message ID 20170804090736.13404-1-peda@axentia.se
State Deferred
Headers show

Commit Message

Peter Rosin Aug. 4, 2017, 9:07 a.m. UTC
Keep the module names intact using extra lines in the Makefile.

Signed-off-by: Peter Rosin <peda@axentia.se>
---
 MAINTAINERS                                                 |  8 ++++----
 drivers/i2c/muxes/Makefile                                  | 13 +++++++++++++
 .../{i2c-arb-gpio-challenge.c => arb-gpio-challenge.c}      |  0
 drivers/i2c/muxes/{i2c-demux-pinctrl.c => demux-pinctrl.c}  |  0
 drivers/i2c/muxes/{i2c-mux-gpio.c => gpio.c}                |  0
 drivers/i2c/muxes/{i2c-mux-gpmux.c => gpmux.c}              |  0
 drivers/i2c/muxes/{i2c-mux-ltc4306.c => ltc4306.c}          |  0
 drivers/i2c/muxes/{i2c-mux-mlxcpld.c => mlxcpld.c}          |  0
 drivers/i2c/muxes/{i2c-mux-pca9541.c => pca9541.c}          |  0
 drivers/i2c/muxes/{i2c-mux-pca954x.c => pca954x.c}          |  0
 drivers/i2c/muxes/{i2c-mux-pinctrl.c => pinctrl.c}          |  0
 drivers/i2c/muxes/{i2c-mux-reg.c => reg.c}                  |  0
 12 files changed, 17 insertions(+), 4 deletions(-)
 rename drivers/i2c/muxes/{i2c-arb-gpio-challenge.c => arb-gpio-challenge.c} (100%)
 rename drivers/i2c/muxes/{i2c-demux-pinctrl.c => demux-pinctrl.c} (100%)
 rename drivers/i2c/muxes/{i2c-mux-gpio.c => gpio.c} (100%)
 rename drivers/i2c/muxes/{i2c-mux-gpmux.c => gpmux.c} (100%)
 rename drivers/i2c/muxes/{i2c-mux-ltc4306.c => ltc4306.c} (100%)
 rename drivers/i2c/muxes/{i2c-mux-mlxcpld.c => mlxcpld.c} (100%)
 rename drivers/i2c/muxes/{i2c-mux-pca9541.c => pca9541.c} (100%)
 rename drivers/i2c/muxes/{i2c-mux-pca954x.c => pca954x.c} (100%)
 rename drivers/i2c/muxes/{i2c-mux-pinctrl.c => pinctrl.c} (100%)
 rename drivers/i2c/muxes/{i2c-mux-reg.c => reg.c} (100%)

Hi Wolfram!

In the light of the rant from Linus the other week [1], I thought this
might be a good idea?

Cheers,
peda

[1] https://lkml.org/lkml/2017/7/12/430

Comments

Michael Shych Aug. 6, 2017, 9:37 a.m. UTC | #1
> -----Original Message-----
> From: Peter Rosin [mailto:peda@axentia.se]
> Sent: Friday, August 04, 2017 12:08 PM
> To: linux-kernel@vger.kernel.org
> Cc: Peter Rosin <peda@axentia.se>; Wolfram Sang <wsa@the-dreams.de>;
> linux-i2c@vger.kernel.org; Peter Korsgaard <peter.korsgaard@barco.com>;
> Michael Hennerich <michael.hennerich@analog.com>; Michael Shych
> <michaelsh@mellanox.com>; Guenter Roeck <linux@roeck-us.net>
> Subject: [PATCH] i2c: mux: rename files to not have superfluous prefixes
> 
> Keep the module names intact using extra lines in the Makefile.
> 
> Signed-off-by: Peter Rosin <peda@axentia.se>

Acked-by: Michael Shych <michaelsh@mellanox.com>

> ---
>  MAINTAINERS                                                 |  8 ++++----
>  drivers/i2c/muxes/Makefile                                  | 13 +++++++++++++
>  .../{i2c-arb-gpio-challenge.c => arb-gpio-challenge.c}      |  0
>  drivers/i2c/muxes/{i2c-demux-pinctrl.c => demux-pinctrl.c}  |  0
>  drivers/i2c/muxes/{i2c-mux-gpio.c => gpio.c}                |  0
>  drivers/i2c/muxes/{i2c-mux-gpmux.c => gpmux.c}              |  0
>  drivers/i2c/muxes/{i2c-mux-ltc4306.c => ltc4306.c}          |  0
>  drivers/i2c/muxes/{i2c-mux-mlxcpld.c => mlxcpld.c}          |  0
>  drivers/i2c/muxes/{i2c-mux-pca9541.c => pca9541.c}          |  0
>  drivers/i2c/muxes/{i2c-mux-pca954x.c => pca954x.c}          |  0
>  drivers/i2c/muxes/{i2c-mux-pinctrl.c => pinctrl.c}          |  0
>  drivers/i2c/muxes/{i2c-mux-reg.c => reg.c}                  |  0
>  12 files changed, 17 insertions(+), 4 deletions(-)  rename
> drivers/i2c/muxes/{i2c-arb-gpio-challenge.c => arb-gpio-challenge.c} (100%)
> rename drivers/i2c/muxes/{i2c-demux-pinctrl.c => demux-pinctrl.c} (100%)
> rename drivers/i2c/muxes/{i2c-mux-gpio.c => gpio.c} (100%)  rename
> drivers/i2c/muxes/{i2c-mux-gpmux.c => gpmux.c} (100%)  rename
> drivers/i2c/muxes/{i2c-mux-ltc4306.c => ltc4306.c} (100%)  rename
> drivers/i2c/muxes/{i2c-mux-mlxcpld.c => mlxcpld.c} (100%)  rename
> drivers/i2c/muxes/{i2c-mux-pca9541.c => pca9541.c} (100%)  rename
> drivers/i2c/muxes/{i2c-mux-pca954x.c => pca954x.c} (100%)  rename
> drivers/i2c/muxes/{i2c-mux-pinctrl.c => pinctrl.c} (100%)  rename
> drivers/i2c/muxes/{i2c-mux-reg.c => reg.c} (100%)
> 
> Hi Wolfram!
> 
> In the light of the rant from Linus the other week [1], I thought this might be
> a good idea?
> 
> Cheers,
> peda
> 
> [1]
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flk
> ml.org%2Flkml%2F2017%2F7%2F12%2F430&data=02%7C01%7Cmichaelsh%40
> mellanox.com%7C6cbbed292e99475e99d208d4db184a42%7Ca652971c7d2e4
> d9ba6a4d149256f461b%7C0%7C0%7C636374344761668884&sdata=k2CK8RQq
> mWOEs3CULrPqOR1uddb1iIawqUTD7%2F4BLiU%3D&reserved=0
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 205d3977ac46..46356c87f0c9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -5687,7 +5687,7 @@ GENERIC GPIO I2C MULTIPLEXER DRIVER
>  M:	Peter Korsgaard <peter.korsgaard@barco.com>
>  L:	linux-i2c@vger.kernel.org
>  S:	Supported
> -F:	drivers/i2c/muxes/i2c-mux-gpio.c
> +F:	drivers/i2c/muxes/gpio.c
>  F:	include/linux/i2c-mux-gpio.h
>  F:	Documentation/i2c/muxes/i2c-mux-gpio
> 
> @@ -7998,7 +7998,7 @@ M:	Michael Hennerich
> <michael.hennerich@analog.com>
>  W:
> 	https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F
> %2Fez.analog.com%2Fcommunity%2Flinux-device-
> drivers&data=02%7C01%7Cmichaelsh%40mellanox.com%7C6cbbed292e9947
> 5e99d208d4db184a42%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7
> C636374344761668884&sdata=hehiWQXI5WY2oz1SCBV9TqjWQ3wYPzKuIKes
> K44Ar%2Fg%3D&reserved=0
>  L:	linux-i2c@vger.kernel.org
>  S:	Supported
> -F:	drivers/i2c/muxes/i2c-mux-ltc4306.c
> +F:	drivers/i2c/muxes/ltc4306.c
>  F:	Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt
> 
>  LTP (Linux Test Project)
> @@ -8558,7 +8558,7 @@ M:	Michael Shych <michaelsh@mellanox.com>
>  L:	linux-i2c@vger.kernel.org
>  S:	Supported
>  F:	drivers/i2c/busses/i2c-mlxcpld.c
> -F:	drivers/i2c/muxes/i2c-mux-mlxcpld.c
> +F:	drivers/i2c/muxes/mlxcpld.c
>  F:	Documentation/i2c/busses/i2c-mlxcpld
> 
>  MELLANOX MLXCPLD LED DRIVER
> @@ -10018,7 +10018,7 @@ PCA9541 I2C BUS MASTER SELECTOR DRIVER
>  M:	Guenter Roeck <linux@roeck-us.net>
>  L:	linux-i2c@vger.kernel.org
>  S:	Maintained
> -F:	drivers/i2c/muxes/i2c-mux-pca9541.c
> +F:	drivers/i2c/muxes/pca9541.c
> 
>  PCDP - PRIMARY CONSOLE AND DEBUG PORT
>  M:	Khalid Aziz <khalid@gonehiking.org>
> diff --git a/drivers/i2c/muxes/Makefile b/drivers/i2c/muxes/Makefile index
> 4a67d3199877..b9f7a78d7604 100644
> --- a/drivers/i2c/muxes/Makefile
> +++ b/drivers/i2c/muxes/Makefile
> @@ -1,6 +1,19 @@
>  #
>  # Makefile for multiplexer I2C chip drivers.
> 
> +i2c-arb-gpio-challenge-objs	:= arb-gpio-challenge.o
> +
> +i2c-demux-pinctrl-objs		:= demux-pinctrl.o
> +
> +i2c-mux-gpio-objs		:= gpio.o
> +i2c-mux-gpmux-objs		:= gpmux.o
> +i2c-mux-ltc4306-objs		:= ltc4306.o
> +i2c-mux-mlxcpld-objs		:= mlxcpld.o
> +i2c-mux-pca9541-objs		:= pca9541.o
> +i2c-mux-pca954x-objs		:= pca954x.o
> +i2c-mux-pinctrl-objs		:= pinctrl.o
> +i2c-mux-reg-objs		:= reg.o
> +
>  obj-$(CONFIG_I2C_ARB_GPIO_CHALLENGE)	+= i2c-arb-gpio-challenge.o
> 
>  obj-$(CONFIG_I2C_DEMUX_PINCTRL)		+= i2c-demux-pinctrl.o
> diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
> b/drivers/i2c/muxes/arb-gpio-challenge.c
> similarity index 100%
> rename from drivers/i2c/muxes/i2c-arb-gpio-challenge.c
> rename to drivers/i2c/muxes/arb-gpio-challenge.c
> diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c
> b/drivers/i2c/muxes/demux-pinctrl.c
> similarity index 100%
> rename from drivers/i2c/muxes/i2c-demux-pinctrl.c
> rename to drivers/i2c/muxes/demux-pinctrl.c diff --git
> a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/gpio.c similarity
> index 100% rename from drivers/i2c/muxes/i2c-mux-gpio.c rename to
> drivers/i2c/muxes/gpio.c diff --git a/drivers/i2c/muxes/i2c-mux-gpmux.c
> b/drivers/i2c/muxes/gpmux.c similarity index 100% rename from
> drivers/i2c/muxes/i2c-mux-gpmux.c rename to drivers/i2c/muxes/gpmux.c
> diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c
> b/drivers/i2c/muxes/ltc4306.c similarity index 100% rename from
> drivers/i2c/muxes/i2c-mux-ltc4306.c
> rename to drivers/i2c/muxes/ltc4306.c
> diff --git a/drivers/i2c/muxes/i2c-mux-mlxcpld.c
> b/drivers/i2c/muxes/mlxcpld.c similarity index 100% rename from
> drivers/i2c/muxes/i2c-mux-mlxcpld.c
> rename to drivers/i2c/muxes/mlxcpld.c
> diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c
> b/drivers/i2c/muxes/pca9541.c similarity index 100% rename from
> drivers/i2c/muxes/i2c-mux-pca9541.c
> rename to drivers/i2c/muxes/pca9541.c
> diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c
> b/drivers/i2c/muxes/pca954x.c similarity index 100% rename from
> drivers/i2c/muxes/i2c-mux-pca954x.c
> rename to drivers/i2c/muxes/pca954x.c
> diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/pinctrl.c
> similarity index 100% rename from drivers/i2c/muxes/i2c-mux-pinctrl.c
> rename to drivers/i2c/muxes/pinctrl.c
> diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/reg.c
> similarity index 100% rename from drivers/i2c/muxes/i2c-mux-reg.c rename
> to drivers/i2c/muxes/reg.c
> --
> 2.11.0
Wolfram Sang Aug. 12, 2017, 2:26 p.m. UTC | #2
Hi peda,

> In the light of the rant from Linus the other week [1], I thought this
> might be a good idea?

I am still not decided on this one. I tried to do it with the core files
and didn't find a convincing solution there. Also, the churn is quite
high: git history becomes less usable, likely broken references, it is
not consistent in the kernel anyhow...

So, I decided to work on real issues for now. The pain point for me is
not reached yet. But if it is for you (or someone else), I am open to
look at an subsystem wide solution.

Thanks,

   Wolfram
Peter Rosin Aug. 12, 2017, 9:03 p.m. UTC | #3
On 2017-08-12 16:26, Wolfram Sang wrote:
> Hi peda,
> 
>> In the light of the rant from Linus the other week [1], I thought this
>> might be a good idea?
> 
> I am still not decided on this one. I tried to do it with the core files
> and didn't find a convincing solution there. Also, the churn is quite
> high: git history becomes less usable, likely broken references, it is
> not consistent in the kernel anyhow...
> 
> So, I decided to work on real issues for now. The pain point for me is
> not reached yet. But if it is for you (or someone else), I am open to
> look at an subsystem wide solution.

Yeah, there are a few downsides and I agree that the whole i2c subsystem
should be "converted" at the same time, probably directly after some
future rc1. Feel free to use this patch (or an adjusted version) if/when
the time comes, or poke me and I'll redo it.

In other words, I'm not super-committed to this patch, and will just drop
it for now...

Cheers,
Peter
diff mbox

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 205d3977ac46..46356c87f0c9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5687,7 +5687,7 @@  GENERIC GPIO I2C MULTIPLEXER DRIVER
 M:	Peter Korsgaard <peter.korsgaard@barco.com>
 L:	linux-i2c@vger.kernel.org
 S:	Supported
-F:	drivers/i2c/muxes/i2c-mux-gpio.c
+F:	drivers/i2c/muxes/gpio.c
 F:	include/linux/i2c-mux-gpio.h
 F:	Documentation/i2c/muxes/i2c-mux-gpio
 
@@ -7998,7 +7998,7 @@  M:	Michael Hennerich <michael.hennerich@analog.com>
 W:	http://ez.analog.com/community/linux-device-drivers
 L:	linux-i2c@vger.kernel.org
 S:	Supported
-F:	drivers/i2c/muxes/i2c-mux-ltc4306.c
+F:	drivers/i2c/muxes/ltc4306.c
 F:	Documentation/devicetree/bindings/i2c/i2c-mux-ltc4306.txt
 
 LTP (Linux Test Project)
@@ -8558,7 +8558,7 @@  M:	Michael Shych <michaelsh@mellanox.com>
 L:	linux-i2c@vger.kernel.org
 S:	Supported
 F:	drivers/i2c/busses/i2c-mlxcpld.c
-F:	drivers/i2c/muxes/i2c-mux-mlxcpld.c
+F:	drivers/i2c/muxes/mlxcpld.c
 F:	Documentation/i2c/busses/i2c-mlxcpld
 
 MELLANOX MLXCPLD LED DRIVER
@@ -10018,7 +10018,7 @@  PCA9541 I2C BUS MASTER SELECTOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-i2c@vger.kernel.org
 S:	Maintained
-F:	drivers/i2c/muxes/i2c-mux-pca9541.c
+F:	drivers/i2c/muxes/pca9541.c
 
 PCDP - PRIMARY CONSOLE AND DEBUG PORT
 M:	Khalid Aziz <khalid@gonehiking.org>
diff --git a/drivers/i2c/muxes/Makefile b/drivers/i2c/muxes/Makefile
index 4a67d3199877..b9f7a78d7604 100644
--- a/drivers/i2c/muxes/Makefile
+++ b/drivers/i2c/muxes/Makefile
@@ -1,6 +1,19 @@ 
 #
 # Makefile for multiplexer I2C chip drivers.
 
+i2c-arb-gpio-challenge-objs	:= arb-gpio-challenge.o
+
+i2c-demux-pinctrl-objs		:= demux-pinctrl.o
+
+i2c-mux-gpio-objs		:= gpio.o
+i2c-mux-gpmux-objs		:= gpmux.o
+i2c-mux-ltc4306-objs		:= ltc4306.o
+i2c-mux-mlxcpld-objs		:= mlxcpld.o
+i2c-mux-pca9541-objs		:= pca9541.o
+i2c-mux-pca954x-objs		:= pca954x.o
+i2c-mux-pinctrl-objs		:= pinctrl.o
+i2c-mux-reg-objs		:= reg.o
+
 obj-$(CONFIG_I2C_ARB_GPIO_CHALLENGE)	+= i2c-arb-gpio-challenge.o
 
 obj-$(CONFIG_I2C_DEMUX_PINCTRL)		+= i2c-demux-pinctrl.o
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/arb-gpio-challenge.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-arb-gpio-challenge.c
rename to drivers/i2c/muxes/arb-gpio-challenge.c
diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/demux-pinctrl.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-demux-pinctrl.c
rename to drivers/i2c/muxes/demux-pinctrl.c
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/gpio.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-mux-gpio.c
rename to drivers/i2c/muxes/gpio.c
diff --git a/drivers/i2c/muxes/i2c-mux-gpmux.c b/drivers/i2c/muxes/gpmux.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-mux-gpmux.c
rename to drivers/i2c/muxes/gpmux.c
diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/ltc4306.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-mux-ltc4306.c
rename to drivers/i2c/muxes/ltc4306.c
diff --git a/drivers/i2c/muxes/i2c-mux-mlxcpld.c b/drivers/i2c/muxes/mlxcpld.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-mux-mlxcpld.c
rename to drivers/i2c/muxes/mlxcpld.c
diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/pca9541.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-mux-pca9541.c
rename to drivers/i2c/muxes/pca9541.c
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/pca954x.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-mux-pca954x.c
rename to drivers/i2c/muxes/pca954x.c
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/pinctrl.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-mux-pinctrl.c
rename to drivers/i2c/muxes/pinctrl.c
diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/reg.c
similarity index 100%
rename from drivers/i2c/muxes/i2c-mux-reg.c
rename to drivers/i2c/muxes/reg.c