[PATCH 5/8] iio/counter: add FlexTimer Module Quadrature decoder counter driver
William Breathitt Gray
vilhelm.gray at gmail.com
Thu Feb 21 12:09:54 AEDT 2019
On Wed, Feb 20, 2019 at 04:41:54PM +0000, Jonathan Cameron wrote:
> On Mon, 18 Feb 2019 15:03:18 +0100
> Patrick Havelange <patrick.havelange at essensium.com> wrote:
>
> > This driver exposes the counter for the quadrature decoder of the
> > FlexTimer Module, present in the LS1021A soc.
> >
> > Signed-off-by: Patrick Havelange <patrick.havelange at essensium.com>
> > Reviewed-by: Esben Haabendal <esben at haabendal.dk>
> Given you cc'd William, I'm guessing you know about the counter
> subsystem effort. I would really rather not take any drivers
> into IIO if we have any hope of getting that upstreamed soon
> (which I personally think we do and should!). The reason is
> we end up having to maintain old ABI just because someone might be using
> it and it makes the drivers very messy.
>
> I'll review as is though as may be there are some elements that will
> cross over.
>
> Comments inline. William: Looks like a straight forward conversion if
> it makes sense to get this lined up as part of your initial submission?
> You have quite a few drivers so I wouldn't have said it needs to be there
> at the start, but good to have it soon after.
>
> Jonathan
I agree, we should try to merge this as part of Counter subsystem
introduction rather than as another IIO Counter driver. As we determined
when adding support for the STM32 timers, the existing IIO Counter API
is fundamentally unsuitable for representing counter devices. So
regardless of how a new Counter API is merged, the existing IIO Counter
API must be deprecated.
Patrick, I apologize for the confusion this has caused. Would you be
able to convert this driver to use the proposed Counter subsystem API
from this patchset that I believe you encountered before:
https://marc.info/?l=linux-arm-kernel&m=153229982404051
Although it was last updated in October, I believe you should be able to
rebase that Counter subsystem introduction patchset cleanly on top of
the IIO tree (if there are any merge conflicts send me an email). Take a
look at the generic-counter.rst file under the Documentation/driver-api/
directory for an overview of the API; the counter drivers under the
drivers/counter/ directory also make good references.
If you have any difficulties understanding the API, or any other
troubles, don't hesitate to ask. Hopefully, I've made the documentation
clear enough to make the conversion of this driver quick and easy -- and
if not, then it's something I need to fix, so let me know. :-)
William Breathitt Gray
More information about the Linuxppc-dev
mailing list