* [PATCH] ARM: EXYNOS: Make s3c_device_i2c0 always use id 0
@ 2012-11-07 13:00 ` Tomasz Figa
0 siblings, 0 replies; 6+ messages in thread
From: Tomasz Figa @ 2012-11-07 13:00 UTC (permalink / raw)
To: linux-samsung-soc, jhkim
Cc: linux-arm-kernel, Kukjin Kim, Kyungmin Park, Marek Szyprowski
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.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s3c64xx/clock.c | 4 ----
arch/arm/plat-samsung/devs.c | 4 ----
2 files changed, 8 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
index 28041e8..0fd7417 100644
--- a/arch/arm/mach-s3c64xx/clock.c
+++ b/arch/arm/mach-s3c64xx/clock.c
@@ -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,
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 52dfa8f..bc50b20 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -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,
};
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ARM: EXYNOS: Make s3c_device_i2c0 always use id 0
@ 2012-11-07 13:00 ` Tomasz Figa
0 siblings, 0 replies; 6+ messages in thread
From: Tomasz Figa @ 2012-11-07 13:00 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s3c64xx/clock.c | 4 ----
arch/arm/plat-samsung/devs.c | 4 ----
2 files changed, 8 deletions(-)
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
index 28041e8..0fd7417 100644
--- a/arch/arm/mach-s3c64xx/clock.c
+++ b/arch/arm/mach-s3c64xx/clock.c
@@ -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,
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 52dfa8f..bc50b20 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -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,
};
--
1.8.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: EXYNOS: Make s3c_device_i2c0 always use id 0
2012-11-07 13:00 ` Tomasz Figa
@ 2012-11-07 18:02 ` Sylwester Nawrocki
-1 siblings, 0 replies; 6+ messages in thread
From: Sylwester Nawrocki @ 2012-11-07 18:02 UTC (permalink / raw)
To: Tomasz Figa
Cc: linux-samsung-soc, jhkim, linux-arm-kernel, Kukjin Kim,
Kyungmin Park, Marek Szyprowski
On 11/07/2012 02:00 PM, Tomasz Figa wrote:
> 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.
>
> Signed-off-by: Tomasz Figa<t.figa@samsung.com>
> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
--
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: EXYNOS: Make s3c_device_i2c0 always use id 0
@ 2012-11-07 18:02 ` Sylwester Nawrocki
0 siblings, 0 replies; 6+ messages in thread
From: Sylwester Nawrocki @ 2012-11-07 18:02 UTC (permalink / raw)
To: linux-arm-kernel
On 11/07/2012 02:00 PM, Tomasz Figa wrote:
> 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.
>
> Signed-off-by: Tomasz Figa<t.figa@samsung.com>
> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
--
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] ARM: EXYNOS: Make s3c_device_i2c0 always use id 0
2012-11-07 18:02 ` Sylwester Nawrocki
@ 2012-11-08 4:52 ` Kukjin Kim
-1 siblings, 0 replies; 6+ messages in thread
From: Kukjin Kim @ 2012-11-08 4:52 UTC (permalink / raw)
To: 'Sylwester Nawrocki', 'Tomasz Figa'
Cc: 'linux-samsung-soc', jhkim, 'linux-arm-kernel',
'Kyungmin Park', 'Marek Szyprowski'
Sylwester Nawrocki wrote:
>
> On 11/07/2012 02:00 PM, Tomasz Figa wrote:
> > 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.
> >
> > Signed-off-by: Tomasz Figa<t.figa@samsung.com>
> > Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>
Applied, thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: EXYNOS: Make s3c_device_i2c0 always use id 0
@ 2012-11-08 4:52 ` Kukjin Kim
0 siblings, 0 replies; 6+ messages in thread
From: Kukjin Kim @ 2012-11-08 4:52 UTC (permalink / raw)
To: linux-arm-kernel
Sylwester Nawrocki wrote:
>
> On 11/07/2012 02:00 PM, Tomasz Figa wrote:
> > 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.
> >
> > Signed-off-by: Tomasz Figa<t.figa@samsung.com>
> > Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>
Applied, thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-08 4:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 13:00 [PATCH] ARM: EXYNOS: Make s3c_device_i2c0 always use id 0 Tomasz Figa
2012-11-07 13:00 ` Tomasz Figa
2012-11-07 18:02 ` Sylwester Nawrocki
2012-11-07 18:02 ` Sylwester Nawrocki
2012-11-08 4:52 ` Kukjin Kim
2012-11-08 4:52 ` Kukjin Kim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.