All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Staging: iio: tsl2583 checkpatch fixes
@ 2014-04-10  2:26 Michael Welling
  2014-04-10  2:26 ` [PATCH 1/3] Staging: iio: Removes unwanted space before semicolon Michael Welling
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael Welling @ 2014-04-10  2:26 UTC (permalink / raw)
  To: linux-iio, jic23, gregkh; +Cc: Michael Welling

Updated patch series with appropriate subject and sign off.
Replaces '[PATCH 0/3] tsl2583 checkpatch fixes' patch series.

Michael Welling (3):
  Removes unwanted space before semicolon
  Remove quoted string split across lines warnings
  Switch from msleep to usleep range per timers-howto.txt

 drivers/staging/iio/light/tsl2583.c |   38 ++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 18 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] Staging: iio: Removes unwanted space before semicolon
  2014-04-10  2:26 [PATCH 0/3] Staging: iio: tsl2583 checkpatch fixes Michael Welling
@ 2014-04-10  2:26 ` Michael Welling
  2014-04-12 17:30   ` Jonathan Cameron
  2014-04-10  2:26 ` [PATCH 2/3] Staging: iio: Remove quoted string split across lines warnings Michael Welling
  2014-04-10  2:26 ` [PATCH 3/3] Staging: iio: Switch from msleep to usleep range per timers-howto.txt Michael Welling
  2 siblings, 1 reply; 7+ messages in thread
From: Michael Welling @ 2014-04-10  2:26 UTC (permalink / raw)
  To: linux-iio, jic23, gregkh; +Cc: Michael Welling

Signed-off-by: Michael Welling <mwelling@ieee.org>
---
 drivers/staging/iio/light/tsl2583.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
index 0a60def..77c7f65 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio/light/tsl2583.c
@@ -211,7 +211,7 @@ static int taos_get_lux(struct iio_dev *indio_dev)
 	if (chip->taos_chip_status != TSL258X_CHIP_WORKING) {
 		/* device is not enabled */
 		dev_err(&chip->client->dev, "taos_get_lux device is not enabled\n");
-		ret = -EBUSY ;
+		ret = -EBUSY;
 		goto out_unlock;
 	}
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] Staging: iio: Remove quoted string split across lines warnings
  2014-04-10  2:26 [PATCH 0/3] Staging: iio: tsl2583 checkpatch fixes Michael Welling
  2014-04-10  2:26 ` [PATCH 1/3] Staging: iio: Removes unwanted space before semicolon Michael Welling
