summaryrefslogtreecommitdiffstats
path: root/drivers/counter/counter-chrdev.h
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2021-09-29 12:15:59 +0900
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-10-17 10:53:52 +0100
commitb6c50affda5957a3629b149a91c7f6688ffce7f7 (patch)
tree8d6e0890410abbf4acb52f851b62cee7ee541f05 /drivers/counter/counter-chrdev.h
parente65c26f413718ed2e6d788491adcd8cebc0f44b6 (diff)
downloadlinux-b6c50affda5957a3629b149a91c7f6688ffce7f7.tar.bz2
counter: Add character device interface
This patch introduces a character device interface for the Counter subsystem. Device data is exposed through standard character device read operations. Device data is gathered when a Counter event is pushed by the respective Counter device driver. Configuration is handled via ioctl operations on the respective Counter character device node. Cc: David Lechner <david@lechnology.com> Cc: Gwendal Grignou <gwendal@chromium.org> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/b8b8c64b4065aedff43699ad1f0e2f8d1419c15b.1632884256.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/counter/counter-chrdev.h')
-rw-r--r--drivers/counter/counter-chrdev.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/counter/counter-chrdev.h b/drivers/counter/counter-chrdev.h
new file mode 100644
index 000000000000..5529d16703c4
--- /dev/null
+++ b/drivers/counter/counter-chrdev.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Counter character device interface
+ * Copyright (C) 2020 William Breathitt Gray
+ */
+#ifndef _COUNTER_CHRDEV_H_
+#define _COUNTER_CHRDEV_H_
+
+#include <linux/counter.h>
+
+int counter_chrdev_add(struct counter_device *const counter);
+void counter_chrdev_remove(struct counter_device *const counter);
+
+#endif /* _COUNTER_CHRDEV_H_ */