1 From 0c2744e901150b27a60bded1acb058ce26709d5a Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
3 Date: Fri, 23 Sep 2016 04:57:17 +0200
4 Subject: [PATCH] i2c: bcm2835: Support i2c-dev ioctl I2C_TIMEOUT
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Use i2c_adapter->timeout for the completion timeout value. The core
12 Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
13 Reviewed-by: Eric Anholt <eric@anholt.net>
15 drivers/i2c/busses/i2c-bcm2835.c | 4 +---
16 1 file changed, 1 insertion(+), 3 deletions(-)
18 --- a/drivers/i2c/busses/i2c-bcm2835.c
19 +++ b/drivers/i2c/busses/i2c-bcm2835.c
21 #define BCM2835_I2C_CDIV_MIN 0x0002
22 #define BCM2835_I2C_CDIV_MAX 0xFFFE
24 -#define BCM2835_I2C_TIMEOUT (msecs_to_jiffies(1000))
26 struct bcm2835_i2c_dev {
29 @@ -242,7 +240,7 @@ static int bcm2835_i2c_xfer(struct i2c_a
30 bcm2835_i2c_start_transfer(i2c_dev);
32 time_left = wait_for_completion_timeout(&i2c_dev->completion,
33 - BCM2835_I2C_TIMEOUT);
36 bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C,