Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1742066rdb; Mon, 8 Jan 2024 08:47:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtEfbpZBRrp524jKJBhdGiYsT+rpbkMiICJ7zkfe9mml9RWkjmKwaYcdVsPbl8vsG5mwrh X-Received: by 2002:a17:902:eb84:b0:1d4:cecd:13a7 with SMTP id q4-20020a170902eb8400b001d4cecd13a7mr1751639plg.129.1704732462626; Mon, 08 Jan 2024 08:47:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704732462; cv=none; d=google.com; s=arc-20160816; b=zBsZtjwzIvC8kr6c9nkHqsr7Uc4y4CF1+gv/6RjobPC/OXhYpaSor8WE/76/MKpUjK POM+EhJRAbq71HgNZOWacC24u5ytwTq8k9dhcq4LCN1klPS1xy05kyEh1UrlWEKBbXGL 5gEFePXkkF2X76TCCBtcxYegcm4n142B2zehhSn8bKeXdEbzS4iPVNxlwuQxBgXZlV7k MFW0/MyLBj8xk8/39UWRmjD8hz55HHMwcobVGyrV59GD1zRbwqrX7HWQmyF6tbE/dTpd NhM+VqekzgLy6z1fndFkRo2jKggkPEPfiKvM3LYiMNI6EVIXuOI78h0sPMX9dzdUqXxZ 6Z8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=v86cSdeLVN4Eor53KHOEZU66rYPCIfEGIjL+hEGlyNA=; fh=wT9Q6l4w0nN9BZc2VSxa7kC4ae7opG8tVDMNxCIfbBM=; b=jNR3dFoI0L4czOl4cJpv6F+JbidTRYq91DB5jpt4vNb+tgttN721jq2n8wrdZHTpPg pp9oxb+OcLB/RK51lyPnpd5tJJ5L1ePxjB1a/M1De5hrT22+gy0+nrzYHOSjNYxwGbHt fAUYG1wBSmWyAkSM1z+51/oWvq8iUvF/6SSMCVbIdNLeFlS0jblDRZzi3RvbQq5yec5A vyfVDbOjk55cu5BvtBNp1vlo6CORHOKvLUFGU+l9NGyL6QtrrP+9IBaIz2ayTFQWnmEh VZ0SVvy8FbgzSgys0wSvhaUYSh65I5ceyZJ79ViQasCB2uVcv0Wx6fzvV4wHPl7X/GRZ 9J7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oXN78cDh; spf=pass (google.com: domain of linux-kernel+bounces-19863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d18-20020a170902aa9200b001d3f44dd4e9si129466plr.9.2024.01.08.08.47.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 08:47:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oXN78cDh; spf=pass (google.com: domain of linux-kernel+bounces-19863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D216BB227D1 for ; Mon, 8 Jan 2024 16:47:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6470C54BCD; Mon, 8 Jan 2024 16:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oXN78cDh" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E9C354BD5 for ; Mon, 8 Jan 2024 16:46:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-vs1-f45.google.com with SMTP id ada2fe7eead31-467a18fc0fcso255764137.3 for ; Mon, 08 Jan 2024 08:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704732400; x=1705337200; 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=v86cSdeLVN4Eor53KHOEZU66rYPCIfEGIjL+hEGlyNA=; b=oXN78cDhjWFi1yzkX9VsJPJGNH0wQmSE0IVXkSPYDplZbzwTrLXXXiCOd5Hu0a8wyL iXM7lFI8AsD3Vn5Ya6uMsbZ77uxgSnjtEj/+NbsZ4s8aXAOVsxBtY/pBbDYXTNUs7lgz 497JCLauoUdSTiE9FVzTortuHd3bnXcCyV7ChSJOie9wZfaP0AgXUxEVZnxJaVqQchDx UYhn/HJSU2mtqOMlxtlzCB1IEe2zgbriKbto1X+UYPxk5IN/6a2f3mqzR2pZAZpw50N0 56b+PP28NladRUOZhAShkgTGC2KAANs1ApwQZqMQjcqmqoICmrLYy/Csd8T/AEc4k2Xd 3AsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704732400; x=1705337200; 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=v86cSdeLVN4Eor53KHOEZU66rYPCIfEGIjL+hEGlyNA=; b=nFANj8hP5U+0xbN8MGcVVWCIMOxkwESwQeRsWQsWJBj9eZ4ccV27dJHRv+5uV4Ugt9 fC+G3sdDZeB475qhTusrnkm1gXT9xcNuEXpahfxAofWlFWKfDkVXn4RK34kpoZuhdcyU kXGVYphH/d1QB1JOVStVUP/DDLc6b9Qzvw70x4bD1izAg5J97JSLs/djzX0EV4T/2JNY uWfzZcoVaBj/i+6Uc3uAoWbRRKyzMPRg0+/qUv3lBok/L9vNsd25BHpQiO+smOCGEiKQ +ByOUJ6w4k2BuwvdEq4xWFwSA1UmYPVBULeeZmSZz0g+swBsEwpWavbzOOwCBCRCAvh+ DjXg== X-Gm-Message-State: AOJu0YxpZKguBGvYUO+r4krPmScoCVUlWFENfQQX96fcUfkpJxwiG1uN 4bkqBgw10ETljQAilygWMVJl4d9EPxrY9w== X-Received: by 2002:a67:e687:0:b0:467:a189:2f51 with SMTP id hv7-20020a67e687000000b00467a1892f51mr1623827vsb.66.1704732399907; Mon, 08 Jan 2024 08:46:39 -0800 (PST) Received: from ubuntu-server-vm-macos (072-189-067-006.res.spectrum.com. [72.189.67.6]) by smtp.gmail.com with ESMTPSA id hx6-20020a67e786000000b00467be2e0fa1sm26884vsb.25.2024.01.08.08.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 08:46:39 -0800 (PST) Date: Mon, 8 Jan 2024 16:46:37 +0000 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 v3 04/10] counter: stm32-timer-cnt: introduce clock signal Message-ID: References: <20231220145726.640627-1-fabrice.gasnier@foss.st.com> <20231220145726.640627-5-fabrice.gasnier@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FfZYnz6NI7seIHjE" Content-Disposition: inline In-Reply-To: <20231220145726.640627-5-fabrice.gasnier@foss.st.com> --FfZYnz6NI7seIHjE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 >=20 > 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[] =3D { > + 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. > @@ -287,7 +321,13 @@ static struct counter_signal stm32_signals[] =3D { > { > .id =3D STM32_CH2_SIG, > .name =3D "Channel 2" > - } > + }, > + { > + .id =3D STM32_CLOCK_SIG, > + .name =3D "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? William Breathitt Gray --FfZYnz6NI7seIHjE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZZwm7QAKCRC1SFbKvhIj K9HkAP9p5tjj9d7bEok5P8rHe8XAO3QFNKaXaaEcdc+BJgMHqAEA2FngXSvqxRzd DSkZbpLR+ErJlXMCYj6LMcwcTUqC2Qk= =D0v2 -----END PGP SIGNATURE----- --FfZYnz6NI7seIHjE--