aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2015-01-07 06:24:10 -0500
committerWolfram Sang <wsa@the-dreams.de>2015-03-13 10:10:55 -0400
commit280d230012dc0441e7fd8c722ac06dc370ce78d0 (patch)
tree9c82deeba14b0e494fcb0a471544978b491364df /drivers/i2c
parentb94c820f37804a461376205b4919eef300ff3abe (diff)
i2c: axxia: make use of the new infrastructure for quirks
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-axxia.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 768a598d8d03..488c5d3bf9db 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -336,11 +336,6 @@ static int axxia_i2c_xfer_msg(struct axxia_i2c_dev *idev, struct i2c_msg *msg)
336 u32 addr_1, addr_2; 336 u32 addr_1, addr_2;
337 int ret; 337 int ret;
338 338
339 if (msg->len > 255) {
340 dev_warn(idev->dev, "unsupported length %u\n", msg->len);
341 return -EINVAL;
342 }
343
344 idev->msg = msg; 339 idev->msg = msg;
345 idev->msg_xfrd = 0; 340 idev->msg_xfrd = 0;
346 idev->msg_err = 0; 341 idev->msg_err = 0;
@@ -454,6 +449,11 @@ static const struct i2c_algorithm axxia_i2c_algo = {
454 .functionality = axxia_i2c_func, 449 .functionality = axxia_i2c_func,
455}; 450};
456 451
452static struct i2c_adapter_quirks axxia_i2c_quirks = {
453 .max_read_len = 255,
454 .max_write_len = 255,
455};
456
457static int axxia_i2c_probe(struct platform_device *pdev) 457static int axxia_i2c_probe(struct platform_device *pdev)
458{ 458{
459 struct device_node *np = pdev->dev.of_node; 459 struct device_node *np = pdev->dev.of_node;
@@ -511,6 +511,7 @@ static int axxia_i2c_probe(struct platform_device *pdev)
511 strlcpy(idev->adapter.name, pdev->name, sizeof(idev->adapter.name)); 511 strlcpy(idev->adapter.name, pdev->name, sizeof(idev->adapter.name));
512 idev->adapter.owner = THIS_MODULE; 512 idev->adapter.owner = THIS_MODULE;
513 idev->adapter.algo = &axxia_i2c_algo; 513 idev->adapter.algo = &axxia_i2c_algo;
514 idev->adapter.quirks = &axxia_i2c_quirks;
514 idev->adapter.dev.parent = &pdev->dev; 515 idev->adapter.dev.parent = &pdev->dev;
515 idev->adapter.dev.of_node = pdev->dev.of_node; 516 idev->adapter.dev.of_node = pdev->dev.of_node;
516 517