Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1604285rdb; Mon, 2 Oct 2023 15:10:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIon9BnvY//r0AHsByZEVjEu0e/DR3bvQ5eI5HPr0yg6CbKbr39hrrCn7howguCI8d3jDi X-Received: by 2002:a05:6358:63a9:b0:134:e631:fd2b with SMTP id k41-20020a05635863a900b00134e631fd2bmr12751238rwh.0.1696284654852; Mon, 02 Oct 2023 15:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696284654; cv=none; d=google.com; s=arc-20160816; b=RBIdYKV3w5dx+pL+sji5lro5WQHpzfe9I5tQCZoSez/f/12p0ux44HzuP3P0EN1IZ8 DVyosGe2Oq705iOg+V//fgG2CupyxedY5rAOuv5mT291+pH9no+zqHyw4iEBrtOue7Ul JGeGfn2tVCBezWm19BFP7HLSFfDnFbZbJ/vAXqCSPaNelm4whecUm0zWo/jyrEgHgUVN LEjA8xFLEv8wApsRrYL2Vn8bu16UuI7vyDDtgi9U9yRNSbB4r0cHfIrxAoF0A3vCHYIc hwSPYvX4O/Gu0a6Tf32cNr29jw8AqFL9r1b0Q0MFOWYzwpgO2+GLZ7G1adROnbhCHH2S sHVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Lci7aE9Nr12rnsuBj8lxjXGwqKY+F3Jq4/Wt3MfIP2I=; fh=3WTpOH7FETJ7G/7LByuEEGrVdBjYwONwHjBiEY1ELrc=; b=xcVMylGl1RZ1uCAZkNDTGZPb39wV5i2nluQXnB36uoWIzk3AX8TsrIk+wGQybdIdJx IBrJOKm+QHdH79h74eUBUfX1JBPHHt8olk8MECxZ/qvFKG39M5ThcQIISKFSvqk2N4z2 6b5e0TlEEYHmbOVsKDPg5pJkHEgPwslo2RpDWSwxwqtLSyNahWAfsZmdWHqnEuO0GxfG BgLmr4PSSW/gBprullhEZFahtXWJIwK+pMu5F/XU8oUSBNwhRbCvlGdFj7YTTp448+8N pOOFbjBAJGaqBZaFsZxDVDkdkkDfvu3E6rZ+lrXzdCGvz8fbMChYpI54o/R6PgwdGJG1 2q/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=O38wsdmx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id cq17-20020a056a00331100b0068faabd47fcsi28353624pfb.210.2023.10.02.15.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 15:10:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=O38wsdmx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6FF4080763E2; Mon, 2 Oct 2023 11:50:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229655AbjJBSuJ (ORCPT + 99 others); Mon, 2 Oct 2023 14:50:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238791AbjJBSuI (ORCPT ); Mon, 2 Oct 2023 14:50:08 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BC45C9 for ; Mon, 2 Oct 2023 11:50:04 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-522bd411679so44865a12.0 for ; Mon, 02 Oct 2023 11:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1696272603; x=1696877403; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Lci7aE9Nr12rnsuBj8lxjXGwqKY+F3Jq4/Wt3MfIP2I=; b=O38wsdmxtsyna4oOXPYL4H+Twdm/qOzAHz9KQdyr4mqdZm+XuEjlfGkoeVFVJcNc5K prA2f9hvBEW4j2GmaGH+mZkZEuZ7vT4tUN2PxFMO2zFWEE78UN/L9tZd8yFrHysdI8bT Sjc3V/qlMwZ1PRlCe0NqqX9v5qQTmI5EF7BTNqXre8YISVLhtQpO6aIJMkmfwql5Lm16 NmqVf4qF0BgshIbmiVXajOgmlD8yV61dL7MA9kXd2at14bpFxY5a5eLR8VLZ09cUemol lNY/6flNkYKFezBSqltNp1tBut2dhfOiKHBPJyr93qOwO1KVDXkS3sua5eKiEcvtVpi6 eqaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696272603; x=1696877403; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lci7aE9Nr12rnsuBj8lxjXGwqKY+F3Jq4/Wt3MfIP2I=; b=L3DdhL7KtECTijHGzDznB/usagnQz7z4Gwi5EdMpSpJeI7E+8JjvQZzbnwv1Mi56o6 nAGgY3OkHmcGeb0F6W5Lu63z3cXh3hjlHVhgwGNaQHz8NVk7TrW2W88G4DqOr7TvV9Sx GdfEYODUdTUM8tzvgGzapPkjoKNg20gTKC7BhDJXjPQaBr032ic8U/9X/8UoTphXOaWk nJacKOJ5N9oBSKcjwWVI61y1fwC8WaG4p1xPqxTt+YtPoHYxELMLeTBlbwShzTyYApVU mzyVWdoFdBvBUKo/hBm/FPrnT/fTwYyp0s3/bcYIMGAvhZa07+g37HtLFEoOJXuuTeFX DrvA== X-Gm-Message-State: AOJu0YyhP1txJ6zqQiwFdQjDkW/OBTpTRNHJuhBtTeu4eTe3sabtoXFQ L+M2njm4YdtqcGFQEIJzJsD68hTEFi1rIq2WuoE7qQ== X-Received: by 2002:a05:6402:1a28:b0:531:1241:3e98 with SMTP id be8-20020a0564021a2800b0053112413e98mr9957195edb.9.1696272602654; Mon, 02 Oct 2023 11:50:02 -0700 (PDT) MIME-Version: 1.0 References: <20230929-ad2s1210-mainline-v3-0-fa4364281745@baylibre.com> <20230929-ad2s1210-mainline-v3-26-fa4364281745@baylibre.com> <20230930170046.36637e9c@jic23-huawei> In-Reply-To: From: David Lechner Date: Mon, 2 Oct 2023 13:49:51 -0500 Message-ID: Subject: Re: [PATCH v3 26/27] staging: iio: resolver: ad2s1210: implement fault events To: Jonathan Cameron 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 , =?UTF-8?B?TnVubyBTw6E=?= , Axel Haslam , Philip Molloy , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Mon, 02 Oct 2023 11:50:29 -0700 (PDT) On Mon, Oct 2, 2023 at 11:58=E2=80=AFAM David Lechner wrote: > > On Sat, Sep 30, 2023 at 11:00=E2=80=AFAM Jonathan Cameron wrote: > > > > On Fri, 29 Sep 2023 12:23:31 -0500 > > David Lechner wrote: > > > > > From: David Lechner > > > > > > From: David Lechner > > > > > > When reading the position and velocity on the AD2S1210, there is also= a > > > 3rd byte following the two data bytes that contains the fault flag bi= ts. > > > This patch adds support for reading this byte and generating events w= hen > > > faults occur. > > > > > > The faults are mapped to various channels and event types in order to > > > have a unique event for each fault. > > > > > > Signed-off-by: David Lechner > > > > Use of x and y modifiers is a little odd. What was your reasoning? > > Was it just that there was a X_OR_Y modifier? If so, don't use that! > > It seemed like a good idea at the time, but it's not nice to deal with > > and requires a channel with that modifier to hang the controls off > > + make sure userspace expects that event code. > > > Regarding the point about "requires a channel with that modifier to > hang the controls off...". Although that comment was about modifiers, > does it also apply in general. > > There are several fault events that don't have any configurable > parameters, namely _sine/cosine inputs clipping_ and _velocity exceeds > max tracking rate_. So there won't be any attributes that contain the > event specification for those (e.g. no `events/in_angl0_*` > attributes). It sounds like this would be a problem as well? > > Should we consider a IIO_EV_INFO_LABEL so that we can have some sort > of attribute (namely `events/__label`) so that > userspace can enumerate expected events for non-configurable events? Well, I didn't think that all the way through before I hit send. IIO_EV_INFO_LABEL is clearly not the right way to implement a `events/*_label` attribute, but however we consider going about it, the point of adding such an attribute was the main idea.