summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/i2c.c
diff options
context:
space:
mode:
authorMichael Mogenson <michael.mogenson@leaflabs.com>2016-03-03 16:23:11 -0500
committerGreg Kroah-Hartman <gregkh@google.com>2016-03-03 13:46:02 -0800
commite494b580ea23a98f2f3b3507157c2d573240486c (patch)
treea3e57f46e4ea65850d235c624f75743461abc217 /drivers/staging/greybus/i2c.c
parentc7733b6167750a42da81133189e9cca33ce7584f (diff)
greybus: remove gb_i2c_timeout_operation
Set timeout operation was removed from the Greybus specification. Remove gb_i2c_timeout_operation and all other no longer necessary code bits from the Greybus kernel code. Signed-off-by: Michael Mogenson <michael.mogenson@leaflabs.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/i2c.c')
-rw-r--r--drivers/staging/greybus/i2c.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c
index ec74e870d76e..d9d483dc1c85 100644
--- a/drivers/staging/greybus/i2c.c
+++ b/drivers/staging/greybus/i2c.c
@@ -18,7 +18,6 @@ struct gb_i2c_device {
struct gb_connection *connection;
u32 functionality;
- u16 timeout_msec;
u8 retries;
struct i2c_adapter adapter;
@@ -50,23 +49,6 @@ static int gb_i2c_functionality_operation(struct gb_i2c_device *gb_i2c_dev)
return 0;
}
-static int gb_i2c_timeout_operation(struct gb_i2c_device *gb_i2c_dev, u16 msec)
-{
- struct device *dev = &gb_i2c_dev->connection->bundle->dev;
- struct gb_i2c_timeout_request request;
- int ret;
-
- request.msec = cpu_to_le16(msec);
- ret = gb_operation_sync(gb_i2c_dev->connection, GB_I2C_TYPE_TIMEOUT,
- &request, sizeof(request), NULL, 0);
- if (ret)
- dev_err(dev, "timeout operation failed (%d)\n", ret);
- else
- gb_i2c_dev->timeout_msec = msec;
-
- return ret;
-}
-
static int gb_i2c_retries_operation(struct gb_i2c_device *gb_i2c_dev,
u8 retries)
{
@@ -267,8 +249,8 @@ static const struct i2c_algorithm gb_i2c_algorithm = {
/*
* Do initial setup of the i2c device. This includes verifying we
* can support it (based on the protocol version it advertises).
- * If that's OK, we get and cached its functionality bits, and
- * set up the retry count and timeout.
+ * If that's OK, we get and cached its functionality bits and
+ * set up the retry count.
*
* Note: gb_i2c_dev->connection is assumed to have been valid.
*/
@@ -281,12 +263,8 @@ static int gb_i2c_device_setup(struct gb_i2c_device *gb_i2c_dev)
if (ret)
return ret;
- /* Set up our default retry count and timeout */
- ret = gb_i2c_retries_operation(gb_i2c_dev, GB_I2C_RETRIES_DEFAULT);
- if (ret)
- return ret;
-
- return gb_i2c_timeout_operation(gb_i2c_dev, GB_I2C_TIMEOUT_DEFAULT);
+ /* Set up our default retry count */
+ return gb_i2c_retries_operation(gb_i2c_dev, GB_I2C_RETRIES_DEFAULT);
}
static int gb_i2c_connection_init(struct gb_connection *connection)
@@ -312,7 +290,6 @@ static int gb_i2c_connection_init(struct gb_connection *connection)
adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
adapter->algo = &gb_i2c_algorithm;
/* adapter->algo_data = what? */
- adapter->timeout = gb_i2c_dev->timeout_msec * HZ / 1000;
adapter->retries = gb_i2c_dev->retries;
adapter->dev.parent = &connection->bundle->dev;