@ 2014-04-10  2:26 ` Michael Welling
  2014-04-12 17:31   ` Jonathan Cameron
  2014-04-10  2:26 ` [PATCH 3/3] Staging: iio: Switch from msleep to usleep range per timers-howto.txt Michael Welling
  2 siblings, 1 reply; 7+ messages in thread
From: Michael Welling @ 2014-04-10  2:26 UTC (permalink / raw)
  To: linux-iio, jic23, gregkh; +Cc: Michael Welling

Signed-off-by: Michael Welling <mwelling@ieee.org>
---
 drivers/staging/iio/light/tsl2583.c |   34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
index 77c7f65..f015fb4 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio/light/tsl2583.c
@@ -165,8 +165,9 @@ taos_i2c_read(struct i2c_client *client, u8 reg, u8 *val, unsigned int len)
 		/* select register to write */
 		ret = i2c_smbus_write_byte(client, (TSL258X_CMD_REG | reg));
 		if (ret < 0) {
-			dev_err(&client->dev, "taos_i2c_read failed to write"
-				" register %x\n", reg);
+			dev_err(&client->dev,
+				"taos_i2c_read failed to write register %x\n",
+				reg);
 			return ret;
 		}
 		/* read the data */
@@ -231,8 +232,9 @@ static int taos_get_lux(struct iio_dev *indio_dev)
 		int reg = TSL258X_CMD_REG | (TSL258X_ALS_CHAN0LO + i);
 		ret = taos_i2c_read(chip->client, reg, &buf[i], 1);
 		if (ret < 0) {
-			dev_err(&chip->client->dev, "taos_get_lux failed to read"
-				" register %x\n", reg);
+			dev_err(&chip->client->dev,
+				"taos_get_lux failed to read register %x\n",
+				reg);
 			goto out_unlock;
 		}
 	}
@@ -809,9 +811,7 @@ static int taos_probe(struct i2c_client *clientp,
 
 	if (!i2c_check_functionality(clientp->adapter,
 		I2C_FUNC_SMBUS_BYTE_DATA)) {
-		dev_err(&clientp->dev,
-			"taos_probe() - i2c smbus byte data "
-			"functions unsupported\n");
+		dev_err(&clientp->dev, "taos_probe() - i2c smbus byte data func unsupported\n");
 		return -EOPNOTSUPP;
 	}
 
@@ -830,30 +830,32 @@ static int taos_probe(struct i2c_client *clientp,
 		ret = i2c_smbus_write_byte(clientp,
 				(TSL258X_CMD_REG | (TSL258X_CNTRL + i)));
 		if (ret < 0) {
-			dev_err(&clientp->dev, "i2c_smbus_write_bytes() to cmd "
-				"reg failed in taos_probe(), err = %d\n", ret);
+			dev_err(&clientp->dev,
+				"i2c_smbus_write_byte to cmd reg failed in taos_probe(), err = %d\n",
+				ret);
 			return ret;
 		}
 		ret = i2c_smbus_read_byte(clientp);
 		if (ret < 0) {
-			dev_err(&clientp->dev, "i2c_smbus_read_byte from "
-				"reg failed in taos_probe(), err = %d\n", ret);
-
+			dev_err(&clientp->dev,
+				"i2c_smbus_read_byte from reg failed in taos_probe(), err = %d\n",
+				ret);
 			return ret;
 		}
 		buf[i] = ret;
 	}
 
 	if (!taos_tsl258x_device(buf)) {
-		dev_info(&clientp->dev, "i2c device found but does not match "
-			"expected id in taos_probe()\n");
+		dev_info(&clientp->dev,
+			"i2c device found but does not match expected id in taos_probe()\n");
 		return -EINVAL;
 	}
 
 	ret = i2c_smbus_write_byte(clientp, (TSL258X_CMD_REG | TSL258X_CNTRL));
 	if (ret < 0) {
-		dev_err(&clientp->dev, "i2c_smbus_write_byte() to cmd reg "
-			"failed in taos_probe(), err = %d\n", ret);
+		dev_err(&clientp->dev,
+			"i2c_smbus_write_byte() to cmd reg failed in taos_probe(), err = %d\n",
+			ret);
 		return ret;
 	}
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] Staging: iio: Switch from msleep to usleep range per timers-howto.txt
  2014-04-10  2:26 [PATCH 0/3] Staging: iio: tsl2583 checkpatch fixes Michael Welling
  2014-04-10  2:26 ` [PATCH 1/3] Staging: iio: Removes unwanted space before semicolon Michael Welling
  2014-04-10  2:26 ` [PATCH 2/3] Staging: iio: Remove quoted string split across lines warnings Michael Welling
@ 2014-04-10  2:26 ` Michael Welling
  2014-04-12 17:39   ` Jonathan Cameron
  2 siblings, 1 reply; 7+ messages in thread
From: Michael Welling @ 2014-04-10  2:26 UTC (permalink / raw)
  To: linux-iio, jic23, gregkh; +Cc: Michael Welling

Signed-off-by: Michael Welling <mwelling@ieee.org>
---
 drivers/staging/iio/light/tsl2583.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
index f015fb4..fa96498 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio/light/tsl2583.c
@@ -451,7 +451,7 @@ static int taos_chip_on(struct iio_dev *indio_dev)
 		}
 	}
 
-	msleep(3);
+	usleep_range(3000, 3500);
 	/* NOW enable the ADC
 	 * initialize the desired mode of operation */
 	utmp = TSL258X_CNTL_PWR_ON | TSL258X_CNTL_ADC_ENBL;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] Staging: iio: Removes unwanted space before semicolon
  2014-04-10  2:26 ` [PATCH 1/3] Staging: iio: Removes unwanted space before semicolon Michael Welling
