Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp393426rdb; Thu, 5 Oct 2023 08:53:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGICw10nPRWdyZwutBoKCxxATSM+8pIby/YhYb+0HXWL/BP6MK3QIU7DQQ8dagN36Vicmu X-Received: by 2002:a05:6a20:a110:b0:161:3013:b499 with SMTP id q16-20020a056a20a11000b001613013b499mr6522086pzk.60.1696521222782; Thu, 05 Oct 2023 08:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696521222; cv=none; d=google.com; s=arc-20160816; b=TspL20bzt+0foljXP49t8SUqFQaqEJouL6BbnOAp8oDDq0kFRMWqOj/wDerDijwBfS 8wUMFRPybTxbd4Q+fGZ3ki5qy43Hdm3o6Vk4LGhEbJlgTo6Prl1Wtf8hsu1q9o0/NoIu sV+h/3S45xmbFLBioEG8zUZockWdAx64knX5mEU2q94FCedoICcD4cv7g7kkI3qyT3aJ 3OQcYmeic3iFlWXW1tLgtJHwnfWdC36EQ2nzi3U7wA8R2LoNpkq0d7jR3vWSdw+qF65h YZlFXFqQ/8Ivb0wMpYSNfqruxutJdzNorbULR5I6JH/0llPQGO2Wbumm/bQNP4mR2bHZ M7rA== 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=xPS6nkYkPILbOQILr5uLbnVTfsBoKCrMBzpntNtXmQ8=; fh=ssYW+t7bVo+RwbRmmEL1VmI1vrfWglYaKLz1WpcVANQ=; b=xyf+9dS4kzyMFXVwsdeyK5dQkQJ5ftXzQSB7sgz3RKfdOFLZ/YTMGkcM/aFo2mg++J YvFgEib1I1rObFVj4wQtslA6ueTRzTFCMpLNvHKNn5pq67mbnQHU7bW496g5KemuYM9j AD6EjWIm1Qu3Mq0fhiv7OSfM3+pdm2TmFe34ZAF1kLpzVkx81fUjsdBy1IqolRAEJ2hz gZQJGZRlRs5qezH3MhYaugHXTThIFAPpclocH9oYcDraXWiLOTbvGtMpQqyPFXZIae82 P9UpST7N8eFKdV+RNRRSEk24ApLO850FnxCTqoNqGkKas/Pqt+3sER8SYFD5GNgILb03 FYPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uY2BlzqQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id u14-20020a170902e80e00b001c56ede4c97si1844659plg.239.2023.10.05.08.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 08:53:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uY2BlzqQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id A087687A32ED; Thu, 5 Oct 2023 08:53:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236426AbjJEPxI (ORCPT + 99 others); Thu, 5 Oct 2023 11:53:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235556AbjJEPvK (ORCPT ); Thu, 5 Oct 2023 11:51:10 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4FD68C26; Thu, 5 Oct 2023 07:16:34 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 604BCC43397; Thu, 5 Oct 2023 14:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696515394; bh=fWQldp1MXyl2dHxGT2BPOTVVly5guzHelUpsTf07C30=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uY2BlzqQ8OTEFm7DFcjakRUdD34dpyyVkKd74Wjh7zMxYtV15MwqyAvGPk0hxcV6B gkhjqaPypFX1avgFjSTOEZeTVH8xtL5zR5iKdozju80d6HWrX6od/6/7ZhfG4AA7o7 13tCjNmg7ah2rl71e9YZP5Nd3Lhx0rqD7nAA9bqXPAczQwG6xqxqNlEzoW0dlP1dPF fFu40icf6dmWCTUFupXrHJ9QnITf7nrf5Qw6UkgUsi4cXgrGyQMtSNsEAkoQ8y6jki LXjtxWlSHYp289tf6XfWpAWoK4ZvJfDJA7BQSvF+2IpckkUEc/++tVuhncut6UOLF9 YV5vbbCAxXg1w== Date: Thu, 5 Oct 2023 15:16:37 +0100 From: Jonathan Cameron To: "Hennerich, Michael" Cc: David Lechner , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-staging@lists.linux.dev" , David Lechner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "Sa, Nuno" , 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: <20231005151637.4dc990f8@jic23-huawei> In-Reply-To: References: <20230929-ad2s1210-mainline-v3-0-fa4364281745@baylibre.com> <20230929-ad2s1210-mainline-v3-22-fa4364281745@baylibre.com> <20230930163209.17ee0020@jic23-huawei> 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 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 08:53:41 -0700 (PDT) On Wed, 4 Oct 2023 11:01:56 +0000 "Hennerich, Michael" wrote: > > -----Original Message----- > > From: Jonathan Cameron > > Sent: Samstag, 30. September 2023 17:32 > > 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 ; > > Hennerich, Michael ; Sa, Nuno > > ; 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 > > > > > > 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.) > > Hi Jonathan, > David and I we also had some internal discussion related to this. > I'm sure these fault events and thresholds are understood correctly. > Doing it this or the other way, it needs to be properly documented in order to make sense. > So from my perspective whatever makes the most sense from a IIO ABI > perspective, is the way to forward. Great - as long as keep to a logical mapping I quite like the events approach. Most of these faults are real thresholds on things being measured (even if those 'things' are signals from which stuff is derived for the main measurements the device is making.) Jonathan > > -Michael > > > > > Jonathan >