mbox series

[0/8] counter: ti-eqep: implement features for speed measurement

Message ID 20211017013343.3385923-1-david@lechnology.com (mailing list archive)
Headers show
Series counter: ti-eqep: implement features for speed measurement | expand

Message

David Lechner Oct. 17, 2021, 1:33 a.m. UTC
Now that the counter subsystem has a new chrdev for events, we can use this to
add new features to the TI eQEP driver to be able to do accurate speed
measurement.

This adds two new device-level components, a Unit Timer and an Edge Capture
Unit. I don't have much knowledge about other available counter hardware, so
I don't know if it makes sense to try to make these more generic, e.g.
counterX/timerY/* and counterX/captureY/*. For now, they are just flat
(counterX/unit_timer_* and counterX/edge_capture_unit_*) and assume there is
only one instance per counter device.

This has been tested on a BeagleBone Blue with LEGO MINDSTORMS motors.

David Lechner (8):
  counter/ti-eqep: implement over/underflow events
  counter/ti-eqep: add support for direction
  counter/ti-eqep: add support for unit timer
  docs: counter: add unit timer sysfs attributes
  counter/ti-eqep: add support for latched position
  docs: counter: add latch_mode and latched_count sysfs attributes
  counter/ti-eqep: add support for edge capture unit
  docs: counter: add edge_capture_unit_* attributes

 Documentation/ABI/testing/sysfs-bus-counter | 100 +++-
 drivers/counter/ti-eqep.c                   | 482 +++++++++++++++++++-
 include/uapi/linux/counter.h                |   4 +
 3 files changed, 575 insertions(+), 11 deletions(-)