Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1259262rdg; Fri, 13 Oct 2023 15:57:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfndKrBnsSaui3PGZaNJqKPxhqfnVBogY5atOdOgn9vpPMzZUUAvfupPElQgimZbtO8zrD X-Received: by 2002:a05:6358:52c5:b0:135:85ec:a080 with SMTP id z5-20020a05635852c500b0013585eca080mr34334028rwz.32.1697237855641; Fri, 13 Oct 2023 15:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697237855; cv=none; d=google.com; s=arc-20160816; b=kzXFFrIbT16pfbi0jvkG146265WV+vwk8tohdGe1EZUfyWYdomV1S0te724/mThiIl Ven9QJwmpP7b3pjU1vJvP7SsJjI1dZIRbAYoSzrzNAIxHuAeLzmHAq0h4101c4DCU02e sy4pKqQkk6B/GcMy7eXwtXB+PUcYmVu9oyfwg3TVV13cj0UADa0wjk9StahV98hJcgIb RADxOKooAQZOH3LIVBMPdJIx33w10+tsFofONab3wlLgz3NrnWlNuZwFDYskyNQMBN1r 5NYe4CnzRqLCBJ/nCO3DbHI/tKg6QOETqAfFLbHF7pkwQ1ZxeDZckEfGn7j7CPbtB5W9 f8iQ== 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=6wPwnmETenw6MmBk8K6nY/876otg8xGa1r8lksqWFBc=; fh=wT9Q6l4w0nN9BZc2VSxa7kC4ae7opG8tVDMNxCIfbBM=; b=wlpSm1zTE0IbOtxWth69z3nVs1Q9PkviCdEZpPhsIAqq+Mjeh7m4Qc7j7CmEUGtz2P GFe7YDcdeRF1BXwOYPeNXjwAO71uz9UK7vcwXWAMj37efl1DnI2k834kF/60OGv0vOLF KYccYiLBzAXC1tY01tyaAf3kn61EMx2AU4VcDIu7QRPOi+sUxnkSAuAzkhnF0j28qpne MtTdC1adVCFKOVFabHDWz1i6pPPGERLGuvQuzGonJ5/j54putzsgK7+C4lDcA+ndggEC OpG59WiNrAw5xGnC3FPX/w+id6vtnmKSw5MfvhVPYH8/FjnV+7RBODVT60YxG/ZzDK6A h9Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="R1//LzMz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 28-20020a630c5c000000b005855f67e490si5635668pgm.690.2023.10.13.15.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 15:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="R1//LzMz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4F83982F0990; Fri, 13 Oct 2023 15:57:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231924AbjJMW5W (ORCPT + 99 others); Fri, 13 Oct 2023 18:57:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbjJMW5V (ORCPT ); Fri, 13 Oct 2023 18:57:21 -0400 Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA0FCBB for ; Fri, 13 Oct 2023 15:57:19 -0700 (PDT) Received: by mail-vs1-xe36.google.com with SMTP id ada2fe7eead31-4527d65354bso1244207137.0 for ; Fri, 13 Oct 2023 15:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697237839; x=1697842639; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6wPwnmETenw6MmBk8K6nY/876otg8xGa1r8lksqWFBc=; b=R1//LzMzLKPsUvAlnDcBcG/qOgiKfnUNJoCjk88FFoqB/d6paLYE+Xz2MFvdFcg/QL WyJIA8oCZiwcR2CucLYrutT/OPCKHaDX3i39FkkTjLBAEGr9MjMKit5jS6bRLWb3vYhC N7AOiIaRHbCFujVbQ9r1O8x0a1jqjaiqZSG20H95bUJYSTwDlo31YvXUZ+11AeQKfQcr YI+TTd29+QpAQcfTVX/BP2oaRhuagB+s/9l8WIKtVcsdtYtPe12umNLeCPfJKVA+HTQy 2QHdszF1kgVKwqFA7eEhB1pSxqp6LObUGK5UKWDfgqJSqFiKrMxjWaZMi9vfivEO+mz3 GTFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697237839; x=1697842639; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6wPwnmETenw6MmBk8K6nY/876otg8xGa1r8lksqWFBc=; b=CPdmdJrgeZF71yWU4eKZ+8Yvp7hybiOnrkdLymU8OHXdMltqeaVXQKdwTfVByJ0Jrg h47bmSdwK4y1fSF8EO3n6hvMSKXfBsmbG2ak7v+jpRKqtzSAvalB+maYK+iZkmV/JrvF vIO9IaDcKX23QzmdDyfDQDSb3TooU6hBlUdCTb7fmf70ZZ++TGN4RYkir1kQ+kProScz 8h3Fao3Ny2ymBqVN5tkS01EJ6XOjEGD9AYXJliORDyF4e9JOFj5y+jSvLzHqPeyGw7R9 YUiKk7CzLzs7DqfcYB5I8Ka6X/DJrsz31lkTOh2TCqqjvyI5QNLBpdm8VVfpoFIxPnwb pAzg== X-Gm-Message-State: AOJu0Yx4Ctrb8sblMGc9yyLSBcL48xKDXZ7AfAu7UlwC2T1TADw1Z17T Bl06ounF+zfQ1R2zi4ASkgCUbg== X-Received: by 2002:a67:ce81:0:b0:454:607d:196f with SMTP id c1-20020a67ce81000000b00454607d196fmr29124394vse.20.1697237838405; Fri, 13 Oct 2023 15:57:18 -0700 (PDT) Received: from fedora (072-189-067-006.res.spectrum.com. [72.189.67.6]) by smtp.gmail.com with ESMTPSA id g13-20020a056102244d00b00450fc8d2c76sm540643vss.28.2023.10.13.15.57.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 15:57:17 -0700 (PDT) Date: Fri, 13 Oct 2023 18:57:15 -0400 From: William Breathitt Gray To: Fabrice Gasnier Cc: lee@kernel.org, alexandre.torgue@foss.st.com, linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/6] counter: fix, improvements and stm32 timer events support Message-ID: References: <20230922143920.3144249-1-fabrice.gasnier@foss.st.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fFNMSGoF3fO7Sh+E" Content-Disposition: inline In-Reply-To: <20230922143920.3144249-1-fabrice.gasnier@foss.st.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 13 Oct 2023 15:57:33 -0700 (PDT) --fFNMSGoF3fO7Sh+E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 22, 2023 at 04:39:14PM +0200, Fabrice Gasnier wrote: > This series combines some fix and improvements to the counter interface, > found while stm32 timer counter driver developements. > It also introduces a new tool that can be used for testing. >=20 > Then, it improves the stm32 timer counter driver by introducing new signa= ls, > e.g. counting frequency, and missing channels. > It also adds support for interrupt based events using the chrdev interfac= e. > Two event types are added in this series: overflows and capture. >=20 > Up to now, stm32 timer counter driver focused mainly on quadrature > encoder feature. With this series, all timer instances can be enabled > for simple counting (with overflow and capture events). Hi Fabrice, Would you give a brief summary of the possible configurations we can have for these devices. For example, the existing driver supports a quadrature counting mode where Channel 1 and Channel 2 serve as A and B inputs; I also see that another mode is a simple tally counter with the internal clock serving as the input. How do Channel 3 and Channel 4 fit in here? If you list out all the possible arrangements, I think it'll help me understand how the signals match up with each particular mode. Thanks, William Breathitt Gray >=20 > Changes in v2: > - counter fix and improvement patch applied, hence dropped in v2 series > - mfd patch applied, hence dropped in v2 series > - revisit watch events tool (mainly command line interface) > - add one patch to rename STM32 Timer counter > - various review comments from v1 >=20 > Fabrice Gasnier (6): > tools/counter: add a flexible watch events tool > counter: stm32-timer-cnt: rename quadrature signal > counter: stm32-timer-cnt: rename counter > counter: stm32-timer-cnt: introduce clock signal > counter: stm32-timer-cnt: populate capture channels and check encoder > counter: stm32-timer-cnt: add support for events >=20 > drivers/counter/stm32-timer-cnt.c | 558 ++++++++++++++++++++++++++- > include/linux/mfd/stm32-timers.h | 15 + > tools/counter/Build | 1 + > tools/counter/Makefile | 12 +- > tools/counter/counter_watch_events.c | 368 ++++++++++++++++++ > 5 files changed, 934 insertions(+), 20 deletions(-) > create mode 100644 tools/counter/counter_watch_events.c >=20 > --=20 > 2.25.1 >=20 --fFNMSGoF3fO7Sh+E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZSnLSwAKCRC1SFbKvhIj KzirAQDCyH9zW+B+KquLIfRNSk5vcmFjucDHtM60OcOVpFTebgEAxPZD+Cu+RmK1 WYaD1a0bSMAQ1xu3JYrlOIxW+sxb5QM= =QW5W -----END PGP SIGNATURE----- --fFNMSGoF3fO7Sh+E--