Skip to contentSkip to conversation

staging: iio: ad7780: correct driver read

PATCH Superseded Renato Lui Geh 3 participants 14 messages Nov 1, 2018 – Nov 3, 2018

Subsystems (4)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover staging: iio: ad7780: correct driver read

The purpose of this series is to correct two issues in the driver's raw read function and remove unnecessary struct fields.

Changelog:
*v2

	- separated original patch into two patches
	  (https://marc.info/?l=linux-iio&m=154047435605492)

*v3
- reordered patches so that fixes go first
- removed unnecessary initialization
- removed unnecessary voltage field variable
- dropped reading voltage on probe
- returns -EINVAL error on null voltage

Renato Lui Geh (3):
staging: iio: ad7780: fix offset read value
staging: iio: ad7780: update voltage on read
staging: iio: ad7780: remove unnecessary stashed voltage value

drivers/staging/iio/adc/ad7780.c | 13 +++++++------

1 file changed, 7 insertions(+), 6 deletions(-)
Signature · 1 line
2.19.1
#1 lore raw

PATCH v3 1/3 staging: iio: ad7780: fix offset read value

Variable val subtracted an uninitialized value on IIO_CHAN_INFO_OFFSET. This was fixed by assigning the correct value instead.

---
drivers/staging/iio/adc/ad7780.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7780.c +0 -0
index b67412db0318..91e016d534ed 100644
@@ -96,7 +96,7 @@ static int ad7780_read_raw(struct iio_dev *indio_dev,
		*val2 = chan->scan_type.realbits - 1;
		return IIO_VAL_FRACTIONAL_LOG2;
	case IIO_CHAN_INFO_OFFSET:
-		*val -= (1 << (chan->scan_type.realbits - 1));
+		*val = -(1 << (chan->scan_type.realbits - 1));
		return IIO_VAL_INT;
	}
Signature · 1 line
2.19.1
#6 lore raw

PATCH v3 2/3 staging: iio: ad7780: update voltage on read

In reply to Renato Lui Geh

The ad7780 driver previously did not read the correct device output, as it read an outdated value set at initialization. It now updates its voltage on read.

---
Changes in v3:
- removed initialization (int voltage_uv = 0)
- returns error when voltage_uv is null

drivers/staging/iio/adc/ad7780.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
drivers/staging/iio/adc/ad7780.c +0 -0
index 91e016d534ed..f2a11e9424cd 100644
@@ -87,12 +87,16 @@ static int ad7780_read_raw(struct iio_dev *indio_dev,

long m)

{
	struct ad7780_state *st = iio_priv(indio_dev);

+ int voltage_uv;

	switch (m) {
	case IIO_CHAN_INFO_RAW:
		return ad_sigma_delta_single_conversion(indio_dev, chan, val);
	case IIO_CHAN_INFO_SCALE:

- *val = st->int_vref_mv * st->gain;
+ voltage_uv = regulator_get_voltage(st->reg);
+ if (!voltage_uv)
+ return -EINVAL;

+		*val = (voltage_uv / 1000) * st->gain;
		*val2 = chan->scan_type.realbits - 1;
		return IIO_VAL_FRACTIONAL_LOG2;
	case IIO_CHAN_INFO_OFFSET:
Signature · 1 line
2.19.1
#11 lore raw

PATCH v3 3/3 staging: iio: ad7780: remove unnecessary stashed voltage value

In reply to Renato Lui Geh

This patch removes the unnecessary field int_vref_mv in ad7780_state referring to the device's voltage.

---
Changes in v3:
- removed unnecessary int_vref_mv from ad7780_state

drivers/staging/iio/adc/ad7780.c | 5 +----

1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/iio/adc/ad7780.c +0 -0
index f2a11e9424cd..f250370efcf7 100644
@@ -42,7 +42,6 @@ struct ad7780_state {
	struct regulator		*reg;
	struct gpio_desc		*powerdown_gpio;
	unsigned int	gain;

- u16 int_vref_mv;

	struct ad_sigma_delta sd;
};
@@ -190,9 +189,7 @@ static int ad7780_probe(struct spi_device *spi)
	st->chip_info =
		&ad7780_chip_info_tbl[spi_get_device_id(spi)->driver_data];

- if (voltage_uv)
- st->int_vref_mv = voltage_uv / 1000;
- else
+ if (!voltage_uv)

		dev_warn(&spi->dev, "Reference voltage unspecified\n");

	spi_set_drvdata(spi, indio_dev);
Signature · 1 line
2.19.1
Acked-by on v3 1/3
#2 lore raw

Re: [PATCH v3 1/3] staging: iio: ad7780: fix offset read value

In reply to Renato Lui Geh

Good catch.

Quoted 22 lines · Renato Lui Geh

Variable val subtracted an uninitialized value on IIO_CHAN_INFO_OFFSET. This was fixed by assigning the correct value instead.

---
 drivers/staging/iio/adc/ad7780.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7780.c +1 -1
index b67412db0318..91e016d534ed 100644
@@ -96,7 +96,7 @@ static int ad7780_read_raw(struct iio_dev *indio_dev,
 		*val2 = chan->scan_type.realbits - 1;
 		return IIO_VAL_FRACTIONAL_LOG2;
 	case IIO_CHAN_INFO_OFFSET:
-		*val -= (1 << (chan->scan_type.realbits - 1));
+		*val = -(1 << (chan->scan_type.realbits - 1));
 		return IIO_VAL_INT;
 	}
 
#7 lore raw

Re: [PATCH v3 2/3] staging: iio: ad7780: update voltage on read

In reply to Renato Lui Geh

T24gVGh1LCAyMDE4LTExLTAxIGF0IDExOjQzIC0wMzAwLCBSZW5hdG8gTHVpIEdlaCB3cm90ZToN Cj4gVGhlIGFkNzc4MCBkcml2ZXIgcHJldmlvdXNseSBkaWQgbm90IHJlYWQgdGhlIGNvcnJlY3Qg ZGV2aWNlIG91dHB1dCwgYXMNCj4gaXQgcmVhZCBhbiBvdXRkYXRlZCB2YWx1ZSBzZXQgYXQgaW5p dGlhbGl6YXRpb24uIEl0IG5vdyB1cGRhdGVzIGl0cw0KPiB2b2x0YWdlIG9uIHJlYWQuDQo+IA0K PiBTaWduZWQtb2ZmLWJ5OiBSZW5hdG8gTHVpIEdlaCA8cmVuYXRvZ2VoQGdtYWlsLmNvbT4NCj4g LS0tDQo+IENoYW5nZXMgaW4gdjM6DQo+IAktIHJlbW92ZWQgaW5pdGlhbGl6YXRpb24gKGludCB2 b2x0YWdlX3V2ID0gMCkNCj4gCS0gcmV0dXJucyBlcnJvciB3aGVuIHZvbHRhZ2VfdXYgaXMgbnVs bA0KPiANCj4gIGRyaXZlcnMvc3RhZ2luZy9paW8vYWRjL2FkNzc4MC5jIHwgNiArKysrKy0NCj4g IDEgZmlsZSBjaGFuZ2VkLCA1IGluc2VydGlvbnMoKyks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ZvbHRhZ2VfdXYgLyAxMDAwOw0KPiAtCWVsc2UNCj4gKwlpZiAoIXZvbHRh Z2VfdXYpDQo+ICAJCWRldl93YXJuKCZzcGktPmRldiwgIlJlZmVyZW5jZSB2b2x0YWdlIHVuc3Bl Y2lmaWVkXG4iKTsNCg0KSSB0aGluayB5b3UgY291bGQgcmVtb3ZlIHRoaXMgYWx0b2dldGhlciwg YW5kIGFsc28gcmVtb3ZlIHRoZSBlbnRpcmUNCmB2b2x0YWdlX3V2ID0gcmVndWxhdG9yX2dldF92 b2x0YWdlKHN0LT5yZWcpO2AgYXNzaWdubWVudC4NCg0KSXQgZG9lc24ndCBtYWtlIG11Y2ggc2Vu c2UgdG8gcmVhZCB0aGUgdm9sdGFnZSBoZXJlLCBzaW5jZSBpdCB3b24ndCBiZSB1c2VkDQppbiB0 aGUgcHJvYmUgcGFydCBhbnltb3JlLg0KDQo+ICANCj4gIAlzcGlfc2V0X2RydmRhdGEoc3BpLCBp bmRpb19kZXYpOw0K

maintainer
#3 lore raw

Re: [PATCH v3 1/3] staging: iio: ad7780: fix offset read value

In reply to Ardelean, Alexandru
Quoted 3 lines · Alexandru

Good catch.

On the basis this has been broken for a long time, and you are clearly doing other nearby not fix work, I'm going to take this through the togreg tree rather than via the quicker fix path. It makes my life easier :)

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 24 lines · Renato Lui Geh
Quoted 22 lines

Variable val subtracted an uninitialized value on IIO_CHAN_INFO_OFFSET. This was fixed by assigning the correct value instead.

---
 drivers/staging/iio/adc/ad7780.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7780.c +1 -1
index b67412db0318..91e016d534ed 100644
@@ -96,7 +96,7 @@ static int ad7780_read_raw(struct iio_dev *indio_dev,
 		*val2 = chan->scan_type.realbits - 1;
 		return IIO_VAL_FRACTIONAL_LOG2;
 	case IIO_CHAN_INFO_OFFSET:
-		*val -= (1 << (chan->scan_type.realbits - 1));
+		*val = -(1 << (chan->scan_type.realbits - 1));
 		return IIO_VAL_INT;
 	}
 
maintainer
#8 lore raw

Re: [PATCH v3 2/3] staging: iio: ad7780: update voltage on read

In reply to Ardelean, Alexandru
Quoted 41 lines · Alexandru
Quoted 22 lines · Renato Lui Geh

The ad7780 driver previously did not read the correct device output, as it read an outdated value set at initialization. It now updates its voltage on read.

---
Changes in v3:
- removed initialization (int voltage_uv = 0)
- returns error when voltage_uv is null

 drivers/staging/iio/adc/ad7780.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/staging/iio/adc/ad7780.c +0 -0
index 91e016d534ed..f2a11e9424cd 100644
@@ -87,12 +87,16 @@ static int ad7780_read_raw(struct iio_dev *indio_dev,
 			   long m)
 {
 	struct ad7780_state *st = iio_priv(indio_dev);

drivers/staging/iio/adc/ad7780.c static int ad7780_read_raw(struct iio_dev *indio_dev, · line 98

Quoted 10 lines
drivers/staging/iio/adc/ad7780.c +3 -1
+	int voltage_uv;
 
 	switch (m) {
 	case IIO_CHAN_INFO_RAW:
 		return ad_sigma_delta_single_conversion(indio_dev, chan,
 val);
 	case IIO_CHAN_INFO_SCALE:
-		*val = st->int_vref_mv * st->gain;
+		voltage_uv = regulator_get_voltage(st->reg);
+		if (!voltage_uv)  

This looks wrong.
I admit this was done in the same way in the probe function, but that looks a bit wrong as well.

Typically, the return value of regulator_get_voltage() would get checked with:

Quoted 7 lines

ret = regulator_get_voltage(st->reg);
if (ret < 0)
return ret;
*val = ret / 1000;

So, negative values are errors and zero & positive values are valid voltage values.

This one is a stylistic choice for readability. I ever so slightly prefer how Alex has it but don't care enough that I'd have commented on it ;)

However, nice to tidy up as you'll be respinning patch 3 anyway!

Thanks,

Jonathan

Quoted 6 lines
Quoted 6 lines
drivers/staging/iio/adc/ad7780.c +2 -0
+			return -EINVAL;
+		*val = (voltage_uv / 1000) * st->gain;
 		*val2 = chan->scan_type.realbits - 1;
 		return IIO_VAL_FRACTIONAL_LOG2;

case IIO_CHAN_INFO_OFFSET:

maintainer
#13 lore raw

Re: [PATCH v3 3/3] staging: iio: ad7780: remove unnecessary stashed voltage value

In reply to Ardelean, Alexandru
Quoted 38 lines · Alexandru
Quoted 25 lines · Renato Lui Geh

This patch removes the unnecessary field int_vref_mv in ad7780_state referring to the device's voltage.

---
Changes in v3:
- removed unnecessary int_vref_mv from ad7780_state

 drivers/staging/iio/adc/ad7780.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/iio/adc/ad7780.c +0 -1
index f2a11e9424cd..f250370efcf7 100644
@@ -42,7 +42,6 @@ struct ad7780_state {
 	struct regulator		*reg;
 	struct gpio_desc		*powerdown_gpio;
 	unsigned int	gain;
-	u16				int_vref_mv;
 
 	struct ad_sigma_delta sd;
 };

drivers/staging/iio/adc/ad7780.c static int ad7780_probe(struct spi_device *spi) · line 193

Quoted 8 lines
drivers/staging/iio/adc/ad7780.c +1 -3
@@ -190,9 +189,7 @@ static int ad7780_probe(struct spi_device *spi)
 	st->chip_info =
 		&ad7780_chip_info_tbl[spi_get_device_id(spi)->driver_data];
 
-	if (voltage_uv)
-		st->int_vref_mv = voltage_uv / 1000;
-	else
+	if (!voltage_uv)
 		dev_warn(&spi->dev, "Reference voltage unspecified\n");  

I think you could remove this altogether, and also remove the entire voltage_uv = regulator_get_voltage(st->reg); assignment.

Quoted 3 lines

It doesn't make much sense to read the voltage here, since it won't be used in the probe part anymore.

Absolutely agree on this. There is no point in reading here at all.

Jonathan

Quoted 2 lines
Quoted 2 lines
drivers/staging/iio/adc/ad7780.c +0 -0
 	spi_set_drvdata(spi, indio_dev);  
#4 lore raw

Re: [PATCH v3 1/3] staging: iio: ad7780: fix offset read value

In reply to Jonathan Cameron

Hi,

Quoted 4 lines
Quoted 1 line · Alexandru

Good catch.

That was actually Jonathan's catch. :)

Quoted 1 line
Quoted 1 line

I read up on Acked-by on the kernel docs, as I didn't know exactly what it meant, but I'm not so sure on how to proceed once the patch has been acked. For future patches, do I add this Acked-by line on the patch's message body? Or is this just an informal way of approval?

Quoted 7 lines

On the basis this has been broken for a long time, and you are clearly doing other nearby not fix work, I'm going to take this through the togreg tree rather than via the quicker fix path. It makes my life easier :)

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

So this means I should skip this patch on v4, right?

Thanks,
Renato

#9 lore raw

Re: [PATCH v3 2/3] staging: iio: ad7780: update voltage on read

In reply to Jonathan Cameron
Quoted 8 lines · Alexandru

This looks wrong.
I admit this was done in the same way in the probe function, but that looks a bit wrong as well.

Typically, the return value of regulator_get_voltage() would get checked with:

Quoted 7 lines

ret = regulator_get_voltage(st->reg);
if (ret < 0)
return ret;
*val = ret / 1000;

So, negative values are errors and zero & positive values are valid voltage values.

I see. So -EINVAL is only used when sent the wrong info type?

maintainer
#10 lore raw

Re: [PATCH v3 2/3] staging: iio: ad7780: update voltage on read

Quoted 15 lines · On Sat, 3 Nov 2018 13:06:19 -0300 Renato Lui Geh <[email protected]> wrote:
Quoted 13 lines · Alexandru

This looks wrong.
I admit this was done in the same way in the probe function, but that looks a bit wrong as well.

Typically, the return value of regulator_get_voltage() would get checked with:

ret = regulator_get_voltage(st->reg);
if (ret < 0)
return ret;
*val = ret / 1000;

Quoted 4 lines
Quoted 2 lines

So, negative values are errors and zero & positive values are valid voltage values.

I see. So -EINVAL is only used when sent the wrong info type?

yes. I actually misread what was there and thought we were just talking about using a ret variable rather than returning the error via your local variable.

Definitely want to pass on the error from regulator_get_voltage as it may have more meaning than a simple -EINVAL.

Thanks,

Jonathan

maintainer
#5 lore raw

Re: [PATCH v3 1/3] staging: iio: ad7780: fix offset read value

In reply to Renato Lui Geh
Quoted 7 lines · On Sat, 3 Nov 2018 12:59:16 -0300 Renato Lui Geh <[email protected]> wrote:

Hi,

Quoted 4 lines
Quoted 1 line · Alexandru

Good catch.

Quoted 8 lines

That was actually Jonathan's catch. :)

Quoted 1 line
Quoted 1 line

I read up on Acked-by on the kernel docs, as I didn't know exactly what it meant, but I'm not so sure on how to proceed once the patch has been acked. For future patches, do I add this Acked-by line on the patch's message body? Or is this just an informal way of approval?

It's formal. You put the line directly below your Signed-off-by: line if you are resending. If I pick up the patch I paste it in there whilst applying.

Quoted 10 lines
Quoted 8 lines

On the basis this has been broken for a long time, and you are clearly doing other nearby not fix work, I'm going to take this through the togreg tree rather than via the quicker fix path. It makes my life easier :)

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

So this means I should skip this patch on v4, right?

Yes. Already in the tree so don't send it again.

Thanks

Jonathan

Quoted 4 lines

Thanks,
Renato