From: George Stark <gnstark@sberdevices.ru>
To: <jic23@kernel.org>, <lars@metafoo.de>,
<neil.armstrong@linaro.org>, <khilman@baylibre.com>,
<jbrunet@baylibre.com>, <martin.blumenstingl@googlemail.com>,
<andriy.shevchenko@linux.intel.com>, <nuno.sa@analog.com>,
<gnstark@sberdevices.ru>
Cc: <linux-iio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-amlogic@lists.infradead.org>, <kernel@sberdevices.ru>,
George Stark <GNStark@sberdevices.ru>
Subject: [PATCH v5 2/6] iio: adc: meson: move enums declaration before variables declaration
Date: Tue, 11 Jul 2023 23:00:18 +0300 [thread overview]
Message-ID: <20230711200141.239025-3-gnstark@sberdevices.ru> (raw)
In-Reply-To: <20230711200141.239025-1-gnstark@sberdevices.ru>
Allows to use enum items for variables initialization.
For this, move enums upper in the code.
Signed-off-by: George Stark <GNStark@sberdevices.ru>
---
drivers/iio/adc/meson_saradc.c | 44 +++++++++++++++++-----------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 569ffc178935..98b6697a21f6 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio/adc/meson_saradc.c
@@ -202,6 +202,28 @@
.datasheet_name = "TEMP_SENSOR", \
}
+enum meson_sar_adc_avg_mode {
+ NO_AVERAGING = 0x0,
+ MEAN_AVERAGING = 0x1,
+ MEDIAN_AVERAGING = 0x2,
+};
+
+enum meson_sar_adc_num_samples {
+ ONE_SAMPLE = 0x0,
+ TWO_SAMPLES = 0x1,
+ FOUR_SAMPLES = 0x2,
+ EIGHT_SAMPLES = 0x3,
+};
+
+enum meson_sar_adc_chan7_mux_sel {
+ CHAN7_MUX_VSS = 0x0,
+ CHAN7_MUX_VDD_DIV4 = 0x1,
+ CHAN7_MUX_VDD_DIV2 = 0x2,
+ CHAN7_MUX_VDD_MUL3_DIV4 = 0x3,
+ CHAN7_MUX_VDD = 0x4,
+ CHAN7_MUX_CH7_INPUT = 0x7,
+};
+
static const struct iio_chan_spec meson_sar_adc_iio_channels[] = {
MESON_SAR_ADC_CHAN(0),
MESON_SAR_ADC_CHAN(1),
@@ -225,28 +247,6 @@ static const struct iio_chan_spec meson_sar_adc_and_temp_iio_channels[] = {
MESON_SAR_ADC_TEMP_CHAN(8),
};
-enum meson_sar_adc_avg_mode {
- NO_AVERAGING = 0x0,
- MEAN_AVERAGING = 0x1,
- MEDIAN_AVERAGING = 0x2,
-};
-
-enum meson_sar_adc_num_samples {
- ONE_SAMPLE = 0x0,
- TWO_SAMPLES = 0x1,
- FOUR_SAMPLES = 0x2,
- EIGHT_SAMPLES = 0x3,
-};
-
-enum meson_sar_adc_chan7_mux_sel {
- CHAN7_MUX_VSS = 0x0,
- CHAN7_MUX_VDD_DIV4 = 0x1,
- CHAN7_MUX_VDD_DIV2 = 0x2,
- CHAN7_MUX_VDD_MUL3_DIV4 = 0x3,
- CHAN7_MUX_VDD = 0x4,
- CHAN7_MUX_CH7_INPUT = 0x7,
-};
-
struct meson_sar_adc_param {
bool has_bl30_integration;
unsigned long clock_rate;
--
2.38.4
WARNING: multiple messages have this Message-ID (diff)
From: George Stark <gnstark@sberdevices.ru>
To: <jic23@kernel.org>, <lars@metafoo.de>,
<neil.armstrong@linaro.org>, <khilman@baylibre.com>,
<jbrunet@baylibre.com>, <martin.blumenstingl@googlemail.com>,
<andriy.shevchenko@linux.intel.com>, <nuno.sa@analog.com>,
<gnstark@sberdevices.ru>
Cc: <linux-iio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-amlogic@lists.infradead.org>, <kernel@sberdevices.ru>,
George Stark <GNStark@sberdevices.ru>
Subject: [PATCH v5 2/6] iio: adc: meson: move enums declaration before variables declaration
Date: Tue, 11 Jul 2023 23:00:18 +0300 [thread overview]
Message-ID: <20230711200141.239025-3-gnstark@sberdevices.ru> (raw)
In-Reply-To: <20230711200141.239025-1-gnstark@sberdevices.ru>
Allows to use enum items for variables initialization.
For this, move enums upper in the code.
Signed-off-by: George Stark <GNStark@sberdevices.ru>
---
drivers/iio/adc/meson_saradc.c | 44 +++++++++++++++++-----------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 569ffc178935..98b6697a21f6 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio/adc/meson_saradc.c
@@ -202,6 +202,28 @@
.datasheet_name = "TEMP_SENSOR", \
}
+enum meson_sar_adc_avg_mode {
+ NO_AVERAGING = 0x0,
+ MEAN_AVERAGING = 0x1,
+ MEDIAN_AVERAGING = 0x2,
+};
+
+enum meson_sar_adc_num_samples {
+ ONE_SAMPLE = 0x0,
+ TWO_SAMPLES = 0x1,
+ FOUR_SAMPLES = 0x2,
+ EIGHT_SAMPLES = 0x3,
+};
+
+enum meson_sar_adc_chan7_mux_sel {
+ CHAN7_MUX_VSS = 0x0,
+ CHAN7_MUX_VDD_DIV4 = 0x1,
+ CHAN7_MUX_VDD_DIV2 = 0x2,
+ CHAN7_MUX_VDD_MUL3_DIV4 = 0x3,
+ CHAN7_MUX_VDD = 0x4,
+ CHAN7_MUX_CH7_INPUT = 0x7,
+};
+
static const struct iio_chan_spec meson_sar_adc_iio_channels[] = {
MESON_SAR_ADC_CHAN(0),
MESON_SAR_ADC_CHAN(1),
@@ -225,28 +247,6 @@ static const struct iio_chan_spec meson_sar_adc_and_temp_iio_channels[] = {
MESON_SAR_ADC_TEMP_CHAN(8),
};
-enum meson_sar_adc_avg_mode {
- NO_AVERAGING = 0x0,
- MEAN_AVERAGING = 0x1,
- MEDIAN_AVERAGING = 0x2,
-};
-
-enum meson_sar_adc_num_samples {
- ONE_SAMPLE = 0x0,
- TWO_SAMPLES = 0x1,
- FOUR_SAMPLES = 0x2,
- EIGHT_SAMPLES = 0x3,
-};
-
-enum meson_sar_adc_chan7_mux_sel {
- CHAN7_MUX_VSS = 0x0,
- CHAN7_MUX_VDD_DIV4 = 0x1,
- CHAN7_MUX_VDD_DIV2 = 0x2,
- CHAN7_MUX_VDD_MUL3_DIV4 = 0x3,
- CHAN7_MUX_VDD = 0x4,
- CHAN7_MUX_CH7_INPUT = 0x7,
-};
-
struct meson_sar_adc_param {
bool has_bl30_integration;
unsigned long clock_rate;
--
2.38.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: George Stark <gnstark@sberdevices.ru>
To: <jic23@kernel.org>, <lars@metafoo.de>,
<neil.armstrong@linaro.org>, <khilman@baylibre.com>,
<jbrunet@baylibre.com>, <martin.blumenstingl@googlemail.com>,
<andriy.shevchenko@linux.intel.com>, <nuno.sa@analog.com>,
<gnstark@sberdevices.ru>
Cc: <linux-iio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-amlogic@lists.infradead.org>, <kernel@sberdevices.ru>,
George Stark <GNStark@sberdevices.ru>
Subject: [PATCH v5 2/6] iio: adc: meson: move enums declaration before variables declaration
Date: Tue, 11 Jul 2023 23:00:18 +0300 [thread overview]
Message-ID: <20230711200141.239025-3-gnstark@sberdevices.ru> (raw)
In-Reply-To: <20230711200141.239025-1-gnstark@sberdevices.ru>
Allows to use enum items for variables initialization.
For this, move enums upper in the code.
Signed-off-by: George Stark <GNStark@sberdevices.ru>
---
drivers/iio/adc/meson_saradc.c | 44 +++++++++++++++++-----------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 569ffc178935..98b6697a21f6 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio/adc/meson_saradc.c
@@ -202,6 +202,28 @@
.datasheet_name = "TEMP_SENSOR", \
}
+enum meson_sar_adc_avg_mode {
+ NO_AVERAGING = 0x0,
+ MEAN_AVERAGING = 0x1,
+ MEDIAN_AVERAGING = 0x2,
+};
+
+enum meson_sar_adc_num_samples {
+ ONE_SAMPLE = 0x0,
+ TWO_SAMPLES = 0x1,
+ FOUR_SAMPLES = 0x2,
+ EIGHT_SAMPLES = 0x3,
+};
+
+enum meson_sar_adc_chan7_mux_sel {
+ CHAN7_MUX_VSS = 0x0,
+ CHAN7_MUX_VDD_DIV4 = 0x1,
+ CHAN7_MUX_VDD_DIV2 = 0x2,
+ CHAN7_MUX_VDD_MUL3_DIV4 = 0x3,
+ CHAN7_MUX_VDD = 0x4,
+ CHAN7_MUX_CH7_INPUT = 0x7,
+};
+
static const struct iio_chan_spec meson_sar_adc_iio_channels[] = {
MESON_SAR_ADC_CHAN(0),
MESON_SAR_ADC_CHAN(1),
@@ -225,28 +247,6 @@ static const struct iio_chan_spec meson_sar_adc_and_temp_iio_channels[] = {
MESON_SAR_ADC_TEMP_CHAN(8),
};
-enum meson_sar_adc_avg_mode {
- NO_AVERAGING = 0x0,
- MEAN_AVERAGING = 0x1,
- MEDIAN_AVERAGING = 0x2,
-};
-
-enum meson_sar_adc_num_samples {
- ONE_SAMPLE = 0x0,
- TWO_SAMPLES = 0x1,
- FOUR_SAMPLES = 0x2,
- EIGHT_SAMPLES = 0x3,
-};
-
-enum meson_sar_adc_chan7_mux_sel {
- CHAN7_MUX_VSS = 0x0,
- CHAN7_MUX_VDD_DIV4 = 0x1,
- CHAN7_MUX_VDD_DIV2 = 0x2,
- CHAN7_MUX_VDD_MUL3_DIV4 = 0x3,
- CHAN7_MUX_VDD = 0x4,
- CHAN7_MUX_CH7_INPUT = 0x7,
-};
-
struct meson_sar_adc_param {
bool has_bl30_integration;
unsigned long clock_rate;
--
2.38.4
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2023-07-11 20:02 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 20:00 [PATCH v5 0/6] iio: adc: meson: add iio channels to read channel 7 mux inputs George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` [PATCH v5 1/6] iio: adc: meson: remove unused timestamp channel George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` George Stark [this message]
2023-07-11 20:00 ` [PATCH v5 2/6] iio: adc: meson: move enums declaration before variables declaration George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` [PATCH v5 3/6] iio: adc: meson: move meson_sar_adc_set_chan7_mux routine upper George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` [PATCH v5 4/6] iio: adc: meson: add enum for iio channel numbers George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` [PATCH v5 5/6] iio: adc: meson: add channel labels George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` [PATCH v5 6/6] iio: adc: meson: support reading from channel 7 mux inputs George Stark
2023-07-11 20:00 ` George Stark
2023-07-11 20:00 ` George Stark
2023-07-12 15:26 ` [PATCH v5 0/6] iio: adc: meson: add iio channels to read " Andy Shevchenko
2023-07-12 15:26 ` Andy Shevchenko
2023-07-12 15:26 ` Andy Shevchenko
2023-07-12 23:04 ` George Stark
2023-07-12 23:04 ` George Stark
2023-07-12 23:04 ` George Stark
2023-07-13 12:08 ` Andy Shevchenko
2023-07-13 12:08 ` Andy Shevchenko
2023-07-13 12:08 ` Andy Shevchenko
2023-07-13 23:11 ` George Stark
2023-07-13 23:11 ` George Stark
2023-07-13 23:11 ` George Stark
2023-07-14 7:46 ` Andy Shevchenko
2023-07-14 7:46 ` Andy Shevchenko
2023-07-14 7:46 ` Andy Shevchenko
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=20230711200141.239025-3-gnstark@sberdevices.ru \
--to=gnstark@sberdevices.ru \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jbrunet@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel@sberdevices.ru \
--cc=khilman@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=nuno.sa@analog.com \
/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.