summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2019-06-03 16:34:33 -0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-06-17 21:06:44 +0100
commit9f3bf94f65fc1e065953572495abfe27a044d45c (patch)
treee8753395a898ee8fb17cedbff0272da341e5af5b /drivers/iio
parentf5d2f9c293c2b51abd33477a64ffcc5cb64273f5 (diff)
downloadlinux-stable-9f3bf94f65fc1e065953572495abfe27a044d45c.tar.gz
linux-stable-9f3bf94f65fc1e065953572495abfe27a044d45c.tar.bz2
linux-stable-9f3bf94f65fc1e065953572495abfe27a044d45c.zip
iio: imx7d_adc: Remove unneeded 'average_en' member
average_en is always true, so there is not really need for this structure member. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/imx7d_adc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c
index e31d1a51ee81..85cf8b508385 100644
--- a/drivers/iio/adc/imx7d_adc.c
+++ b/drivers/iio/adc/imx7d_adc.c
@@ -105,8 +105,6 @@ struct imx7d_adc_feature {
enum imx7d_adc_average_num avg_num;
u32 core_time_unit; /* impact the sample rate */
-
- bool average_en;
};
struct imx7d_adc {
@@ -184,7 +182,6 @@ static void imx7d_adc_feature_config(struct imx7d_adc *info)
info->adc_feature.clk_pre_div = IMX7D_ADC_ANALOG_CLK_PRE_DIV_4;
info->adc_feature.avg_num = IMX7D_ADC_AVERAGE_NUM_32;
info->adc_feature.core_time_unit = 1;
- info->adc_feature.average_en = true;
}
static void imx7d_adc_sample_rate_set(struct imx7d_adc *info)
@@ -245,9 +242,8 @@ static void imx7d_adc_channel_set(struct imx7d_adc *info)
/* the channel choose single conversion, and enable average mode */
cfg1 |= (IMX7D_REG_ADC_CH_CFG1_CHANNEL_EN |
- IMX7D_REG_ADC_CH_CFG1_CHANNEL_SINGLE);
- if (info->adc_feature.average_en)
- cfg1 |= IMX7D_REG_ADC_CH_CFG1_CHANNEL_AVG_EN;
+ IMX7D_REG_ADC_CH_CFG1_CHANNEL_SINGLE |
+ IMX7D_REG_ADC_CH_CFG1_CHANNEL_AVG_EN);
/*
* physical channel 0 chose logical channel A