On Sat, Mar 30, 2019 at 06:36:03PM +0000, Jonathan Cameron wrote:
On Tue, 26 Mar 2019 15:32:34 +0900
Shinji Kanematsu <kanematsu.shinji@xxxxxxxxxxxxx> wrote:
This is a series of patch which adds Updown Counter support onHi Shinji,
Milbeaut M10V SoC.
The Updown Counter counts input pulse signal from external quadrature encoder.
It also has input pulse signal counter function.
Are you aware of the counter subsystem that has been proposed (and
as far as I am concerned is ready to be merged)?
(I think that's the latest version posted)..
William, perhaps you could give an update?
(bad luck, you are getting popular ;)
I'll take a quick review as it stands, as some issues may carry over.
I appreciate that it's always unfortunate to try to upstream stuff at the
same time as a new framework is being developed / upstreamed, but I don't
intend to take any additional counter drivers into IIO. We just
end up having to maintain old interfaces in more and more drivers.
If you reimplement this driver to use the new Generic Counter API, I can
pick it up and include it with my next patchset submission. Please base
your patches ontop of the "generic_counter_v10" branch from my personal
Documentation can be found at:
Look at the existing drivers inside the drivers/counter directory to
serve as references:
If you have any troubles or difficulties with the API, send me a message
and I will be happy to help. :-)
William Breathitt Gray
Shinji Kanematsu (2):
dt-bindings: iio: counter: Add Milbeaut Updown Counter
iio: counter: Add support for Milbeaut Updown Counter
.../bindings/iio/counter/milbeaut-updown_cnt.txt | 22 ++
drivers/iio/counter/Kconfig | 12 +
drivers/iio/counter/Makefile | 1 +
drivers/iio/counter/milbeaut-updown.h | 38 ++
drivers/iio/counter/milbeaut-updown_cnt.c | 385 +++++++++++++++++++++
5 files changed, 458 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/counter/milbeaut-updown_cnt.txt
create mode 100644 drivers/iio/counter/milbeaut-updown.h
create mode 100644 drivers/iio/counter/milbeaut-updown_cnt.c