Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2072810rbb; Tue, 27 Feb 2024 09:44:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXSE9Szri/daigsOg+aSGmo1kuJZ7jY/JuHCCW5KD2RBVwa7TrewKxmoeMxaCV4VQ7krXkocvHA0iptR381XHuF3Qcj/coIQw1c5tMLsw== X-Google-Smtp-Source: AGHT+IHC8x/ZCGhcuBzSW/kmXegwSdPI03mLwj7EX2aKNU3nnpCoZvAl5pIlRI7AmYnJNaEqQjBH X-Received: by 2002:a17:906:ad95:b0:a43:8548:fbc4 with SMTP id la21-20020a170906ad9500b00a438548fbc4mr3168784ejb.55.1709055867208; Tue, 27 Feb 2024 09:44:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709055867; cv=pass; d=google.com; s=arc-20160816; b=YcI3oNBVtchV4KEHOynXP3E2aruEqHrOyRdOl2d8J29VJE8eON4uW8Mvca+THcD3To yuqVN+LoOgEPPg/inf6enrTxj5V8CSwJa3xpJdKy8hCQ8eRDwNo8/49zaKCmy17orsgp AWlZ2+7XZ8ZViMA79JTPcILyc7K8hd3vf5rwAfuIGaeTIoBAU+E5lwj7ufX69e02qEH/ JpLHBAFbGSfsdYXxcalfeUfw72rW1sQ4md3pBNug0kjb9PFud7Oa+2K1fJSPt32VFV+y 7ikrVGwLm1vKvEbKhjy/GNeT/PjaamVMgVugpKtmlKf33taUK5nY/a9HmXx+dqMf4HQb GiKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=jTtuR9h+G7uKqcRPnsVn7E2jeHnidr9oglBzqkI2a+U=; fh=NDkmdfoRkeEKvd/1HFcEniy7QGFxW//XgE1TzakoVOs=; b=tN1vHzO/Tllgujc5+gTSsJjUCjoyzQdAyuiiN8G+AXI93qULkTWAy9kCIa3upz1esj VQMA0VUFo73qnBSNoRhJTrl2929fyayTYqYvTpty1aJ9v4sDVIxNF9TT5S0uFUuHiX+z oq72DuCMLXpKvCa4v7QOQelRPqm+tDMWff/13QqZO+KB6TAJnM+n8UXQMix5uSxAHlLR YfZVQFJgOaSHFCTZQJ8AgbLbnN9cPpWo4fOGA4jPFAIcwenjZnOAnpBQ5KadfGuyPXQP ROWFKCBXFa60UKtUFSo9vCrwIenZuhMhg/klypDQR+D9qQXJJAlh5z/MzACAd7cG3dda SaeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=1yoGKMje; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-83758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l10-20020a1709065a8a00b00a43d507c374si269477ejq.693.2024.02.27.09.44.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 09:44:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=1yoGKMje; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-83758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F11641F24D90 for ; Tue, 27 Feb 2024 17:44:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FAFA4EB2F; Tue, 27 Feb 2024 17:44:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="1yoGKMje" Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A07A2557F; Tue, 27 Feb 2024 17:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.132.182.106 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709055858; cv=none; b=CI3iq0t1Czjf2Q3GKhw3FBq5/on6JYJM8C6yqfF6ZdHS0HIGi2DrbDeWgwnJpy6rOHONJs9lWw7lmSYXUo269sxAgF2de6ONDd99aXWr+3dTyXi9JbsSRHPvDtaYtYZUF7GdxcuQixlaGDeCpwDpu7218AMqmhYtUumb1Qt1hH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709055858; c=relaxed/simple; bh=3BzQKjJGF7tof5rGJyDKufTYQlj8ezjC6ENk83SsZ4k=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=m5ST3hlKHJXI/A/xBRtIrI8U3Y8k3wHLEZTqFBNbYpVXw3xG1IrtOlFdpI4ziyu8yLB6nks7dbKa7IAc4pR70WDaZjS6yvdta0yAp+argBBrCCZ5981vlaozGjWdahJzuh9SijiRcDe+51AnOEHwLWoDJ6wy+rtyasDEhKRNg18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=1yoGKMje; arc=none smtp.client-ip=185.132.182.106 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41RBi2s0029650; Tue, 27 Feb 2024 18:44:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= selector1; bh=jTtuR9h+G7uKqcRPnsVn7E2jeHnidr9oglBzqkI2a+U=; b=1y oGKMjeYvQjnK1+hUSuaiK0UBujfXx++pour4YAnDdLL46F0nOa+bV3MvljzLkF75 aKl5JdLHn/hkoxcay9PA/SHFQQVoFG3WEAuNZMk1Qiig2SYkTH2j/8pdI4wT+B+C dzn2eKcpujpqjvteWr9aM2fSJAiaWNkW4jS8v2dnI0gsGIwx5HUDvCV/03VwJlj5 tRAGw4nt8Xj2p/OUFtVc/mbTpsA0kRWxYp7vnZiLIjAL5YFKWf9Q2IxnrrIu87sq 8rsUuq3pzZusu6OwHOHCOOjEKp31ggt4oVM7ACQ0e8cz5bkMpoyZJYujfQ5jjO+W fTyMUduEb5bZnKdsYyWg== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3whf4b9dp9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 18:44:06 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id EED2440045; Tue, 27 Feb 2024 18:44:02 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A2F4D2ADF49; Tue, 27 Feb 2024 18:43:38 +0100 (CET) Received: from [10.252.26.109] (10.252.26.109) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 27 Feb 2024 18:43:35 +0100 Message-ID: <599a7357-b4d6-4581-9d5c-c1d0ade3e410@foss.st.com> Date: Tue, 27 Feb 2024 18:43:20 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 04/10] counter: stm32-timer-cnt: introduce clock signal Content-Language: en-US To: William Breathitt Gray CC: , , , , , References: <20231220145726.640627-1-fabrice.gasnier@foss.st.com> <20231220145726.640627-5-fabrice.gasnier@foss.st.com> From: Fabrice Gasnier In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-27_05,2024-02-27_01,2023-05-22_02 On 1/8/24 17:46, William Breathitt Gray wrote: > On Wed, Dec 20, 2023 at 03:57:20PM +0100, Fabrice Gasnier wrote: >> Introduce the internal clock signal, used to count when in simple rising >> function. Also add the "frequency" extension to the clock signal. >> >> With this patch, signal action reports a consistent state when "increase" >> function is used, and the counting frequency: >> $ echo increase > function >> $ grep -H "" signal*_action >> signal0_action:none >> signal1_action:none >> signal2_action:rising edge >> $ echo 1 > enable >> $ cat count >> 25425 >> $ cat count >> 44439 >> $ cat ../signal2/frequency >> 208877930 >> >> Signed-off-by: Fabrice Gasnier > > Reviewed-by: William Breathitt Gray > > The code is all right, but some minor suggestions below. > >> +static struct counter_comp stm32_count_clock_ext[] = { >> + COUNTER_COMP_SIGNAL_U64("frequency", stm32_count_clk_get_freq, NULL), > > It might be worth introducing a new COUNTER_COMP_FREQUENCY() macro now > that we have a second driver with the 'frequency' extension > (ti-ecap-capture also has 'frequency'). But it's up to you if you want > to add a precursor patch to this series, or I'll introduce it separately > myself in a independent patch. Thanks for suggesting. I added a precursor patch to this series. I guess you wishes to see it used in both ti-ecap-capture and stm32-timer-cnt. I only cared about stm32-timer-cnt in this series. Can I let you do ti-ecap-capture change if/when you're going to apply it? > >> @@ -287,7 +321,13 @@ static struct counter_signal stm32_signals[] = { >> { >> .id = STM32_CH2_SIG, >> .name = "Channel 2" >> - } >> + }, >> + { >> + .id = STM32_CLOCK_SIG, >> + .name = "Clock Signal", > > The word "Signal" feels unnecessary to me when both the sysfs path and > data structure will have 'signal' already. Do you think "Clock" by > itself is clear enough? Agreed, I updated in v4. Best Regards, Fabrice > > William Breathitt Gray