Message ID | 20240227173803.53906-2-fabrice.gasnier@foss.st.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-83748-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2855275dyb; Tue, 27 Feb 2024 09:40:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW1ZJ4/MNTAtrGQAu+E5NbUFWVtBc05WEfxZEfZtSl+gBlNw1m4lhT3UZCgOhfK+TiIT0kqfFLvQ08wHzOwICIu+FOECw== X-Google-Smtp-Source: AGHT+IE1Kt8B2gTKfyE8abUZ+3Vg9nLVkPkZ1ZivYXoDkkCkLDSkppg+YSlAsB5mDJWzYbfYga6L X-Received: by 2002:a05:622a:58a:b0:42e:9f4d:4c02 with SMTP id c10-20020a05622a058a00b0042e9f4d4c02mr2381143qtb.35.1709055646514; Tue, 27 Feb 2024 09:40:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709055646; cv=pass; d=google.com; s=arc-20160816; b=iU26u1DLpRtthBQg9g0FF16Scy7+ZviV0Ud8Us0+S4R9GcuDpFQ2a60v15SZnFwdUl SGpJGueo0bqsg0oHGBk3LZBiMTQ3ib2t7smRPqVzjohaBTo1KFRK3g3T1a8kSJ0W7Uv/ lr5Wki8FZCgD8kT49l9w+6ywAHTXoP+SKh3jRWSaMgZSWvUsDfcvnEPJpcGCj6DuUdpI nOhr7PkinVisKk6buBkyhESBZZDGl8DVmNvAc0B+15tf+2qfAbHHobgFOGx3SlxnqJjS Y9KEtqn/KPzzXLkPy6WsygigehHtPx3LD453EZI8uEgJ2/8I5wwd4hiDvIVo8611/JRq rmdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vJldcTa3fZJ+W5cK/vrvMKnfUz/AWmcz3zq1p3k7gUo=; fh=ozwKRq0p8tj2zy4oAJzh3eawPsCHg5fP2FoTNn7f1y4=; b=kzmpcV9TswIDQnhEaltAQ79ppIokzdDyGT1K+1AL+Hh8pIWkHXPuXqGbrkN/ZdcXYe LJYnFGoH3gsIGZQ2mhD7t26tGN4sQdD5w5Gaqvr321kxehREIoL3bJW2w8DLFWTY89BK cxSMmgtJubo5+pKtKo7HbbRgNUcCVvJLo8/yu+vemZu1MXtlJ57NoF6tv0P+17k/864Z nkAgsTMZoMBcTua2XNaA3TGW2de7YpIhiVGqSQq5RALZDfTVIXty9iHtfNCPni/dj+T3 Yw/561BJoe0I/YjrjQx4riItjigbOJssXmNaPPhVikfa7wR51H97xAyQzYRm+4O7dQcD w/IQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=mzR1Ciu5; 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-83748-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83748-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u11-20020a05622a198b00b0042e722e55d9si8691416qtc.411.2024.02.27.09.40.46 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 09:40:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83748-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=mzR1Ciu5; 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-83748-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83748-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 420901C204F5 for <ouuuleilei@gmail.com>; Tue, 27 Feb 2024 17:40:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 199F714A085; Tue, 27 Feb 2024 17:39:27 +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="mzR1Ciu5" 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 B50291487DC; Tue, 27 Feb 2024 17:39:22 +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=1709055564; cv=none; b=U9CyiDBYu2LJLkYqr3Al8sew2q/TANoWSbsATVtu8a4W1KnT6DLr+nzy0b4GYsl6/c75H6k8BPMLL+QXp57MJZTK/YyvoIic3rBBjn5ERkGg/LEO6xySbjRIlx1sVyZftrsB4GJ893TXfADkNxQ2W3pK+moBrBg9Y35JnfJSCmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709055564; c=relaxed/simple; bh=8I2LJfjIfxxKwHLODKbe7ZdonemobuyLfJmot6PYhGM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=B4fFfSxsM4hhB8FU+Y4CtziZ2hTqz2u5ifp6phZ9N84XuEVYLGud0WGoIhhryzgLGlj458ZfI4GhvXWuJM7TjgQGpD6Npg0hVPELLtC1vxODSKOzcaOOnShr45f620krZt95aQOaY7BKPChGIcBjgu22Jk4vAxo+tYEE/J9KvKs= 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=mzR1Ciu5; 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 41RBi2OZ029666; Tue, 27 Feb 2024 18:38:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=vJldcTa3fZJ+W5cK/vrvMKnfUz/AWmcz3zq1p3k7gUo=; b=mz R1Ciu59N9MZiKesA/ud4/Se2eEr5pMXEDx0BlligdUEfBmzk/4iCTGDoizS7DH9p mCBIf/JE5Lgehp0dk9RZipzw1sz7OeEcNaQ0nASrWGq6CkKjketjfgcB1B9mNBIR H7e5e3DqXJrdd3nl2yvcHV8onYnvd0jj2b8AM74C/tTUWlHF3DumoBXW7NZ47+Ij lGvEkMnt8XYPzfnDLZGJDD69OkRAWaRjTAtgbnxcQrJM2Yarvdqz2/mDUwPP5WPr BodgS9CSum/YTOoozS4eKiAXfg26I5tj5JJNxC9oHxwMrSpumIb1JNbLc3Zg5j2q RPUkioxPVvDOR+JDca9Q== 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 3whf4b9d71-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 18:38:48 +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 6C0E040046; Tue, 27 Feb 2024 18:38:43 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 00D762AD12A; Tue, 27 Feb 2024 18:38:17 +0100 (CET) Received: from localhost (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:38:16 +0100 From: Fabrice Gasnier <fabrice.gasnier@foss.st.com> To: <william.gray@linaro.org> CC: <lee@kernel.org>, <alexandre.torgue@foss.st.com>, <fabrice.gasnier@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: [PATCH v4 01/11] counter: Introduce the COUNTER_COMP_FREQUENCY() macro Date: Tue, 27 Feb 2024 18:37:53 +0100 Message-ID: <20240227173803.53906-2-fabrice.gasnier@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240227173803.53906-1-fabrice.gasnier@foss.st.com> References: <20240227173803.53906-1-fabrice.gasnier@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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_03,2024-02-27_01,2023-05-22_02 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792074733348643325 X-GMAIL-MSGID: 1792074733348643325 |
Series |
counter: Add stm32 timer events support
|
|
Commit Message
Fabrice Gasnier
Feb. 27, 2024, 5:37 p.m. UTC
Now that there are two users for the "frequency" extension, introduce a
new COUNTER_COMP_FREQUENCY() macro.
Suggested-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
include/linux/counter.h | 3 +++
1 file changed, 3 insertions(+)
Comments
On Tue, Feb 27, 2024 at 06:37:53PM +0100, Fabrice Gasnier wrote: > Now that there are two users for the "frequency" extension, introduce a > new COUNTER_COMP_FREQUENCY() macro. > > Suggested-by: William Breathitt Gray <william.gray@linaro.org> > Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> > --- > include/linux/counter.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/linux/counter.h b/include/linux/counter.h > index 702e9108bbb4..03472d7407de 100644 > --- a/include/linux/counter.h > +++ b/include/linux/counter.h > @@ -602,6 +602,9 @@ struct counter_array { > #define COUNTER_COMP_FLOOR(_read, _write) \ > COUNTER_COMP_COUNT_U64("floor", _read, _write) > > +#define COUNTER_COMP_FREQUENCY(_read, _write) \ > + COUNTER_COMP_SIGNAL_U64("frequency", _read, _write) > + > #define COUNTER_COMP_POLARITY(_read, _write, _available) \ > { \ > .type = COUNTER_COMP_SIGNAL_POLARITY, \ > -- > 2.25.1 Sorry, would you make one minor change? The "frequency" extension is read-only so there is no need for a _write parameter (it'll always be NULL). You don't need to rebase and submit the entire patchset again just yet because I will likely have more comments when I review. Just submit the next version of this particular patch separately and I'll pick it up so we can get it merged into counter-next. Thanks, William Breathitt Gray
diff --git a/include/linux/counter.h b/include/linux/counter.h index 702e9108bbb4..03472d7407de 100644 --- a/include/linux/counter.h +++ b/include/linux/counter.h @@ -602,6 +602,9 @@ struct counter_array { #define COUNTER_COMP_FLOOR(_read, _write) \ COUNTER_COMP_COUNT_U64("floor", _read, _write) +#define COUNTER_COMP_FREQUENCY(_read, _write) \ + COUNTER_COMP_SIGNAL_U64("frequency", _read, _write) + #define COUNTER_COMP_POLARITY(_read, _write, _available) \ { \ .type = COUNTER_COMP_SIGNAL_POLARITY, \