counter: Add character device interface
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Wed, 29 Sep 2021 03:15:59 +0000 (12:15 +0900)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 17 Oct 2021 09:53:52 +0000 (10:53 +0100)
commitb6c50affda5957a3629b149a91c7f6688ffce7f7
tree8d6e0890410abbf4acb52f851b62cee7ee541f05
parente65c26f413718ed2e6d788491adcd8cebc0f44b6
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>
drivers/counter/Makefile
drivers/counter/counter-chrdev.c [new file with mode: 0644]
drivers/counter/counter-chrdev.h [new file with mode: 0644]
drivers/counter/counter-core.c
include/linux/counter.h
include/uapi/linux/counter.h