Thread (16 messages) flat view 16 messages, 4 authors, 2021-10-17
STALE1799d

Revision v17 of 17 in this series.

Revisions (17)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v7 [diff vs current]
  8. v8 [diff vs current]
  9. v9 [diff vs current]
  10. v10 [diff vs current]
  11. v11 [diff vs current]
  12. v12 [diff vs current]
  13. v13 [diff vs current]
  14. v14 [diff vs current]
  15. v15 [diff vs current]
  16. v16 [diff vs current]
  17. v17 current

[PATCH v17 0/9] Introduce the Counter character device interface

From: William Breathitt Gray <hidden>
Date: 2021-09-29 03:16:30
Also in: linux-iio, lkml

Changes in v17:
 - A couple minor improvements to documentation from review suggestions
 - chrdev_lock redeclared as atomic_t; BITMAP was not necessary because
   chrdev_lock is a single flag
 - test_and_set_bit_lock(), clear_bit_unlock(), and clear_bit(),
   replaced respectively with atomic_add_unless(), atomic_dec(), and
   atomic_set()
 - counter_comp_read_is_equal() and counter_comp_read_is_set() macros
   implemented in order to properly test counter_comp structures' read
   callback states
 - counter_sysfs_add() call performed before counter_chrdev_add() call
   in counter_register() in order to match unwinding sequence
 - for-loop utilized in counter-example.c in order to simplify code
 - counter-example.c returns 1 on error instead of -errno; errno may be
   modified after a subsequent library call so we can't depend on it

For convenience, this patchset is also available on my personal git
repo: https://gitlab.com/vilhelmgray/iio/-/tree/counter_chrdev_v17

A Counter character device interface is introduced that allows Counter
events and associated data to be read() by userspace; the
events_configure() and watch_validate() driver callbacks are introduced
to support Counter events; and IRQ support is added to the
104-QUAD-8 driver, serving as an example of how to support the new
Counter events functionality.

William Breathitt Gray (9):
  counter: Move counter enums to uapi header
  counter: Add character device interface
  docs: counter: Document character device interface
  tools/counter: Create Counter tools
  counter: Implement signalZ_action_component_id sysfs attribute
  counter: Implement *_component_id sysfs attributes
  counter: Implement events_queue_size sysfs attribute
  counter: 104-quad-8: Replace mutex with spinlock
  counter: 104-quad-8: Add IRQ support for the ACCES 104-QUAD-8

 Documentation/ABI/testing/sysfs-bus-counter   |  29 +
 Documentation/driver-api/generic-counter.rst  | 177 ++++--
 .../userspace-api/ioctl/ioctl-number.rst      |   1 +
 MAINTAINERS                                   |   2 +
 drivers/counter/104-quad-8.c                  | 256 ++++++--
 drivers/counter/Kconfig                       |   6 +-
 drivers/counter/Makefile                      |   2 +-
 drivers/counter/counter-chrdev.c              | 578 ++++++++++++++++++
 drivers/counter/counter-chrdev.h              |  14 +
 drivers/counter/counter-core.c                |  56 +-
 drivers/counter/counter-sysfs.c               | 123 +++-
 include/linux/counter.h                       |  98 +--
 include/uapi/linux/counter.h                  | 154 +++++
 tools/Makefile                                |  13 +-
 tools/counter/Build                           |   1 +
 tools/counter/Makefile                        |  53 ++
 tools/counter/counter_example.c               |  92 +++
 17 files changed, 1509 insertions(+), 146 deletions(-)
 create mode 100644 drivers/counter/counter-chrdev.c
 create mode 100644 drivers/counter/counter-chrdev.h
 create mode 100644 include/uapi/linux/counter.h
 create mode 100644 tools/counter/Build
 create mode 100644 tools/counter/Makefile
 create mode 100644 tools/counter/counter_example.c


base-commit: a5ae0cfd53aaf031c2e9ba048281776fa67047c2
-- 
2.33.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help