i2c: Remove setting for 1 second timeout from adapter drivers
Subsystems (3)
PATCH RESEND 1/1 i2c: Remove setting for 1 second timeout from adapter drivers
I2C adapter drivers that are using 1 second timeout can leave the timeout unset and let the i2c-core.c: i2c_register_adapter() to set it instead.
--- drivers/i2c/busses/i2c-ibm_iic.c | 1 - drivers/i2c/busses/i2c-iop3xx.c | 1 - drivers/i2c/busses/i2c-mpc.c | 1 - drivers/i2c/busses/i2c-mv64xxx.c | 5 ----- drivers/i2c/busses/i2c-pca-platform.c | 1 - 5 files changed, 9 deletions(-)
drivers/i2c/busses/i2c-ibm_iic.c +0 -1
@@ -748,7 +748,6 @@ static int iic_probe(struct platform_device *ofdev)i2c_set_adapdata (adap, dev); adap->class =I2C_CLASS_HWMON |I2C_CLASS_SPD ; adap->algo = &iic_algo; - adap->timeout =HZ ; ret =i2c_add_adapter (adap);if (ret <0 ) {
drivers/i2c/busses/i2c-iop3xx.c +0 -1
@@ -479,7 +479,6 @@ iop3xx_i2c_probe(struct platform_device *pdev)/* * Default values...should these come in from board code? */ - new_adapter->timeout =HZ ; new_adapter->algo = &iop3xx_i2c_algo;init_waitqueue_head (&adapter_data->waitq);
drivers/i2c/busses/i2c-mpc.c +0 -1
@@ -640,7 +640,6 @@ static const struct i2c_algorithm mpc_algo = {static struct i2c_adapter mpc_ops = { .owner =THIS_MODULE , .algo = &mpc_algo, - .timeout =HZ , };static const struct of_device_id mpc_i2c_of_match[];
drivers/i2c/busses/i2c-mv64xxx.c +0 -5
@@ -839,11 +839,6 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,reset_control_deassert (drv_data->rstc); } -/* Its not yet defined how timeouts will be specified in device tree. -* So hard code the value to 1 second. -*/ - drv_data->adapter.timeout =HZ ; - device =of_match_device (mv64xxx_i2c_of_match_table, dev);if (!device)return -ENODEV ;
drivers/i2c/busses/i2c-pca-platform.c +0 -1
@@ -183,7 +183,6 @@ static int i2c_pca_pf_probe(struct platform_device *pdev) i2c->algo_data.i2c_clock = platform_data->i2c_clock_speed; i2c->gpio = platform_data->gpio; }else { - i2c->adap.timeout =HZ ; i2c->algo_data.i2c_clock =59000 ; i2c->gpio =-1 ; }
Signature · 1 line
2.6.2
Quoted 4 lines · Jarkko Nikula
I2C adapter drivers that are using 1 second timeout can leave the timeout unset and let the
i2c-core.c:i2c_register_adapter()to set it instead.Signed-off-by Jarkko Nikula <[email protected]>
My take on this is that I prefer the explicit (and thus visible) assignment. What the core does was intended as a fallback to prevent strange things happening with a 0 value.
Quoted 10 lines · Wolfram Sang
Quoted 4 lines · Jarkko Nikula
I2C adapter drivers that are using 1 second timeout can leave the timeout unset and let the
i2c-core.c:i2c_register_adapter()to set it instead.Signed-off-by Jarkko Nikula <[email protected]>My take on this is that I prefer the explicit (and thus visible) assignment. What the core does was intended as a fallback to prevent strange things happening with a 0 value.
Fair enough. It's hard to say if some of these really needs to be 1 second instead of being stetson guessed or copy-pasted. Now if we ever change the fall back value from HZ to HZ/10 or similar we might get a regression.
Signature · 1 line
Jarkko