Skip to contentSkip to conversation

iio: adc: xilinx-ams: add missing break in AMS_SUPPLY[78] cases

PATCH In review Jean-Francois Dagenais 3 participants 3 messages Jun 6, 2017 – Jun 21, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: adc: xilinx-ams: add missing break in AMS_SUPPLY[78] cases

This would otherwise lead supply 7 and 8 to scale to 3V instead of 6V

---
 drivers/iio/adc/xilinx-ams.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/xilinx-ams.c +1 -0
index fd4eb6d..6b3ab56 100644
@@ -255,6 +255,7 @@ static int ams_read_raw(struct iio_dev *indio_dev,
 			case AMS_SUPPLY7:
 			case AMS_SUPPLY8:
 				*val = AMS_SUPPLY_SCALE_6VOLT;
+				break;
 			case AMS_SUPPLY9:
 			case AMS_SUPPLY10:
 				if (chan->scan_index < PS_SEQ_MAX)
Signature · 1 line
2.1.4
maintainer
#1 lore raw
Quoted 4 lines · On Tue, 6 Jun 2017 15:21:21 -0400 Jean-Francois Dagenais…

This would otherwise lead supply 7 and 8 to scale to 3V instead of 6V

Interesting... Driver isn't in mainline though and as far as I know hasn't been submitted.

Jonathan

Quoted 16 lines
---
 drivers/iio/adc/xilinx-ams.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/xilinx-ams.c +1 -0
index fd4eb6d..6b3ab56 100644
@@ -255,6 +255,7 @@ static int ams_read_raw(struct iio_dev *indio_dev,
 			case AMS_SUPPLY7:
 			case AMS_SUPPLY8:
 				*val = AMS_SUPPLY_SCALE_6VOLT;
+				break;
 			case AMS_SUPPLY9:
 			case AMS_SUPPLY10:
 				if (chan->scan_index < PS_SEQ_MAX)
#2 lore raw
Quoted 9 lines · Jonathan Cameron
Quoted 4 lines · On Tue, 6 Jun 2017 15:21:21 -0400 Jean-Francois Dagenais…

This would otherwise lead supply 7 and 8 to scale to 3V instead of 6V

Interesting... Driver isn't in mainline though and as far as I know hasn't been submitted.

It is in Xilinx tree. I hope that this will be send out soon for review.

Thanks,
Michal