Skip to contentSkip to conversation

OMAP: I2C and UART device name cleanup

PATCH Superseded Benoit Cousson 2 participants 5 messages Dec 6, 2010 – Dec 7, 2010

Subsystems (7)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover OMAP: I2C and UART device name cleanup

Hi All,

In order to enforce a little bit of consistency in the omap devices name, the convention for omap devices name will be now omap_XXX. All the drivers adapted to hwmod will be named like that during the on-going adaptations.

The I2C and UART drivers are already adapted to hwmod but with the original names.

Rename i2c and uart using this convention:
i2c_omap -> omap_i2c
omap-hsuart -> omap_uart

Tested on OMAP4 ES2 on Panda / sdp4430. Some more validation will be needed on OMAP2 & 3.

This series is based on Kevin's pm-hwmod-i2c branch and is available here:
git://gitorious.org/omap-pm/linux.git for_2.6.38/device_name

Regards,
Benoit

Benoit Cousson (3):
OMAP: clock: Change device name in clock nodes: i2c_omap -> omap_i2c
OMAP: i2c: Change device name: i2c_omap -> omap_i2c
OMAP: serial: Change device name: omap-hsuart -> omap_uart

 arch/arm/mach-omap1/clock_data.c              |    6 +++---
 arch/arm/mach-omap2/clock2420_data.c          |    8 ++++----
 arch/arm/mach-omap2/clock2430_data.c          |    8 ++++----
 arch/arm/mach-omap2/clock3xxx_data.c          |   12 ++++++------
 arch/arm/mach-omap2/clock44xx_data.c          |   16 ++++++++--------
 arch/arm/plat-omap/i2c.c                      |    2 +-
 arch/arm/plat-omap/include/plat/omap-serial.h |    2 +-
 drivers/i2c/busses/i2c-omap.c                 |    4 ++--
 8 files changed, 29 insertions(+), 29 deletions(-)
#1 lore raw

PATCH 1/3 OMAP: clock: Change device name in clock nodes: i2c_omap -> omap_i2c

The convention for omap device naming is omap_XXX.

Rename the device name used in clock dev noded in order to stick to this naming convention.

Cc Paul Walmsley <[email protected]>
Cc Rajendra Nayak <[email protected]>
---
 arch/arm/mach-omap1/clock_data.c     |    6 +++---
 arch/arm/mach-omap2/clock2420_data.c |    8 ++++----
 arch/arm/mach-omap2/clock2430_data.c |    8 ++++----
 arch/arm/mach-omap2/clock3xxx_data.c |   12 ++++++------
 arch/arm/mach-omap2/clock44xx_data.c |   16 ++++++++--------
 5 files changed, 25 insertions(+), 25 deletions(-)
