diff mbox

[1/1] i2c: s3c2410: Remove class based instantiation

Message ID 1401786022-29587-1-git-send-email-sachin.kamat@samsung.com
State Deferred
Headers show

Commit Message

Sachin Kamat June 3, 2014, 9 a.m. UTC
With multiplatform support enabled for Exynos, class based
instantiation causes a boot time delay due to I2C_CLASS_HWMON
triggered probe. Since class based instantiation has been
deprecated since some time now, remove it for Samsung I2C driver.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Olof Johansson <olof@lixom.net>
---
 drivers/i2c/busses/i2c-s3c2410.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Wolfram Sang June 3, 2014, 10:05 a.m. UTC | #1
On Tue, Jun 03, 2014 at 02:30:22PM +0530, Sachin Kamat wrote:
> With multiplatform support enabled for Exynos, class based
> instantiation causes a boot time delay due to I2C_CLASS_HWMON
> triggered probe. Since class based instantiation has been
> deprecated since some time now, remove it for Samsung I2C driver.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> Cc: Olof Johansson <olof@lixom.net>

In my book, not long enough. I suggest I will take care of the removal.
I'll do it for all class deprecating drivers.
Sachin Kamat June 3, 2014, 11:21 a.m. UTC | #2
Hi Wolfram,

On Tue, Jun 3, 2014 at 3:35 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Tue, Jun 03, 2014 at 02:30:22PM +0530, Sachin Kamat wrote:
>> With multiplatform support enabled for Exynos, class based
>> instantiation causes a boot time delay due to I2C_CLASS_HWMON
>> triggered probe. Since class based instantiation has been
>> deprecated since some time now, remove it for Samsung I2C driver.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
>> Cc: Olof Johansson <olof@lixom.net>
>
> In my book, not long enough. I suggest I will take care of the removal.
> I'll do it for all class deprecating drivers.

The reason for the removal is the boot delay it is causing on Exynos 5250
based boards by throwing the following errors continuously.

[   55.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)
[   59.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)
[   63.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)

Regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang June 3, 2014, 11:54 a.m. UTC | #3
> The reason for the removal is the boot delay it is causing on Exynos 5250
> based boards by throwing the following errors continuously.
> 
> [   55.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)
> [   59.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)
> [   63.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)

I know. That's why I implemented the deprecated class. Still, users may
need more time to switch over. Keep it an out-of-tree patch until then.
Tomasz Figa June 3, 2014, 12:03 p.m. UTC | #4
Hi Wolfram, Sachin,

On 03.06.2014 13:21, Sachin Kamat wrote:
> Hi Wolfram,
> 
> On Tue, Jun 3, 2014 at 3:35 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
>> On Tue, Jun 03, 2014 at 02:30:22PM +0530, Sachin Kamat wrote:
>>> With multiplatform support enabled for Exynos, class based
>>> instantiation causes a boot time delay due to I2C_CLASS_HWMON
>>> triggered probe. Since class based instantiation has been
>>> deprecated since some time now, remove it for Samsung I2C driver.
>>>
>>> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
>>> Cc: Olof Johansson <olof@lixom.net>
>>
>> In my book, not long enough. I suggest I will take care of the removal.
>> I'll do it for all class deprecating drivers.

Couldn't it be made configurable with a Kconfig entry? E.g. "Enable
deprecated class-based instantiation" under Drivers / I2C? Turning it
off could make the code ignore the class field completely.

This way people that don't want it could just disable it and others
could also test whether disabling it affects them in any way.

> 
> The reason for the removal is the boot delay it is causing on Exynos 5250
> based boards by throwing the following errors continuously.
> 
> [   55.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)
> [   59.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)
> [   63.005300] s3c-i2c 12ce0000.i2c: cannot get bus (error -110)

Are you sure this is directly related to class-based instantiation? This
looks like the bus being driven low by some external component or
incorrectly configured pins. What is this bus used for on affected board?

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang June 3, 2014, 12:17 p.m. UTC | #5
> Couldn't it be made configurable with a Kconfig entry? E.g. "Enable
> deprecated class-based instantiation" under Drivers / I2C? Turning it
> off could make the code ignore the class field completely.

Technically, yes. But we could also wait another cycle and just be done
with it :)
Tomasz Figa June 3, 2014, 12:18 p.m. UTC | #6
On 03.06.2014 14:17, Wolfram Sang wrote:
> 
>> Couldn't it be made configurable with a Kconfig entry? E.g. "Enable
>> deprecated class-based instantiation" under Drivers / I2C? Turning it
>> off could make the code ignore the class field completely.
> 
> Technically, yes. But we could also wait another cycle and just be done
> with it :)
> 

OK, if it's just one cycle, then it wouldn't make sense indeed. Thanks
for clarification.

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index bb3a9964f7e0..6f1706cdd9ba 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1135,7 +1135,6 @@  static int s3c24xx_i2c_probe(struct platform_device *pdev)
 	i2c->adap.owner   = THIS_MODULE;
 	i2c->adap.algo    = &s3c24xx_i2c_algorithm;
 	i2c->adap.retries = 2;
-	i2c->adap.class   = I2C_CLASS_HWMON | I2C_CLASS_SPD | I2C_CLASS_DEPRECATED;
 	i2c->tx_setup     = 50;
 
 	init_waitqueue_head(&i2c->wait);