Quadrature Encoder Support
Subsystems (2)
cover Quadrature Encoder Support
Hi,
Here's a simple RFC for Intel's Quadrature Encoder. Let me make it clear that I don't mean we should the following patch as is, rather I'd like to open the discussion to, perhaps, extending Industrial Automation Framework with support for Quadrature Encoders.
Let me know if you think IIO would be correct place for such devices, then I can start reworking the driver to provide an IIO-compliant interface.
I'm thinking we would need standard sysfs files for configuring the QEP into single-shot QEP mode or buffered Capture mode, configure thresholds and other details.
Cheers
Felipe Balbi (1):
misc: introduce intel QEP
drivers/misc/Kconfig | 7 + drivers/misc/Makefile | 1 + drivers/misc/intel-qep.c | 813 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 821 insertions(+) create mode 100644 drivers/misc/intel-qep.c
Signature · 1 line
2.23.0
PATCH 1/1 misc: introduce intel QEP
Add support for Intel PSE Quadrature Encoder
--- drivers/misc/Kconfig | 7 + drivers/misc/Makefile | 1 + drivers/misc/intel-qep.c | 813 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 821 insertions(+) create mode 100644 drivers/misc/intel-qep.c
drivers/misc/Kconfig +7 -0
@@ -126,6 +126,13 @@ config INTEL_MID_PTI an Intel Atom (non-netbook) mobile device containing a MIPI P1149.7 standard implementation. +config INTEL_QEP + tristate "Intel Quadrature Encoder" + depends on PCI + default n + help + Support for Intel Quadrature Encoder Devices + config SGI_IOC4 tristate "SGI IOC4 Base IO support" depends on PCI
drivers/misc/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_SGI_GRU) += sgi-gru/ obj-$(CONFIG_CS5535_MFGPT) += cs5535-mfgpt.o obj-$(CONFIG_HP_ILO) += hpilo.o obj-$(CONFIG_APDS9802ALS) += apds9802als.o +obj-$(CONFIG_INTEL_QEP) += intel-qep.o obj-$(CONFIG_ISL29003) += isl29003.o obj-$(CONFIG_ISL29020) += isl29020.o obj-$(CONFIG_SENSORS_TSL2550) += tsl2550.o
drivers/misc/intel-qep.c new file +813 -0
813 lines not on this page · raw message
Signature · 1 line
2.23.0
Jonathan Cameron
maintainerQuoted 7 lines · On Mon, 9 Sep 2019 15:16:04 +0300 Felipe Balbi <[email protected]>…
Hi,
Here's a simple RFC for Intel's Quadrature Encoder. Let me make it clear that I don't mean we should the following patch as is, rather I'd like to open the discussion to, perhaps, extending Industrial Automation Framework with support for Quadrature Encoders.
Quoted 7 lines
Let me know if you think IIO would be correct place for such devices, then I can start reworking the driver to provide an IIO-compliant interface.
I'm thinking we would need standard sysfs files for configuring the QEP into single-shot QEP mode or buffered Capture mode, configure thresholds and other details.
Hi Felipe,
Fairly recently, similar concerns that IIO didn't really suite these devices lead William to create a specific 'counters' subsystem. +CC William.
It may not address all of your requirements yet, but I would imagine it is a better fit than IIO would ever be. We have moved all the older counter drivers out of IIO and across to this new subsystem.
Thanks,
Jonathan
Quoted 12 lines
Cheers
Felipe Balbi (1):
misc: introduce intel QEPdrivers/misc/Kconfig | 7 + drivers/misc/Makefile | 1 + drivers/misc/intel-qep.c | 813 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 821 insertions(+) create mode 100644 drivers/misc/intel-qep.c
Quoted 24 lines · Jonathan Cameron
Quoted 7 lines · On Mon, 9 Sep 2019 15:16:04 +0300 Felipe Balbi <[email protected]>…
Hi,
Here's a simple RFC for Intel's Quadrature Encoder. Let me make it clear that I don't mean we should the following patch as is, rather I'd like to open the discussion to, perhaps, extending Industrial Automation Framework with support for Quadrature Encoders.
Quoted 7 lines
Let me know if you think IIO would be correct place for such devices, then I can start reworking the driver to provide an IIO-compliant interface.
I'm thinking we would need standard sysfs files for configuring the QEP into single-shot QEP mode or buffered Capture mode, configure thresholds and other details.
Hi Felipe,
Fairly recently, similar concerns that IIO didn't really suite these devices lead William to create a specific 'counters' subsystem. +CC William.
Quoted 7 lines
It may not address all of your requirements yet, but I would imagine it is a better fit than IIO would ever be. We have moved all the older counter drivers out of IIO and across to this new subsystem.
Thanks,
Jonathan
Felipe,
Take a look at the Generic Counter interface, it may be what you need:
https://www.kernel.org/doc/html/latest/driver-api/generic-counter.html
There are some existing quadrature encoder counter devices using this interface already; look at the files under drivers/counter for reference.
This interface is still relatively new, so if you have any problems just shoot me an email and I'll be happy to help. :-)
William Breathitt Gray
Quoted 15 lines
Quoted 14 lines
Cheers
Felipe Balbi (1):
misc: introduce intel QEPdrivers/misc/Kconfig | 7 + drivers/misc/Makefile | 1 + drivers/misc/intel-qep.c | 813 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 821 insertions(+) create mode 100644 drivers/misc/intel-qep.c
Hi,
Quoted 29 lines · William Breathitt Gray
Quoted 28 lines · Jonathan Cameron
Quoted 7 lines · On Mon, 9 Sep 2019 15:16:04 +0300 Felipe Balbi <[email protected]>…
Hi,
Here's a simple RFC for Intel's Quadrature Encoder. Let me make it clear that I don't mean we should the following patch as is, rather I'd like to open the discussion to, perhaps, extending Industrial Automation Framework with support for Quadrature Encoders.
Quoted 7 lines
Let me know if you think IIO would be correct place for such devices, then I can start reworking the driver to provide an IIO-compliant interface.
I'm thinking we would need standard sysfs files for configuring the QEP into single-shot QEP mode or buffered Capture mode, configure thresholds and other details.
Hi Felipe,
Fairly recently, similar concerns that IIO didn't really suite these devices lead William to create a specific 'counters' subsystem. +CC William.
It may not address all of your requirements yet, but I would imagine it is a better fit than IIO would ever be. We have moved all the older counter drivers out of IIO and across to this new subsystem.
Quoted 8 lines
Quoted 3 lines
Thanks,
Jonathan
Felipe,
Take a look at the Generic Counter interface, it may be what you need:
https://www.kernel.org/doc/html/latest/driver-api/generic-counter.html
Thanks guys, I wasn't aware of this new subsystem. I'll have a look at start porting the driver over.
Quoted 6 lines
There are some existing quadrature encoder counter devices using this interface already; look at the files under
drivers/counterfor reference.This interface is still relatively new, so if you have any problems just shoot me an email and I'll be happy to help. :-)
Will do William.
cheers
Signature · 1 line
balbi