Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2406140rwb; Mon, 15 Aug 2022 05:04:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Pu7V4in4GRtyxwXTllhk2wXaTqxOGujSD84BVAvUq+9ZhowUlg0PWar+YQLlMIBXFD9/1 X-Received: by 2002:a17:907:67b0:b0:730:679d:ac80 with SMTP id qu48-20020a17090767b000b00730679dac80mr9916923ejc.566.1660565090445; Mon, 15 Aug 2022 05:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660565090; cv=none; d=google.com; s=arc-20160816; b=W2idlkGslfzYmOg+X1nqC2woe1iil3ydcQbLJikspLplIWQyUvXxHVbat8BqLz1iZi GcsO/wbE9uIHU3gVxgVVnYk67I+sDytgckOG0q3kJFZCE3Xh8kI5OF5tn9aTC4dzpaGZ HL9029bDuJdSfugzDGbcKW08BlG99HnJfmp2J81es6jFlXOjAB6xHDZmAwLhQQR04tYy 4e2Ngtf7E3lm+wStJvCdUiRmTQYLtL2OVpbpOLBplie66Jy8NWqHw3fs58ERwGdACuHU umgNAAaLo+fIU/NqF037K4DEgBFdJbl8hTeWxS/WJytfuVGmW2SoCjiwZVaDV04jIog9 eG4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bJIP1g+hM09ON1k9gg6gh/O38Wa2udi8wQnWVY2ihvc=; b=Guh9+Y2okStWQAJyEI5chSMtqkyCYET0E39TgDs0bqszgkrxtkAE1cI47MMtYtXbow c7W0P/IAFLaWMr2z1hf9wXndparDxJlx/KAQmaoDIc/2gJ20xx2EIfGDkCTgBdCudVcZ pyyK2kyv4DByU+RPF9nPNDQ1ypyDUMC4ygFwXfEgNbgM2/oYP0iwf0yhD7/mn4mgp1xm pVHsutlkzQtauAYs8VpH0LHFeaXaurUZsljngpkxZ/XjOBp1N2FEvzEpXqMdSjqEYjYO SFozPvWwkOIgaCisE83GSQ6klIi7kmIPGjoedxBN5wm+Ut60Cv4UDPEaGs+GmYd3ddgv d5ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=df+rQmaC; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb5-20020a0564020d0500b0043ab664c9e7si9007043edb.282.2022.08.15.05.04.25; Mon, 15 Aug 2022 05:04:50 -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=@linaro.org header.s=google header.b=df+rQmaC; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241105AbiHOLUr (ORCPT + 99 others); Mon, 15 Aug 2022 07:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231177AbiHOLUq (ORCPT ); Mon, 15 Aug 2022 07:20:46 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 405A3643E for ; Mon, 15 Aug 2022 04:20:45 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id h22so5201749qtu.2 for ; Mon, 15 Aug 2022 04:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=bJIP1g+hM09ON1k9gg6gh/O38Wa2udi8wQnWVY2ihvc=; b=df+rQmaCa/dDyhG2nv+cI1HBd1c962nhrgGBa+PujJ6Kh909sF4JHBvuiNrCITJl9q 46IQR81rpbeGKpyQC8/40DoTp5eKsChnFFEdOGMaglFLMXl/cX6NWkfNiJ/XEYXuj1Fy VhokwlfDO7m3+p13ki78qU7lAs6JltwPt+FK0wS8bQMxDDn00r8BNBDnK+n9GXZxyCV4 wfwRYz7hEY9Tg7/BwJWoRfFW/eSMGYodoOCMq4+9xqXq97m6OnsE2ru7de3v38SUDQYp US46t29f0L/fX4PN0pp6wNeO6euIlZi5KAVrQ0Oh6Bi6ycVFT+HPpKZVlKF3mcw9Wr9p qayw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=bJIP1g+hM09ON1k9gg6gh/O38Wa2udi8wQnWVY2ihvc=; b=S09+Kt5t3XPPJ5lGlc4/h5xRkKwtsdl+U2fod4U/Lv8y5v3ExiJ11w6PUUL6d6X481 UFU3M/CcpxKkgsORoGCgd0pi48U1BcTnQVAAFa5BF/6E3U7srfQ0j88pQ+xJ6fOCXjZn v+dbtorKzHzQ8POgMNY5IAK3tQWC1vA5s30VzUCgIej8hmkADihJWOJukwZ4HF5m+t+M Jj6dj0zPObwzB2rSEDA6G1ULcIdrKWciEl/oojp9LmtzWYndhfm5i/dqEivbJDCv40Ps PvPUmnIkWWdldgI+5TzNvmqTNPoabfllDONcOlSkWBLp6Gymh/6nxnOzUfJGbX0KiSR8 ZK7w== X-Gm-Message-State: ACgBeo2Xs/8dH7W4fV/jAUpr1YK8wQ5W6mt/u4DpZoYuGP1GWa2f3Mmx 6L0T/QzDlODZoTFWO4H4DE0RzA== X-Received: by 2002:ac8:5d8b:0:b0:31e:ed61:b5a7 with SMTP id d11-20020ac85d8b000000b0031eed61b5a7mr13086482qtx.259.1660562444404; Mon, 15 Aug 2022 04:20:44 -0700 (PDT) Received: from fedora (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id v3-20020a05620a440300b006b945519488sm6524983qkp.88.2022.08.15.04.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 04:20:43 -0700 (PDT) Date: Mon, 15 Aug 2022 07:20:41 -0400 From: William Breathitt Gray To: Julien Panis Cc: vilhelm.gray@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, mranostay@ti.com Subject: Re: [PATCH v4 3/3] counter: capture-tiecap: capture driver support for ECAP Message-ID: References: <20220810140724.182389-1-jpanis@baylibre.com> <20220810140724.182389-4-jpanis@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="31ldM9lRLLqWjxLp" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --31ldM9lRLLqWjxLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 14, 2022 at 01:03:48PM -0400, William Breathitt Gray wrote: > On Wed, Aug 10, 2022 at 04:07:24PM +0200, Julien Panis wrote: > > +static int ecap_cnt_function_read(struct counter_device *counter, > > + struct counter_count *count, > > + enum counter_function *function) > > +{ > > + *function =3D COUNTER_FUNCTION_INCREASE; > > + > > + return 0; > > +} > > + > > +static int ecap_cnt_action_read(struct counter_device *counter, > > + struct counter_count *count, > > + struct counter_synapse *synapse, > > + enum counter_synapse_action *action) > > +{ > > + *action =3D COUNTER_SYNAPSE_ACTION_BOTH_EDGES; > > + > > + return 0; > > +} >=20 > Right now you have a Signal defined for the ECAPSIG line, but there is > at least one more relevant Signal to define: the clock updating ECAPCNT. > The Synapse action of COUNTER_SYNAPSE_ACTION_BOTH_EDGES is for that > clock Signal, but for the ECAPSIG Signal you will need to report a > Synapse action based on the polarity of the next capture (i.e. whether > high or low). I need to make a correction here. IIUC, the ECAPSIG signal doesn't affect the count value of ECAPCNT (ECAPSIG only triggers the captures), so the Synapse action for ECAPSIG should always be COUNTER_SYNAPSE_ACTION_NONE. You don't need to account for the capture polarities because they're not relevant in this particular situation: ECAPSIG doesn't trigger the ECAPCNT count function. William Breathitt Gray --31ldM9lRLLqWjxLp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCYvosCQAKCRC1SFbKvhIj K6snAQCnHLXtaeFz7kheVRLMBzRZFRj428itPpXaS1E++G1YzQEA2He0P9PTIO3Z /8rNAGJz0tq11HR2c//Aw5ROzM5DWQw= =zMXK -----END PGP SIGNATURE----- --31ldM9lRLLqWjxLp--