Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11816856rwd; Thu, 22 Jun 2023 19:54:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7S86WnimOFynCLdskMy8cgVI7OAxzHcIqHY5ryq3JpT/nFBpCtPgBy2zgPpkrQbEfV//s0 X-Received: by 2002:a9d:640f:0:b0:6b2:c2a1:38ce with SMTP id h15-20020a9d640f000000b006b2c2a138cemr17580398otl.14.1687488877268; Thu, 22 Jun 2023 19:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687488877; cv=none; d=google.com; s=arc-20160816; b=VIfDFXJnrw1JX374a6R9eUXomNkCe2oVEpMbAoYv0xGdaMK8j2G5dg271dk+wPe2oa hKpHJ608+KCrFpSa9xb8fpNOWz6+gmV5D43K9JJ4XlJB6K2dnZy9DGpXC0zYVXDPPk4q +W7iEq9VQV6IltBN0c/FouC43L/+ON8ca0/Sgnutte7DsOar92qGN+Gl/GO5AgB/0w2R 7iQwDwKET3Ea85z/ok9y1eRn8N2fqeqNmESRJxBXramdj3eL9BQoDHNKnpImJ83O6rYM dx5m2uL81fjXWmxY5b3uOUxvvH8COknP14IkziICbxuL/5rV4meABtNJ3KXpO7e9FcXZ gr3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LSrYU9Za3aez8EGwCKmAePmxhFcW4UYhK9sMcYhgfkg=; b=lYpkchsy3Za9Hci0OB9ZKdXp+thfb24dgg8ATDZxlBc3bS/osjHwm64gHyHvq45aFw pc7b4XqKhcorcYpoQarMSMOH+AduyUTE/qcGlI1wBX5CMrDg4X0ANm6t1X0MGJHNspdv fkUxV2RBNTwYXQq+XM/7Sy/8rEd/NNhNu60ropDS/7AbKrDkMgXcGPgELUlEt5lOx7bX y+P2QHFT4TENb/8jCf7xUT/xw2Ijucl0yzmS/sA4lWzozZDf6+c3Ptfrx6XPXNXG+kkg diE8x3MDyn9cm9YjieH1y13ZBnIvFU4wIsjD+zjOWCDuUyA7QHnVpmDffFM6RQhiMZlk WMLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=EQi9Aw6+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt27-20020a63291b000000b0054fe07d2f49si4220437pgb.657.2023.06.22.19.54.25; Thu, 22 Jun 2023 19:54:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=EQi9Aw6+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231169AbjFWCYD (ORCPT + 99 others); Thu, 22 Jun 2023 22:24:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbjFWCX6 (ORCPT ); Thu, 22 Jun 2023 22:23:58 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85CE41BC1; Thu, 22 Jun 2023 19:23:52 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id D6FCE5FD25; Fri, 23 Jun 2023 05:23:49 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1687487029; bh=LSrYU9Za3aez8EGwCKmAePmxhFcW4UYhK9sMcYhgfkg=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=EQi9Aw6+t23MHwjeQar8O0FWuOMHEnCzaUQidDb9YTt3HUkgFfZnb6hxTtWmPBZeX sGkFA1+t5fIr9CnVj9GdZTTREtt64oCsLUfurdf4yY+zg2oXfYVdg2068VpBbjQZEX Ph74+kLp3IBFYLDh1HjwQzBG6dolzuu7s1+ZibVPczRS92u6frNvx+bXNI1I8i4L7Z isbuhPBikYFJ21rbl41Ebprxlwiz0Kti/j0diu52gN0mdDXoHPNFFVZXJAZ0AArlOE 6HmUYvgMhfRBkPCTE3oMwBkjeVIbamFnLXaEHm6Yq1TqXDHv8wDRM1xoJT0Hecy9CY iqoinOYJPYwgw== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) by mx.sberdevices.ru (Postfix) with ESMTP; Fri, 23 Jun 2023 05:23:49 +0300 (MSK) From: George Stark To: , , , , , , , , CC: , , , , , George Stark Subject: [PATCH v2 1/6] meson saradc: move enums declaration before variables declaration Date: Fri, 23 Jun 2023 05:20:09 +0300 Message-ID: <20230623022334.791026-2-gnstark@sberdevices.ru> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623022334.791026-1-gnstark@sberdevices.ru> References: <20230623022334.791026-1-gnstark@sberdevices.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/06/22 21:10:00 #21557945 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move enums declaration before variables declaration. Signed-off-by: George Stark --- 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; -- 2.38.4