iio: adc: meson: move enums declaration before variables declaration
Allow to use enum items for variables initialization. For this, move enums upper in the code. Signed-off-by: George Stark <GNStark@sberdevices.ru> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230714114010.293440-3-gnstark@sberdevices.ru Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
1a0dabd4df
commit
d26f0514f0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue