counter: Implement events_queue_size sysfs attribute
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Wed, 29 Sep 2021 03:16:04 +0000 (12:16 +0900)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 17 Oct 2021 09:55:01 +0000 (10:55 +0100)
commitfeff17a550c7120009d8ba9431426135661a731b
tree8cb59727e09272b6ac5ddd75b7e00df961d5d758
parent4bdec61d927b5db25f75fa377504d4e127c3682b
counter: Implement events_queue_size sysfs attribute

The events_queue_size sysfs attribute provides a way for users to
dynamically configure the Counter events queue size for the Counter
character device interface. The size is in number of struct
counter_event data structures. The number of elements will be rounded-up
to a power of 2 due to a requirement of the kfifo_alloc function called
during reallocation of the queue.

Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Link: https://lore.kernel.org/r/c914b2db2ea0a2637633bcc3e86ded3c94783f2e.1632884256.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/ABI/testing/sysfs-bus-counter
drivers/counter/counter-sysfs.c