@ 2014-04-12 17:30   ` Jonathan Cameron
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2014-04-12 17:30 UTC (permalink / raw)
  To: Michael Welling, linux-iio, gregkh

On 10/04/14 03:26, Michael Welling wrote:
> Signed-off-by: Michael Welling <mwelling@ieee.org>
Applied, though renamed to mention the fact it is in the tsl2583 driver rather than
generally across the subsystem.  Will be in the togreg branch, but I initially
push that out as testing to allow the various autobuilders to play.

Thanks,

Jonathan
> ---
>   drivers/staging/iio/light/tsl2583.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
> index 0a60def..77c7f65 100644
> --- a/drivers/staging/iio/light/tsl2583.c
> +++ b/drivers/staging/iio/light/tsl2583.c
> @@ -211,7 +211,7 @@ static int taos_get_lux(struct iio_dev *indio_dev)
>   	if (chip->taos_chip_status != TSL258X_CHIP_WORKING) {
>   		/* device is not enabled */
>   		dev_err(&chip->client->dev, "taos_get_lux device is not enabled\n");
> -		ret = -EBUSY ;
> +		ret = -EBUSY;
>   		goto out_unlock;
>   	}
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] Staging: iio: Remove quoted string split across lines warnings
  2014-04-10  2:26 ` [PATCH 2/3] Staging: iio: Remove quoted string split across lines warnings Michael Welling
@ 2014-04-12 17:31   ` Jonathan Cameron
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2014-04-12 17:31 UTC (permalink / raw)
  To: Michael Welling, linux-iio, gregkh

On 10/04/14 03:26, Michael Welling wrote:
> Signed-off-by: Michael Welling <mwelling@ieee.org>
Applied to the togreg branch of iio.git - initially pushed out as testing.

Thanks,
> ---
>   drivers/staging/iio/light/tsl2583.c |   34 ++++++++++++++++++----------------
>   1 file changed, 18 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
> index 77c7f65..f015fb4 100644
> --- a/drivers/staging/iio/light/tsl2583.c
> +++ b/drivers/staging/iio/light/tsl2583.c
> @@ -165,8 +165,9 @@ taos_i2c_read(struct i2c_client *client, u8 reg, u8 *val, unsigned int len)
>   		/* select register to write */
>   		ret = i2c_smbus_write_byte(client, (TSL258X_CMD_REG | reg));
>   		if (ret < 0) {
> -			dev_err(&client->dev, "taos_i2c_read failed to write"
> -				" register %x\n", reg);
> +			dev_err(&client->dev,
> +				"taos_i2c_read failed to write register %x\n",
> +				reg);
>   			return ret;
>   		}
>   		/* read the data */
> @@ -231,8 +232,9 @@ static int taos_get_lux(struct iio_dev *indio_dev)
>   		int reg = TSL258X_CMD_REG | (TSL258X_ALS_CHAN0LO + i);
>   		ret = taos_i2c_read(chip->client, reg, &buf[i], 1);
>   		if (ret < 0) {
> -			dev_err(&chip->client->dev, "taos_get_lux failed to read"
> -				" register %x\n", reg);
> +			dev_err(&chip->client->dev,
> +				"taos_get_lux failed to read register %x\n",
> +				reg);
>   			goto out_unlock;
>   		}
>   	}
> @@ -809,9 +811,7 @@ static int taos_probe(struct i2c_client *clientp,
>
>   	if (!i2c_check_functionality(clientp->adapter,
>   		I2C_FUNC_SMBUS_BYTE_DATA)) {
> -		dev_err(&clientp->dev,
> -			"taos_probe() - i2c smbus byte data "
> -			"functions unsupported\n");
> +		dev_err(&clientp->dev, "taos_probe() - i2c smbus byte data func unsupported\n");
>   		return -EOPNOTSUPP;
>   	}
>
> @@ -830,30 +830,32 @@ static int taos_probe(struct i2c_client *clientp,
>   		ret = i2c_smbus_write_byte(clientp,
>   				(TSL258X_CMD_REG | (TSL258X_CNTRL + i)));
>   		if (ret < 0) {
> -			dev_err(&clientp->dev, "i2c_smbus_write_bytes() to cmd "
> -				"reg failed in taos_probe(), err = %d\n", ret);
> +			dev_err(&clientp->dev,
> +				"i2c_smbus_write_byte to cmd reg failed in taos_probe(), err = %d\n",
> +				ret);
>   			return ret;
>   		}
>   		ret = i2c_smbus_read_byte(clientp);
>   		if (ret < 0) {
> -			dev_err(&clientp->dev, "i2c_smbus_read_byte from "
> -				"reg failed in taos_probe(), err = %d\n", ret);
> -
> +			dev_err(&clientp->dev,
> +				"i2c_smbus_read_byte from reg failed in taos_probe(), err = %d\n",
> +				ret);
>   			return ret;
>   		}
>   		buf[i] = ret;
>   	}
>
>   	if (!taos_tsl258x_device(buf)) {
> -		dev_info(&clientp->dev, "i2c device found but does not match "
> -			"expected id in taos_probe()\n");
> +		dev_info(&clientp->dev,
> +			"i2c device found but does not match expected id in taos_probe()\n");
>   		return -EINVAL;
>   	}
>
>   	ret = i2c_smbus_write_byte(clientp, (TSL258X_CMD_REG | TSL258X_CNTRL));
>   	if (ret < 0) {
> -		dev_err(&clientp->dev, "i2c_smbus_write_byte() to cmd reg "
> -			"failed in taos_probe(), err = %d\n", ret);
> +		dev_err(&clientp->dev,
> +			"i2c_smbus_write_byte() to cmd reg failed in taos_probe(), err = %d\n",
> +			ret);
>   		return ret;
>   	}
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] Staging: iio: Switch from msleep to usleep range per timers-howto.txt
  2014-04-10  2:26 ` [PATCH 3/3] Staging: iio: Switch from msleep to usleep range per timers-howto.txt Michael Welling
