mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: George Stark <gnstark@sberdevices.ru>
To: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Cc: <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>,
	<linux-iio@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-amlogic@lists.infradead.org>, <kernel@sberdevices.ru>
Subject: Re: [PATCH v3 1/5] meson saradc: move enums declaration before variables declaration
Date: Tue, 4 Jul 2023 03:39:19 +0300	[thread overview]
Message-ID: <98908451-b110-c2a0-4434-ea0997712384@sberdevices.ru> (raw)
In-Reply-To: <20230702171410.00007827@Huawei.com>

Hello Jonathan

On 7/2/23 12:14, Jonathan Cameron wrote:
> On Wed, 28 Jun 2023 01:37:14 +0300
> George Stark <gnstark@sberdevices.ru> wrote:
>
>> Move enums declaration before variables declaration.
>>
> This is fairly harmless, but would be nice to say 'why'.
> Is this just for consistency with the rest of the driver or will
> it be required after changes later in the patch set?
Both refactoring patches 1/5 and 2/5 are required for the latter changes 
in this patch-set.
Ack for extending the commit message.

>
>> 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 18937a262af6..af38d95bd504 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),
>> @@ -227,28 +249,6 @@ static const struct iio_chan_spec meson_sar_adc_and_temp_iio_channels[] = {
>>   	IIO_CHAN_SOFT_TIMESTAMP(9),
>>   };
>>   
>> -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;
>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

-- 
Best regards
George


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2023-07-04  0:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 22:37 [PATCH v3 0/5] meson saradc: add iio channels to read channel 7 mux inputs George Stark
2023-06-27 22:37 ` [PATCH v3 1/5] meson saradc: move enums declaration before variables declaration George Stark
2023-07-02  9:14   ` Jonathan Cameron
2023-07-04  0:39     ` George Stark [this message]
2023-06-27 22:37 ` [PATCH v3 2/5] meson saradc: move meson_sar_adc_set_chan7_mux routine upper George Stark
2023-06-27 22:37 ` [PATCH v3 3/5] meson saradc: add enum for iio channel numbers George Stark
2023-06-27 22:37 ` [PATCH v3 4/5] meson saradc: add channel labels George Stark
2023-07-02  9:16   ` Jonathan Cameron
2023-07-04  1:32     ` George Stark
2023-06-27 22:37 ` [PATCH v3 5/5] meson saradc: support reading from channel 7 mux inputs George Stark
2023-06-28 10:06   ` Andy Shevchenko
2023-07-02  9:21   ` Jonathan Cameron
2023-07-03 19:39     ` Martin Blumenstingl
2023-07-04  8:08       ` George Stark
     [not found]       ` <6ee38b3a-8e2f-15d6-f7bd-06ef567d2b68@sberdevices.ru>
2023-07-05  8:04         ` Jonathan Cameron
2023-07-02  9:11 ` [PATCH v3 0/5] meson saradc: add iio channels to read " 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=98908451-b110-c2a0-4434-ea0997712384@sberdevices.ru \
    --to=gnstark@sberdevices.ru \
    --cc=Jonathan.Cameron@Huawei.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®