Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp360397pxb; Wed, 18 Aug 2021 04:15:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbR5393SGVz+jwiGrU8PTcE9VOxK1KtW5YY2x8bVITxXWP8Kr9Q8WMd64a41I76pEj+3X8 X-Received: by 2002:a05:6638:1905:: with SMTP id p5mr7435023jal.25.1629285325590; Wed, 18 Aug 2021 04:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629285325; cv=none; d=google.com; s=arc-20160816; b=qJEOYpZ4IcbSqTJFwA7UXPr9f17YFme36q+ZQViJPag5rhlqGplWla43J4BIZ+cWIK 9iIJ5DTT9u1HVeeJXJyx21xgEyQXnbIL7xdC015Sf5j2Z2WlWMx/SUbt3Djt+fJC7eyf mFCfrSR+dACduC8gcR3UDjgPBCYdv7WaVvBvk3qKc9a+++B+0Hqxc15xgROn9Y6OqXEd 9gVqlS7pQoIfLA6dkFErlDjz95FDHXDMRSAxtfxWo75HCRzDwOQak3jlQtjZQQNOrFso gAFRaAOQYDisTwa1pb9vgCziFRdGL/YJYP5Cmfqx6tZbeT6rQkQbH8UBOPhthwYmZr2R I9QQ== 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; bh=34z7LYHHQAnYhGiQfu/ZuOeO3IPkrvzhMHBgB4sBBkk=; b=uFhJ7snUFm2aMB+yd36zIvBgz/NMdNk3y+OlGj2XkJg5eqEEC+aE6IGCvuNcRLIt+m KRsU3+WvRmdrNi1RTAmE7kDpEUol9sACoWE9ZcgfMcl7uSv6ULbNsRRcOoNVWk+dzXiU cWRnPpMrWoVddqqJl9EO+l4l0nNkofutxi2sTSFMoqA2os+Kv4tEx6bRplQvv6gxX6wO EYgWiyPwvJ1TMHMo8RXSanz/0SQDm58betw0vw3HWyeqqrcoIMFAq64IbIBV2g/wdLwK D5cd11p/9hO+cDGZVlaHMzCqNCihM/tfW9vHGViPe84h0pnqhJhTNiYg4HJDXImuBDr6 3S6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si5294494jak.93.2021.08.18.04.15.14; Wed, 18 Aug 2021 04:15:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236050AbhHRLNU (ORCPT + 99 others); Wed, 18 Aug 2021 07:13:20 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:36135 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235464AbhHRLMU (ORCPT ); Wed, 18 Aug 2021 07:12:20 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5C9D760010; Wed, 18 Aug 2021 11:11:45 +0000 (UTC) From: Miquel Raynal To: Jonathan Cameron , Lars-Peter Clausen Cc: Thomas Petazzoni , linux-iio@vger.kernel.org, , Miquel Raynal Subject: [PATCH 08/16] iio: adc: max1027: Explain better how the trigger state gets changed Date: Wed, 18 Aug 2021 13:11:31 +0200 Message-Id: <20210818111139.330636-9-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210818111139.330636-1-miquel.raynal@bootlin.com> References: <20210818111139.330636-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It may appear strange to configure the trigger to start upon register write while we want to disable the trigger. Explain why we do this in the comment. Signed-off-by: Miquel Raynal --- drivers/iio/adc/max1027.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c index 59914fcfd320..4a78c9cbc339 100644 --- a/drivers/iio/adc/max1027.c +++ b/drivers/iio/adc/max1027.c @@ -401,7 +401,12 @@ static int max1027_set_cnvst_trigger_state(struct iio_trigger *trig, bool state) if (ret < 0) return ret; } else { - /* Start acquisition on conversion register write */ + /* + * Start acquisition on conversion register write, which + * basically disables triggering conversions upon cnvst changes + * and thus has the effect of disabling the external hardware + * trigger. + */ ret = max1027_configure_trigger(indio_dev); if (ret) return ret; -- 2.27.0