Re: Quadrature decoder driver


Paul Sokolovsky
 

Hello Jonas,

On Wed, 02 Aug 2017 16:03:28 +0200
Jonas Pfaff <jonas.pfaff@gmail.com> wrote:

Hello,

I am working on a driver for quadrature decoders on the SAM E70 SOC
where the QDEC is part of the counter module. The current counter API
would be a good match for it, but I am not sure that this is the right
place for the driver. Other vendors seem to have specific QDEC
modules, on some of them they can be used as additional counters.
There does not seem to be a common way to implement the feature. Do
you have any suggestions where a QDEC driver is best placed? Maybe as
a sensor or a new specific device?
I'd think the good approach is to fit it into an existing subsystem
instead of creating new entities. So indeed, a sensor subsystem seems
like a default "goto" place.

On the other hand, some time ago there was an RFC for a touchscreen
driver, which received a very similar suggestion - instead of an adhoc
driver to be implemented as a sensor driver. I don't know how well that
went, but maybe, just maybe interested parties, while implementing such
cases as sensor drivers, should collect experience and evidence if we
need an "input" subsystem, in case the "sensor" subsystem isn't flexible
enough for user interaction cases.


Thanks,
Jonas
--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Join devel@lists.zephyrproject.org to automatically receive all group messages.