arch/arm/mach-omap1/clock_data.c +3 -3
index af54114..aa6dd67 100644
@@ -736,9 +736,9 @@ static struct omap_clk omap_clks[] = {
 	CLK("mmci-omap.1", "ick",	&armper_ck.clk,	CK_16XX),
 	/* Virtual clocks */
 	CLK(NULL,	"mpu",		&virtual_ck_mpu, CK_16XX | CK_1510 | CK_310),
-	CLK("i2c_omap.1", "fck",	&i2c_fck,	CK_16XX | CK_1510 | CK_310 | CK_7XX),
-	CLK("i2c_omap.1", "ick",	&i2c_ick,	CK_16XX),
-	CLK("i2c_omap.1", "ick",	&dummy_ck,	CK_1510 | CK_310 | CK_7XX),
+	CLK("omap_i2c.1", "fck",	&i2c_fck,	CK_16XX | CK_1510 | CK_310 | CK_7XX),
+	CLK("omap_i2c.1", "ick",	&i2c_ick,	CK_16XX),
+	CLK("omap_i2c.1", "ick",	&dummy_ck,	CK_1510 | CK_310 | CK_7XX),
 	CLK("omap1_spi100k.1", "fck",	&dummy_ck,	CK_7XX),
 	CLK("omap1_spi100k.1", "ick",	&dummy_ck,	CK_7XX),
 	CLK("omap1_spi100k.2", "fck",	&dummy_ck,	CK_7XX),
arch/arm/mach-omap2/clock2420_data.c +4 -4
index 21f8562..ed61ac2 100644
@@ -1862,10 +1862,10 @@ static struct omap_clk omap2420_clks[] = {
 	CLK(NULL,	"eac_fck",	&eac_fck,	CK_242X),
 	CLK("omap_hdq.0", "ick",	&hdq_ick,	CK_242X),
 	CLK("omap_hdq.1", "fck",	&hdq_fck,	CK_242X),
-	CLK("i2c_omap.1", "ick",	&i2c1_ick,	CK_242X),
-	CLK("i2c_omap.1", "fck",	&i2c1_fck,	CK_242X),
-	CLK("i2c_omap.2", "ick",	&i2c2_ick,	CK_242X),
-	CLK("i2c_omap.2", "fck",	&i2c2_fck,	CK_242X),
+	CLK("omap_i2c.1", "ick",	&i2c1_ick,	CK_242X),
+	CLK("omap_i2c.1", "fck",	&i2c1_fck,	CK_242X),
+	CLK("omap_i2c.2", "ick",	&i2c2_ick,	CK_242X),
+	CLK("omap_i2c.2", "fck",	&i2c2_fck,	CK_242X),
 	CLK(NULL,	"gpmc_fck",	&gpmc_fck,	CK_242X),
 	CLK(NULL,	"sdma_fck",	&sdma_fck,	CK_242X),
 	CLK(NULL,	"sdma_ick",	&sdma_ick,	CK_242X),
arch/arm/mach-omap2/clock2430_data.c +4 -4
index e32afcb..1bded4e 100644
@@ -1969,10 +1969,10 @@ static struct omap_clk omap2430_clks[] = {
 	CLK(NULL,	"fac_fck",	&fac_fck,	CK_243X),
 	CLK("omap_hdq.0", "ick",	&hdq_ick,	CK_243X),
 	CLK("omap_hdq.1", "fck",	&hdq_fck,	CK_243X),
-	CLK("i2c_omap.1", "ick",	&i2c1_ick,	CK_243X),
-	CLK("i2c_omap.1", "fck",	&i2chs1_fck,	CK_243X),
-	CLK("i2c_omap.2", "ick",	&i2c2_ick,	CK_243X),
-	CLK("i2c_omap.2", "fck",	&i2chs2_fck,	CK_243X),
+	CLK("omap_i2c.1", "ick",	&i2c1_ick,	CK_243X),
+	CLK("omap_i2c.1", "fck",	&i2chs1_fck,	CK_243X),
+	CLK("omap_i2c.2", "ick",	&i2c2_ick,	CK_243X),
+	CLK("omap_i2c.2", "fck",	&i2chs2_fck,	CK_243X),
 	CLK(NULL,	"gpmc_fck",	&gpmc_fck,	CK_243X),
 	CLK(NULL,	"sdma_fck",	&sdma_fck,	CK_243X),
 	CLK(NULL,	"sdma_ick",	&sdma_ick,	CK_243X),
arch/arm/mach-omap2/clock3xxx_data.c +6 -6
index d85ecd5..ee8aa39 100644
@@ -3285,9 +3285,9 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK("mmci-omap-hs.1",	"fck",	&mmchs2_fck,	CK_3XXX),
 	CLK(NULL,	"mspro_fck",	&mspro_fck,	CK_343X),
 	CLK("mmci-omap-hs.0",	"fck",	&mmchs1_fck,	CK_3XXX),
-	CLK("i2c_omap.3", "fck",	&i2c3_fck,	CK_3XXX),
-	CLK("i2c_omap.2", "fck",	&i2c2_fck,	CK_3XXX),
-	CLK("i2c_omap.1", "fck",	&i2c1_fck,	CK_3XXX),
+	CLK("omap_i2c.3", "fck",	&i2c3_fck,	CK_3XXX),
+	CLK("omap_i2c.2", "fck",	&i2c2_fck,	CK_3XXX),
+	CLK("omap_i2c.1", "fck",	&i2c1_fck,	CK_3XXX),
 	CLK("omap-mcbsp.5", "fck",	&mcbsp5_fck,	CK_3XXX),
 	CLK("omap-mcbsp.1", "fck",	&mcbsp1_fck,	CK_3XXX),
 	CLK(NULL,	"core_48m_fck",	&core_48m_fck,	CK_3XXX),
@@ -3326,9 +3326,9 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK("omap2_mcspi.3", "ick",	&mcspi3_ick,	CK_3XXX),
 	CLK("omap2_mcspi.2", "ick",	&mcspi2_ick,	CK_3XXX),
 	CLK("omap2_mcspi.1", "ick",	&mcspi1_ick,	CK_3XXX),
-	CLK("i2c_omap.3", "ick",	&i2c3_ick,	CK_3XXX),
-	CLK("i2c_omap.2", "ick",	&i2c2_ick,	CK_3XXX),
-	CLK("i2c_omap.1", "ick",	&i2c1_ick,	CK_3XXX),
+	CLK("omap_i2c.3", "ick",	&i2c3_ick,	CK_3XXX),
+	CLK("omap_i2c.2", "ick",	&i2c2_ick,	CK_3XXX),
+	CLK("omap_i2c.1", "ick",	&i2c1_ick,	CK_3XXX),
 	CLK(NULL,	"uart2_ick",	&uart2_ick,	CK_3XXX),
 	CLK(NULL,	"uart1_ick",	&uart1_ick,	CK_3XXX),
 	CLK(NULL,	"gpt11_ick",	&gpt11_ick,	CK_3XXX),
arch/arm/mach-omap2/clock44xx_data.c +8 -8
index 1599836..217cce4 100644
@@ -2872,10 +2872,10 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"gpu_fck",			&gpu_fck,	CK_443X),
 	CLK("omap2_hdq.0",	"fck",				&hdq1w_fck,	CK_443X),
 	CLK(NULL,	"hsi_fck",			&hsi_fck,	CK_443X),
-	CLK("i2c_omap.1",	"fck",				&i2c1_fck,	CK_443X),
-	CLK("i2c_omap.2",	"fck",				&i2c2_fck,	CK_443X),
-	CLK("i2c_omap.3",	"fck",				&i2c3_fck,	CK_443X),
-	CLK("i2c_omap.4",	"fck",				&i2c4_fck,	CK_443X),
+	CLK("omap_i2c.1",	"fck",				&i2c1_fck,	CK_443X),
+	CLK("omap_i2c.2",	"fck",				&i2c2_fck,	CK_443X),
+	CLK("omap_i2c.3",	"fck",				&i2c3_fck,	CK_443X),
+	CLK("omap_i2c.4",	"fck",				&i2c4_fck,	CK_443X),
 	CLK(NULL,	"ipu_fck",			&ipu_fck,	CK_443X),
 	CLK(NULL,	"iss_ctrlclk",			&iss_ctrlclk,	CK_443X),
 	CLK(NULL,	"iss_fck",			&iss_fck,	CK_443X),
@@ -2975,10 +2975,10 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"gpt9_ick",			&dummy_ck,	CK_443X),
 	CLK(NULL,	"gpt10_ick",			&dummy_ck,	CK_443X),
 	CLK(NULL,	"gpt11_ick",			&dummy_ck,	CK_443X),
-	CLK("i2c_omap.1",	"ick",				&dummy_ck,	CK_443X),
-	CLK("i2c_omap.2",	"ick",				&dummy_ck,	CK_443X),
-	CLK("i2c_omap.3",	"ick",				&dummy_ck,	CK_443X),
-	CLK("i2c_omap.4",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_i2c.1",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_i2c.2",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_i2c.3",	"ick",				&dummy_ck,	CK_443X),
+	CLK("omap_i2c.4",	"ick",				&dummy_ck,	CK_443X),
 	CLK("mmci-omap-hs.0",	"ick",				&dummy_ck,	CK_443X),
 	CLK("mmci-omap-hs.1",	"ick",				&dummy_ck,	CK_443X),
 	CLK("mmci-omap-hs.2",	"ick",				&dummy_ck,	CK_443X),
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 3/3 OMAP: serial: Change device name: omap-hsuart -> omap_uart

In reply to Benoit Cousson

The naming convention for omap_device is omap_XXX.

Rename the device and driver name in order to stick to this naming convention.
Remove the hs prefix that is implicit for every OMAP uarts.

---
 arch/arm/plat-omap/include/plat/omap-serial.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/include/plat/omap-serial.h +1 -1
index c8dae02..cc71426 100644
@@ -22,7 +22,7 @@
 
 #include <plat/mux.h>
 
-#define DRIVER_NAME	"omap-hsuart"
+#define DRIVER_NAME	"omap_uart"
 
 /*
  * Use tty device name as ttyO, [O -> OMAP]
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/3 OMAP: i2c: Change device name: i2c_omap -> omap_i2c

In reply to Benoit Cousson

The convention for omap device naming is omap_XXX.

Rename the device and driver name in order to stick to this naming convention.

c: Paul Walmsley <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Rajendra Nayak <[email protected]>
Cc: Ben Dooks <[email protected]>

---
 arch/arm/plat-omap/i2c.c      |    2 +-
 drivers/i2c/busses/i2c-omap.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/i2c.c +1 -1
index a5bff9c..0a271ad 100644
@@ -40,7 +40,7 @@
 #define OMAP_I2C_SIZE		0x3f
 #define OMAP1_I2C_BASE		0xfffb3800
 
-static const char name[] = "i2c_omap";
+static const char name[] = "omap_i2c";
 
 #define I2C_RESOURCE_BUILDER(base, irq)			\
 	{						\
drivers/i2c/busses/i2c-omap.c +2 -2
index 760b8be..9d09083 100644
@@ -1139,7 +1139,7 @@ static struct platform_driver omap_i2c_driver = {
 	.probe		= omap_i2c_probe,
 	.remove		= omap_i2c_remove,
 	.driver		= {
-		.name	= "i2c_omap",
+		.name	= "omap_i2c",
 		.owner	= THIS_MODULE,
 	},
 };
@@ -1161,4 +1161,4 @@ module_exit(omap_i2c_exit_driver);
 MODULE_AUTHOR("MontaVista Software, Inc. (and others)");
 MODULE_DESCRIPTION("TI OMAP I2C bus adapter");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:i2c_omap");
+MODULE_ALIAS("platform:omap_i2c");
Signature · 1 line
1.7.0.4
#4 lore raw
In reply to Benoit Cousson
Quoted 19 lines · Benoit Cousson

Hi All,

In order to enforce a little bit of consistency in the omap devices name, the convention for omap devices name will be now omap_XXX. All the drivers adapted to hwmod will be named like that during the on-going adaptations.

The I2C and UART drivers are already adapted to hwmod but with the original names.

Rename i2c and uart using this convention:
i2c_omap -> omap_i2c
omap-hsuart -> omap_uart

Tested on OMAP4 ES2 on Panda / sdp4430. Some more validation will be needed on OMAP2 & 3.

This series is based on Kevin's pm-hwmod-i2c branch and is available here:
git://gitorious.org/omap-pm/linux.git for_2.6.38/device_name

Quoted 7 lines

Regards,
Benoit

Benoit Cousson (3):
OMAP: clock: Change device name in clock nodes: i2c_omap -> omap_i2c
OMAP: i2c: Change device name: i2c_omap -> omap_i2c

These two should probably be combined, as they cannot work separately.

Quoted 2 lines

OMAP: serial: Change device name: omap-hsuart -> omap_uart

Also, can you Cc linux-arm-kernel when you post updated version?

Thanks,

Kevin