From: Fabio Estevam <festevam@gmail.com>
To: jic23@kernel.org
Cc: andrew.smirnov@gmail.com, linux-iio@vger.kernel.org,
Fabio Estevam <festevam@gmail.com>
Subject: [PATCH 4/4] iio: imx7d_adc: Remove unneeded 'average_en' member
Date: Mon, 3 Jun 2019 16:34:33 -0300 [thread overview]
Message-ID: <20190603193433.6394-4-festevam@gmail.com> (raw)
In-Reply-To: <20190603193433.6394-1-festevam@gmail.com>
average_en is always true, so there is not really need for
this structure member.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/iio/adc/imx7d_adc.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c
index 46e88899ad74..26a7bbe4d534 100644
--- a/drivers/iio/adc/imx7d_adc.c
+++ b/drivers/iio/adc/imx7d_adc.c
@@ -101,8 +101,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 {
@@ -180,7 +178,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)
@@ -241,9 +238,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
--
2.17.1
next prev parent reply other threads:[~2019-06-03 19:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 19:34 [PATCH 1/4] iio: imx7d_adc: Remove unneeded error message Fabio Estevam
2019-06-03 19:34 ` [PATCH 2/4] iio: imx7d_adc: Introduce a definition for the input clock Fabio Estevam
2019-06-08 12:59 ` Jonathan Cameron
2019-06-03 19:34 ` [PATCH 3/4] iio: imx7d_adc: Fit into a single line Fabio Estevam
2019-06-08 13:00 ` Jonathan Cameron
2019-06-03 19:34 ` Fabio Estevam [this message]
2019-06-08 13:01 ` [PATCH 4/4] iio: imx7d_adc: Remove unneeded 'average_en' member Jonathan Cameron
2019-06-08 12:58 ` [PATCH 1/4] iio: imx7d_adc: Remove unneeded error message Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190603193433.6394-4-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=andrew.smirnov@gmail.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.