@ 2014-04-12 17:39   ` Jonathan Cameron
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2014-04-12 17:39 UTC (permalink / raw)
  To: Michael Welling, linux-iio, Greg Kroah-Hartman, Jon.Brenner

On 10/04/14 03:26, Michael Welling wrote:
> Signed-off-by: Michael Welling <mwelling@ieee.org>
Hmm. I wonder if this is a little too tight on the range, but
given it is in a function that is likely to be called infrequently
it doesn't really matter.  Note this is where we find out whether
the datasheet is actually accurate is saying 3 msecs is long enough
by whether anyone screams :)

Also cc'd Jon as if anyone screams about this they are likely to do it
at him.  As a general rule, do cc the original author unless you know
there email bounces (and if so mention it in the cover letter as someone
might know where to get hold of them).

Applied to the togreg branch of iio.git - initially pushed out as testing.

Thanks,

Jonathan
> ---
>   drivers/staging/iio/light/tsl2583.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
> index f015fb4..fa96498 100644
> --- a/drivers/staging/iio/light/tsl2583.c
> +++ b/drivers/staging/iio/light/tsl2583.c
> @@ -451,7 +451,7 @@ static int taos_chip_on(struct iio_dev *indio_dev)
>   		}
>   	}
>
> -	msleep(3);
> +	usleep_range(3000, 3500);
>   	/* NOW enable the ADC
>   	 * initialize the desired mode of operation */
>   	utmp = TSL258X_CNTL_PWR_ON | TSL258X_CNTL_ADC_ENBL;
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-12 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-10  2:26 [PATCH 0/3] Staging: iio: tsl2583 checkpatch fixes Michael Welling
2014-04-10  2:26 ` [PATCH 1/3] Staging: iio: Removes unwanted space before semicolon Michael Welling
2014-04-12 17:30   ` Jonathan Cameron
2014-04-10  2:26 ` [PATCH 2/3] Staging: iio: Remove quoted string split across lines warnings Michael Welling
2014-04-12 17:31   ` Jonathan Cameron
2014-04-10  2:26 ` [PATCH 3/3] Staging: iio: Switch from msleep to usleep range per timers-howto.txt Michael Welling
2014-04-12 17:39   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.