Skip to contentSkip to conversation

ARM: EXYNOS: Make s3c_device_i2c0 always use id 0

PATCH New Tomasz Figa 3 participants 3 messages Nov 7, 2012 – Nov 8, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: EXYNOS: Make s3c_device_i2c0 always use id 0

This patch removes compatibility definitions added long time ago when clock ids were used instead of devnames that were needed for platforms with only one i2c controller with id -1 (some s3c24xx's).

Because currently devname field is used for matching device instances to clocks and if no devname is provided (as in clock-s3c2412.c and common-s3c2443.c for i2c clock, both in arch/arm/mach-s3c24xx) the clock is being matched only by name, so s3c_device_i2c0 can always have id 0.

This patch solves the issue with i2c0 broken on boards where its the only i2c controller used, tested on Origen.

---
 arch/arm/mach-s3c64xx/clock.c | 4 ----
 arch/arm/plat-samsung/devs.c  | 4 ----
 2 files changed, 8 deletions(-)
arch/arm/mach-s3c64xx/clock.c +0 -4
index 28041e8..0fd7417 100644
@@ -138,11 +138,7 @@ static struct clk init_clocks_off[] = {
 		.ctrlbit	= S3C_CLKCON_PCLK_TSADC,
 	}, {
 		.name		= "i2c",
-#ifdef CONFIG_S3C_DEV_I2C1
 		.devname        = "s3c2440-i2c.0",
-#else
-		.devname	= "s3c2440-i2c",
-#endif
 		.parent		= &clk_p,
 		.enable		= s3c64xx_pclk_ctrl,
 		.ctrlbit	= S3C_CLKCON_PCLK_IIC,
arch/arm/plat-samsung/devs.c +0 -4
index 52dfa8f..bc50b20 100644
@@ -486,11 +486,7 @@ static struct resource s3c_i2c0_resource[] = {
 
 struct platform_device s3c_device_i2c0 = {
 	.name		= "s3c2410-i2c",
-#ifdef CONFIG_S3C_DEV_I2C1
 	.id		= 0,
-#else
-	.id		= -1,
-#endif
 	.num_resources	= ARRAY_SIZE(s3c_i2c0_resource),
 	.resource	= s3c_i2c0_resource,
 };
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/1 ARM: EXYNOS: Make s3c_device_i2c0 always use id 0

Quoted 9 lines · Tomasz Figa

This patch removes compatibility definitions added long time ago when clock ids were used instead of devnames that were needed for platforms with only one i2c controller with id -1 (some s3c24xx's).

Because currently devname field is used for matching device instances to clocks and if no devname is provided (as in clock-s3c2412.c and common-s3c2443.c for i2c clock, both in arch/arm/mach-s3c24xx) the clock is being matched only by name, so s3c_device_i2c0 can always have id 0.

Quoted 5 lines

This patch solves the issue with i2c0 broken on boards where its the only i2c controller used, tested on Origen.

--

Thanks,
Sylwester

Applied
#2 lore raw

PATCH 1/1 ARM: EXYNOS: Make s3c_device_i2c0 always use id 0

Quoted 11 lines · Sylwester Nawrocki
Quoted 9 lines · Tomasz Figa

This patch removes compatibility definitions added long time ago when clock ids were used instead of devnames that were needed for platforms with only one i2c controller with id -1 (some s3c24xx's).

Because currently devname field is used for matching device instances to clocks and if no devname is provided (as in clock-s3c2412.c and common-s3c2443.c for i2c clock, both in arch/arm/mach-s3c24xx) the clock is being matched only by name, so s3c_device_i2c0 can always have id 0.

Quoted 8 lines
Quoted 5 lines

This patch solves the issue with i2c0 broken on boards where its the only i2c controller used, tested on Origen.

Applied, thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.