[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200204101008.11411-4-olivier.moysan@st.com>
Date: Tue, 4 Feb 2020 11:10:07 +0100
From: Olivier Moysan <olivier.moysan@...com>
To: <jic23@...nel.org>, <robh+dt@...nel.org>, <olivier.moysan@...com>
CC: <mark.rutland@....com>, <knaack.h@....de>, <lars@...afoo.de>,
<devicetree@...r.kernel.org>, <linux-iio@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <pmeerw@...erw.net>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>
Subject: [PATCH 3/4] iio: adc: stm32-dfsdm: use resolution define
Use resolution define instead of hard coded value.
Signed-off-by: Olivier Moysan <olivier.moysan@...com>
---
drivers/iio/adc/stm32-dfsdm-adc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c
index 2aad2cda6943..07b9dfdf8e76 100644
--- a/drivers/iio/adc/stm32-dfsdm-adc.c
+++ b/drivers/iio/adc/stm32-dfsdm-adc.c
@@ -1440,7 +1440,7 @@ static int stm32_dfsdm_adc_chan_init_one(struct iio_dev *indio_dev,
ch->scan_type.shift = 8;
}
ch->scan_type.sign = 's';
- ch->scan_type.realbits = 24;
+ ch->scan_type.realbits = DFSDM_DATA_RES;
ch->scan_type.storagebits = 32;
return stm32_dfsdm_chan_configure(adc->dfsdm,
--
2.17.1
Powered by blists - more mailing lists