From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CDC7C5478C for ; Fri, 1 Mar 2024 15:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fkYMINW7CILVDAT5yvh7LshtW85Ca/oTHn4wWooYZb0=; b=ExTw0BUORUe1Y/8NHtFk/6zZeg tIgh3t+CjcKK5EZV7+3C4okcYKC60UqbO09excqkHYYT3VgasCyrkR5rvg2h1pczYK5XL6ZaDqfrc Tm0ddBt5qutZNbDez62mrkNKZ8N/43WM5oaVgJpb7zD4W9VlV/zsbj6iXPXA1bgc2Tka80Uy4KDxp ggrfumfoPm/Ovgc+sLgPAksqx0hogK3+YJm/Dgo6YHYLMOkpCbXmvqQvdkbKonMpRuPi3Fi/6gH1P Fj7ukjEtT71nM6kZal9pMlto0CXQ9vZ4Jzqbud3LVGVJfQNhm8zGc+irF9O4u8JKuG5dACAIv6N1V LVQvvigw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg5Ek-00000000ykJ-0zWt; Fri, 01 Mar 2024 15:55:50 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg5Eh-00000000yiA-0IP0 for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 15:55:48 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-412cb05f0b5so3286955e9.3 for ; Fri, 01 Mar 2024 07:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709308545; x=1709913345; darn=lists.infradead.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=dEf+rbXNQvLvB9iPkH1P+r9uBHTvmiiyJwMOWWoELNo=; b=GI5449uB3ETxi9mpY8ByWeIpd+o/4DUPwhjwYFTioWodeA0lA5OK0Ppc6lJBlNgp4b +hM/Wz5vP2EbWdBhr+CD716D9AWH9rvrC66lQfDxLgOAkxXn9Y01hgymlIeTZRv1VeQa u128WmiaMHg3/FMq9UgVo3AOpKuR+lV0wWIFTGYlCMFRsUY71JMCMYAnCguvwxkmVrdI JH2ilmvZLaU4WC++8NWIhdmVzexlschmyOy3YMgGyMaFxVmvWBw2sYVS8J4Ev+SbBYjk L7xxo3pDBtYeCXuwgi7SkkdI3PRuVRi45yyjKxp/GNU4o3PqkpHjrgLUhsyhbEOAsOXH RGXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709308545; x=1709913345; 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=dEf+rbXNQvLvB9iPkH1P+r9uBHTvmiiyJwMOWWoELNo=; b=S2Ss3i4N7YSfgQWn6DicIG6pl/fywxVuKfikIXy5WBgmfmfo3B+FTfNoVmK2i6LW8y 3Fca9XKPEGvzE6tNu5PDI0lqmNKvLiLQBI+tPsjqgMwVy4E09OEtR0qHRv1FS+1uLpZ8 Xcku6G1/e93f+Eu66DcEzIk/qbcTqGZPKsn4+HvCGzSuoo99j7MoCu7chj7Idkrd1D6F R29eeWxtDU2PWZO+vvzWFuMnEn6qSfK+xQe12mv0104Sa641/qpaF6QxyQL8MP2pMiNA qH6UlqyAdm3s3RYtjpNRQvbmOzSIhBEQIZfboZeAzZ6npSkUquActxfUKTECmio13fW3 Dvzw== X-Forwarded-Encrypted: i=1; AJvYcCXPYJER7HxwmKpuJMDOXUkytMJHVhuaW8X6NkfxQxSe+D63jtU3qDBbXBf9RjL1ejWuZHEiA/c1of/fMgIhzxUJo/CPeFCkssqWK+yho4W6w9xx7uk= X-Gm-Message-State: AOJu0YzzsD5cBCFEQicz5Yg4EAK+SD9LPEFMycwEGEjCf66FMNCiN87R CSMwgq8iPihQYNYwzsRVq08U+SoJpCEX7L+1R+A8F56j4egCje/S3H3j51CgNPM= X-Google-Smtp-Source: AGHT+IHXfsf1QVNUUheaEgcb1fKDrYSnpwanX1F3NHauzqf3xzyG0GvJEj7Pf7CKoluJk/kSHAeU6Q== X-Received: by 2002:a05:600c:1986:b0:412:8fe7:4e06 with SMTP id t6-20020a05600c198600b004128fe74e06mr1813507wmq.38.1709308545005; Fri, 01 Mar 2024 07:55:45 -0800 (PST) Received: from ishi ([185.243.57.254]) by smtp.gmail.com with ESMTPSA id u21-20020a7bc055000000b004129a1097e7sm8774972wmc.12.2024.03.01.07.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 07:55:44 -0800 (PST) Date: Fri, 1 Mar 2024 10:55:39 -0500 From: William Breathitt Gray To: Fabrice Gasnier Cc: syednwaris@gmail.com, vigneshr@ti.com, jpanis@baylibre.com, 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 v5] counter: Introduce the COUNTER_COMP_FREQUENCY() macro Message-ID: References: <20240301102505.591918-1-fabrice.gasnier@foss.st.com> MIME-Version: 1.0 In-Reply-To: <20240301102505.591918-1-fabrice.gasnier@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240301_075547_131317_333274FA X-CRM114-Status: GOOD ( 20.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5734206986312396273==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5734206986312396273== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NVfMO94wBSa46KPR" Content-Disposition: inline --NVfMO94wBSa46KPR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 01, 2024 at 11:25:05AM +0100, Fabrice Gasnier wrote: > Now that there are two users for the "frequency" extension, introduce a > new COUNTER_COMP_FREQUENCY() macro. > This extension is intended to be a read-only signal attribute. >=20 > Suggested-by: William Breathitt Gray > Signed-off-by: Fabrice Gasnier > --- > Changes in v5 > - "frequency" extension is read-only, so there's no need to provide > a write parameter. > - patch sent separately from "counter: Add stm32 timer events support" [1] > [1] https://lore.kernel.org/lkml/20240227173803.53906-2-fabrice.gasnier@f= oss.st.com/ > --- > include/linux/counter.h | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/include/linux/counter.h b/include/linux/counter.h > index 702e9108bbb4..0ac36f815b7d 100644 > --- a/include/linux/counter.h > +++ b/include/linux/counter.h > @@ -602,6 +602,13 @@ struct counter_array { > #define COUNTER_COMP_FLOOR(_read, _write) \ > COUNTER_COMP_COUNT_U64("floor", _read, _write) > =20 > +#define COUNTER_COMP_FREQUENCY(_read) \ > +{ \ > + .type =3D COUNTER_COMP_U64, \ > + .name =3D "frequency", \ > + .signal_u64_read =3D (_read), \ > +} > + > #define COUNTER_COMP_POLARITY(_read, _write, _available) \ > { \ > .type =3D COUNTER_COMP_SIGNAL_POLARITY, \ > --=20 > 2.25.1 Hi Fabrice, Setting the structure members directly works, but why not use COUNTER_COMP_SIGNAL_U64("frequency", _read, NULL) instead to keep the code more succinct? William Breathitt Gray --NVfMO94wBSa46KPR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZeH6ewAKCRC1SFbKvhIj K217AP9hJmpnlwQnUsdqaZn6twmR5QyJBT3lfeSMtz4eusnWowEA7uP/8rZ0WZLf TDqIuD3w+89Mcs0vrikcijgkauAOigs= =Zn8v -----END PGP SIGNATURE----- --NVfMO94wBSa46KPR-- --===============5734206986312396273== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5734206986312396273==--