diff options
author | Fabrice Gasnier <fabrice.gasnier@foss.st.com> | 2024-03-06 16:36:31 +0100 |
---|---|---|
committer | William Breathitt Gray <wbg@kernel.org> | 2024-04-02 13:10:34 -0400 |
commit | 2f48aba356a004d854bc6d77fbc032b2fc666911 (patch) | |
tree | 17fe17ae71f242b682ed8888892d5d54dfa9ecb1 | |
parent | e0363c0706a187b037c06e1f30b2ac0fb44c31c3 (diff) | |
download | lwn-2f48aba356a004d854bc6d77fbc032b2fc666911.tar.gz lwn-2f48aba356a004d854bc6d77fbc032b2fc666911.zip |
counter: Introduce the COUNTER_COMP_FREQUENCY() macro
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.
Suggested-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20240306153631.4051115-1-fabrice.gasnier@foss.st.com
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
-rw-r--r-- | include/linux/counter.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/counter.h b/include/linux/counter.h index b767b5c821f5..cd35d8574ee2 100644 --- a/include/linux/counter.h +++ b/include/linux/counter.h @@ -601,6 +601,9 @@ struct counter_array { #define COUNTER_COMP_FLOOR(_read, _write) \ COUNTER_COMP_COUNT_U64("floor", _read, _write) +#define COUNTER_COMP_FREQUENCY(_read) \ + COUNTER_COMP_SIGNAL_U64("frequency", _read, NULL) + #define COUNTER_COMP_POLARITY(_read, _write, _available) \ { \ .type = COUNTER_COMP_SIGNAL_POLARITY, \ |