From: Deepak R Varma <mh12gx2825@gmail.com>
To: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org,
daniel.baluta@gmail.com, kieran.bingham@ideasonboard.com
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org,
linux-iio@vger.kernel.org
Subject: [PATCH v3 2/4] staging: iio: adc: ad7192: Correct macro names from SYNC to SINC
Date: Mon, 23 Mar 2020 01:25:13 +0530 [thread overview]
Message-ID: <a5aea6836da9aa2f950449225892ee18f10e217c.1584904896.git.mh12gx2825@gmail.com> (raw)
In-Reply-To: <cover.1584904896.git.mh12gx2825@gmail.com>
Three macros include SYNC in their names which is a typo. Update those
names to SINC.
Fixes: 77f6a23092c0 ("staging: iio: adc: ad7192: Add low_pass_3db_filter_frequency")
Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
---
Changes since v2:
- None. Version increment to follow patch series versioning.
Changes since v1:
- None. Patch added in v2 version as suggested by Stefano.
drivers/iio/adc/ad7192.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/iio/adc/ad7192.c b/drivers/iio/adc/ad7192.c
index 02981f3d1794..d9a220d4217f 100644
--- a/drivers/iio/adc/ad7192.c
+++ b/drivers/iio/adc/ad7192.c
@@ -144,9 +144,9 @@
#define AD7192_EXT_FREQ_MHZ_MAX 5120000
#define AD7192_INT_FREQ_MHZ 4915200
-#define AD7192_NO_SYNC_FILTER 1
-#define AD7192_SYNC3_FILTER 3
-#define AD7192_SYNC4_FILTER 4
+#define AD7192_NO_SINC_FILTER 1
+#define AD7192_SINC3_FILTER 3
+#define AD7192_SINC4_FILTER 4
/* NOTE:
* The AD7190/2/5 features a dual use data out ready DOUT/RDY output.
@@ -367,7 +367,7 @@ static int ad7192_setup(struct ad7192_state *st, struct device_node *np)
st->conf |= AD7192_CONF_REFSEL;
st->conf &= ~AD7192_CONF_CHOP;
- st->f_order = AD7192_NO_SYNC_FILTER;
+ st->f_order = AD7192_NO_SINC_FILTER;
buf_en = of_property_read_bool(np, "adi,buffer-enable");
if (buf_en)
@@ -484,11 +484,11 @@ static void ad7192_get_available_filter_freq(struct ad7192_state *st,
/* Formulas for filter at page 25 of the datasheet */
fadc = DIV_ROUND_CLOSEST(st->fclk,
- AD7192_SYNC4_FILTER * AD7192_MODE_RATE(st->mode));
+ AD7192_SINC4_FILTER * AD7192_MODE_RATE(st->mode));
freq[0] = DIV_ROUND_CLOSEST(fadc * 240, 1024);
fadc = DIV_ROUND_CLOSEST(st->fclk,
- AD7192_SYNC3_FILTER * AD7192_MODE_RATE(st->mode));
+ AD7192_SINC3_FILTER * AD7192_MODE_RATE(st->mode));
freq[1] = DIV_ROUND_CLOSEST(fadc * 240, 1024);
fadc = DIV_ROUND_CLOSEST(st->fclk, AD7192_MODE_RATE(st->mode));
@@ -576,25 +576,25 @@ static int ad7192_set_3db_filter_freq(struct ad7192_state *st,
switch (idx) {
case 0:
- st->f_order = AD7192_SYNC4_FILTER;
+ st->f_order = AD7192_SINC4_FILTER;
st->mode &= ~AD7192_MODE_SINC3;
st->conf |= AD7192_CONF_CHOP;
break;
case 1:
- st->f_order = AD7192_SYNC3_FILTER;
+ st->f_order = AD7192_SINC3_FILTER;
st->mode |= AD7192_MODE_SINC3;
st->conf |= AD7192_CONF_CHOP;
break;
case 2:
- st->f_order = AD7192_NO_SYNC_FILTER;
+ st->f_order = AD7192_NO_SINC_FILTER;
st->mode &= ~AD7192_MODE_SINC3;
st->conf &= ~AD7192_CONF_CHOP;
break;
case 3:
- st->f_order = AD7192_NO_SYNC_FILTER;
+ st->f_order = AD7192_NO_SINC_FILTER;
st->mode |= AD7192_MODE_SINC3;
st->conf &= ~AD7192_CONF_CHOP;
--
2.17.1
next prev parent reply other threads:[~2020-03-22 19:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 19:53 [PATCH v3 0/4] staging: iio: adc: General code reformatting / cleanup patchset Deepak R Varma
2020-03-22 19:54 ` [PATCH v3 1/4] staging: iio: adc: ad7192: Re-indent enum labels Deepak R Varma
2020-03-24 7:18 ` Ardelean, Alexandru
2020-03-26 8:19 ` Ardelean, Alexandru
2020-03-26 8:22 ` Ardelean, Alexandru
2020-03-22 19:55 ` Deepak R Varma [this message]
2020-03-22 23:40 ` [PATCH v3 2/4] staging: iio: adc: ad7192: Correct macro names from SYNC to SINC Andy Shevchenko
2020-03-23 17:50 ` DEEPAK VARMA
2020-03-26 8:20 ` Ardelean, Alexandru
2020-03-22 19:56 ` [PATCH v3 3/4] staging: iio: adc: ad7192: get_filter_freq code optimization Deepak R Varma
2020-03-22 23:44 ` Andy Shevchenko
2020-03-23 0:49 ` [Outreachy kernel] " Stefano Brivio
2020-03-23 9:28 ` Andy Shevchenko
2020-03-23 12:15 ` Stefano Brivio
2020-03-23 17:52 ` DEEPAK VARMA
2020-03-24 8:06 ` Ardelean, Alexandru
2020-03-25 17:38 ` DEEPAK VARMA
2020-03-25 19:37 ` Andy Shevchenko
2020-03-25 19:59 ` Stefano Brivio
2020-03-26 8:15 ` Ardelean, Alexandru
2020-03-22 19:57 ` [PATCH v3 4/4] staging: iio: adc: ad7280a: Add comments to clarify stringified arguments Deepak R Varma
2020-03-24 8:07 ` Ardelean, Alexandru
2020-03-28 13:28 ` 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=a5aea6836da9aa2f950449225892ee18f10e217c.1584904896.git.mh12gx2825@gmail.com \
--to=mh12gx2825@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=daniel.baluta@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=pmeerw@pmeerw.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).