Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11820100rwd; Thu, 22 Jun 2023 19:59:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EywqHl5PO8eZlITND+QtYVXnKVqbs6rYsFysIrnmetFSXA6bgkoE2BD201mxNdcCcG/uk X-Received: by 2002:a05:6214:2524:b0:5f4:5af6:1304 with SMTP id gg4-20020a056214252400b005f45af61304mr15366314qvb.16.1687489149966; Thu, 22 Jun 2023 19:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687489149; cv=none; d=google.com; s=arc-20160816; b=MdloW2shSa9ZUlbys/PFYk1fSvCuVm0IbHQKObsNn588s5O0XCppNFzCkiHoGulGIY X33g25BvYAWfG+81gO7Z/hZRAN2ijaE8r7lx+VTA28B1xyPhH8SZ5Dd97VSxJEVsYtla M95jrIJhlX1ZzYEq9Dq6GrTmYtC4WO0EbcVkIp06pFNyaa5o4bwnvABg9HcV/HWpas2W 8llPaDiKOw25SXM3KAGyW2sZjddkpIn+Ymg/8g14SEl9Lghok3yEz8IqkzOXtQhIdo3/ YzmikvlY5t7ymoPDxVg4dqrQ+JIvVTZwQS8vX8V1Vkom6qLFf8tgJkUkmww6yTu8PXM5 xNug== 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=rc3qX8KRQTMzSGALx1FQDUphrLTDt4aHKYVi/7eAovo=; b=q9oJ7DXXvJPn8vtZiWCplwGXNFgltLId+IytyvpWH+qkIXb1Lc66HEDUcaQTMVXpFg IlT/a12glbyBR4UDLYxqYaAU+7Bu2rvOy7d6NNM+s6ck6w/ViLrrkYM/9T8u4L+sw5t9 u082sZsmVyg9fwot64SEsJnvhM4X5UjSyCjxpuumwznsrJ9QHLIaEau1BjbCzTmBNX6e ionHmVOQz45ppTyBnOvQw6jRJXXYiESKKX8DMcVeuBR0yQpF9sA1Bps69Y4bQWYhgs3F zp/Sba03frhtUKl3s3PYXhESt56S3ppxKuIieu93DTq8nHXUzuTa6FDmaaGmeOKj91iz g5Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=qKuCdlW3; 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 u22-20020a627916000000b00645e8c9e27esi772898pfc.386.2023.06.22.19.58.44; Thu, 22 Jun 2023 19:59:09 -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=qKuCdlW3; 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 S230480AbjFWCX7 (ORCPT + 99 others); Thu, 22 Jun 2023 22:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbjFWCX6 (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 7CAC72134; Thu, 22 Jun 2023 19:23:55 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id D03AE5FD26; Fri, 23 Jun 2023 05:23:53 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1687487033; bh=rc3qX8KRQTMzSGALx1FQDUphrLTDt4aHKYVi/7eAovo=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=qKuCdlW3r6B6aRyuTHJYiu/Xm+Sn9B+bM/zMkqA9X1KQcfG1oawH6mWNcJNTYJqOZ tLVZJqoYy7eznJkWaHbBc2yqVKoaBS5eXB2RII+Cnb8/I71IFf0/+VBbsXxGwgXJEt OzVBoYJfqFc9rZYAGYcMwxCnnN9wZVbmtNYhrDDynx8DZMAnTc7dceiHyV5BNs8VS6 fT4yaD+E5VqJEjnby3f535trLC6AhfGYFZuky/3qkCD+0sQDXV8e7j0JOb08cbdfBc Z7ZyEy6qQxot1b47qOiuynxfy61G5dNNFrdKyRAWf1Ad8Gt0d+YMDIktlm6DtZcdL4 tjo2rkzp+BUFQ== 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:53 +0300 (MSK) From: George Stark To: , , , , , , , , CC: , , , , , George Stark Subject: [PATCH v2 2/6] meson saradc: move meson_sar_adc_set_chan7_mux routine upper Date: Fri, 23 Jun 2023 05:20:10 +0300 Message-ID: <20230623022334.791026-3-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 meson_sar_adc_set_chan7_mux routine upper. Signed-off-by: George Stark --- drivers/iio/adc/meson_saradc.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index af38d95bd504..6e69b40b3309 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -338,6 +338,19 @@ static int meson_sar_adc_wait_busy_clear(struct iio_dev *indio_dev) 1, 10000); } +static void meson_sar_adc_set_chan7_mux(struct iio_dev *indio_dev, + enum meson_sar_adc_chan7_mux_sel sel) +{ + struct meson_sar_adc_priv *priv = iio_priv(indio_dev); + u32 regval; + + regval = FIELD_PREP(MESON_SAR_ADC_REG3_CTRL_CHAN7_MUX_SEL_MASK, sel); + regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3, + MESON_SAR_ADC_REG3_CTRL_CHAN7_MUX_SEL_MASK, regval); + + usleep_range(10, 20); +} + static int meson_sar_adc_read_raw_sample(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, int *val) @@ -434,19 +447,6 @@ static void meson_sar_adc_enable_channel(struct iio_dev *indio_dev, } } -static void meson_sar_adc_set_chan7_mux(struct iio_dev *indio_dev, - enum meson_sar_adc_chan7_mux_sel sel) -{ - struct meson_sar_adc_priv *priv = iio_priv(indio_dev); - u32 regval; - - regval = FIELD_PREP(MESON_SAR_ADC_REG3_CTRL_CHAN7_MUX_SEL_MASK, sel); - regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3, - MESON_SAR_ADC_REG3_CTRL_CHAN7_MUX_SEL_MASK, regval); - - usleep_range(10, 20); -} - static void meson_sar_adc_start_sample_engine(struct iio_dev *indio_dev) { struct meson_sar_adc_priv *priv = iio_priv(indio_dev); -- 2.38.4