summaryrefslogtreecommitdiff
path: root/include/linux/counter.h
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <william.gray@linaro.org>2022-09-28 01:53:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-30 15:32:35 +0300
commit45d2918520b2d8e640e4fb3fbf664dfb823dc520 (patch)
tree94e9ccceeb8ef6f7ea716ead09f4a929fef8a70c /include/linux/counter.h
parent9830288aeada5ec8ded1665aafe2d2b8f4121bad (diff)
downloadlinux-45d2918520b2d8e640e4fb3fbf664dfb823dc520.tar.xz
counter: Introduce the Count capture component
Some devices provide a latch function to save historic Count values. This patch standardizes exposure of such functionality as Count capture components. A COUNTER_COMP_CAPTURE macro is provided for driver authors to define a capture component. A new event COUNTER_EVENT_CAPTURE is introduced to represent Count value capture events. Cc: Julien Panis <jpanis@baylibre.com> Link: https://lore.kernel.org/r/c239572ab4208d0d6728136e82a88ad464369a7a.1664204990.git.william.gray@linaro.org/ Signed-off-by: William Breathitt Gray <william.gray@linaro.org> Link: https://lore.kernel.org/r/3cebaa0b807a225eb277d771504fe6dba7269ffd.1664318353.git.william.gray@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/counter.h')
-rw-r--r--include/linux/counter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/counter.h b/include/linux/counter.h
index b3fb6b68881a..e160197971dd 100644
--- a/include/linux/counter.h
+++ b/include/linux/counter.h
@@ -453,6 +453,9 @@ struct counter_available {
.priv = &(_available), \
}
+#define COUNTER_COMP_CAPTURE(_read, _write) \
+ COUNTER_COMP_COUNT_U64("capture", _read, _write)
+
#define COUNTER_COMP_CEILING(_read, _write) \
COUNTER_COMP_COUNT_U64("ceiling", _read, _write)