Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp395781rdb; Sat, 30 Sep 2023 08:32:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOQe3FcoK+5As2fKdUiHsyINBeZZoZAvl45ar/EaDrYr0rX1o6QiRQpx+KMsvVEvjhw2Mq X-Received: by 2002:a05:6a21:7189:b0:161:5bfd:a879 with SMTP id wq9-20020a056a21718900b001615bfda879mr5964211pzb.28.1696087954264; Sat, 30 Sep 2023 08:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696087954; cv=none; d=google.com; s=arc-20160816; b=xwQJ+8OvF8Vc96kjXs2mP5MFr/R34lDS82k0CRrfnfDawdDJavvyQYUOIcBcBEYuEu 1ZbMhsBOilJ6ep6R7hys0Rx8uNeL+CT8YwwwuGBgQnKGr9jr1lOJ+NsXPT/wyK45fUtg m89AID7I9urqdBtt/htiZDzsrQJ+pDlFOTvuKeqShNRQBxAlo6GhTXFXg72d+X4AV0Da s8l6U7DWRp7j5wyhdfzSBZj9UlswdZ8AU58btlgZJftggBRI0EOElhIm+T9nTwRSH6xD qL1JIpaO5R06lJ77pJo1TLFvo09HiKJM3ASEmmgdRZX2US/KUZI+pxhzPqebZkuYt9A0 qSYQ== 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:subject:cc:to:from:date :dkim-signature; bh=A3vq1gmUPfig3K+C7+EUV+YPQHJTF9Km0Fx1t66fgcU=; fh=e9lXfbAZmLMG/YSSxlbXRgGopMc52ojan+iACBc5a/Y=; b=mcVx+XwYmcxf9Qzm3N/LEq0W41BOggjrxHMpbuYLgNA1gk3yVBGPkvq2MIOkkJaPl4 RkrS+2JGeNyHssw6ZE/ySJPDZ+ptaDkgxoQR1dO8SjUx2CbA26qP3qgvFYUIaAN0xcFl gyrazAlE1/1kuZPLVHj1G9Zl8rPmDHcqMdNmK1RE6Llq4sZarsZXWff/tSNWbeJIPls1 5Z9LSUxyQLHd2M3wBYi98QX6bDBusl9ksSe8JpiouPzeE1Cpq78Ya+9fELxpswsgca5I h5pjcZ9ceLFmQxmzy4Q6G5EZJFvt3+WeDUo5VA2bo0wG9pL7WBa9bagZ8ZYJP5F0ZEn6 IXog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g3QjBNL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u10-20020a17090341ca00b001c32fe6cdf9si25023864ple.386.2023.09.30.08.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 08:32:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g3QjBNL5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2BC65804C633; Sat, 30 Sep 2023 08:32:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234256AbjI3PcP (ORCPT + 99 others); Sat, 30 Sep 2023 11:32:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234194AbjI3PcN (ORCPT ); Sat, 30 Sep 2023 11:32:13 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51D8CBE; Sat, 30 Sep 2023 08:32:11 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AD47C433C7; Sat, 30 Sep 2023 15:32:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696087931; bh=1Tn6ZLkwalGfv97HZj9CO43jfDNacYTdeg5rnK92038=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=g3QjBNL5tanIYp5cGyuidY3IrcNPxXwHBnYSuDLs0VmGuQPsPtNLELqYoPyRSTziH YP7eRhHq3iH1ekeMw4y2fuMQ/5d9Q5Iu/1yiCsV2+B6rAsPwfeK5QLr5uepZfb6fLH UMTjFDZXyGTfBaPONyyGlZwWTRBHxBREmffl8K78Hy0WSgyTK5RdAAuQQfKX4M7s0G RKU+T6Zz0XcB0VlM4Sf72r3nF44GNHcret5Cuiin9syXUqUkdKjv5S3wMuyEbWTJCI PpyljX/E5iQEQtDtx+MObqSEPorMVWlTUvfnshlgtdC90l7VLcWmoEIy0gVYPVc3XX UKdHcvuSo3CIg== Date: Sat, 30 Sep 2023 16:32:09 +0100 From: Jonathan Cameron To: David Lechner Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-staging@lists.linux.dev, David Lechner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , Nuno =?UTF-8?B?U8Oh?= , Axel Haslam , Philip Molloy , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 22/27] staging: iio: resolver: ad2s1210: convert LOS threshold to event attr Message-ID: <20230930163209.17ee0020@jic23-huawei> In-Reply-To: <20230929-ad2s1210-mainline-v3-22-fa4364281745@baylibre.com> References: <20230929-ad2s1210-mainline-v3-0-fa4364281745@baylibre.com> <20230929-ad2s1210-mainline-v3-22-fa4364281745@baylibre.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 30 Sep 2023 08:32:23 -0700 (PDT) On Fri, 29 Sep 2023 12:23:27 -0500 David Lechner wrote: > From: David Lechner > > From: David Lechner > > The AD2S1210 has a programmable threshold for the loss of signal (LOS) > fault. This fault is triggered when either the sine or cosine input > falls below the threshold voltage. > > This patch converts the custom device LOS threshold attribute to an > event falling edge threshold attribute on a new monitor signal channel. > The monitor signal is an internal signal that combines the amplitudes > of the sine and cosine inputs as well as the current angle and position > output. This signal is used to detect faults in the input signals. > > The attribute now uses millivolts instead of the raw register value in > accordance with the IIO ABI. > > Emitting the event will be implemented in a later patch. > > Signed-off-by: David Lechner I think I'm fine with treating these internal signals like this, but I would ideally like someone from Analog devices to take a look at how these are being done and make sure our interpretations of the signals make sense to them. We are pushing the boundaries a little here (though we have done similar before for fault events I think.) Jonathan