Commit f1d8a071 authored by William Breathitt Gray's avatar William Breathitt Gray Committed by Greg Kroah-Hartman

counter: 104-quad-8: Add Generic Counter interface support

This patch adds support for the Generic Counter interface to the
104-QUAD-8 driver. The existing 104-QUAD-8 device interface should not
be affected by this patch; all changes are intended as supplemental
additions as perceived by the user.

Generic Counter Counts are created for the eight quadrature channel
counts, as well as their respective quadrature A and B Signals (which
are associated via respective Synapse structures) and respective index
Signals.

The new Generic Counter interface sysfs attributes are intended to
expose the same functionality and data available via the existing
104-QUAD-8 IIO device interface; the Generic Counter interface serves
to provide the respective functionality and data in a standard way
expected of counter devices.
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e854bac9
...@@ -268,12 +268,12 @@ L: linux-gpio@vger.kernel.org ...@@ -268,12 +268,12 @@ L: linux-gpio@vger.kernel.org
S: Maintained S: Maintained
F: drivers/gpio/gpio-104-idio-16.c F: drivers/gpio/gpio-104-idio-16.c
ACCES 104-QUAD-8 IIO DRIVER ACCES 104-QUAD-8 DRIVER
M: William Breathitt Gray <vilhelm.gray@gmail.com> M: William Breathitt Gray <vilhelm.gray@gmail.com>
L: linux-iio@vger.kernel.org L: linux-iio@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/ABI/testing/sysfs-bus-iio-counter-104-quad-8 F: Documentation/ABI/testing/sysfs-bus-iio-counter-104-quad-8
F: drivers/iio/counter/104-quad-8.c F: drivers/counter/104-quad-8.c
ACCES PCI-IDIO-16 GPIO DRIVER ACCES PCI-IDIO-16 GPIO DRIVER
M: William Breathitt Gray <vilhelm.gray@gmail.com> M: William Breathitt Gray <vilhelm.gray@gmail.com>
......
...@@ -8,3 +8,24 @@ menuconfig COUNTER ...@@ -8,3 +8,24 @@ menuconfig COUNTER
This enables counter device support through the Generic Counter This enables counter device support through the Generic Counter
interface. You only need to enable this, if you also want to enable interface. You only need to enable this, if you also want to enable
one or more of the counter device drivers below. one or more of the counter device drivers below.
if COUNTER
config 104_QUAD_8
tristate "ACCES 104-QUAD-8 driver"
depends on PC104 && X86 && IIO
select ISA_BUS_API
help
Say yes here to build support for the ACCES 104-QUAD-8 quadrature
encoder counter/interface device family (104-QUAD-8, 104-QUAD-4).
A counter's respective error flag may be cleared by performing a write
operation on the respective count value attribute. Although the
104-QUAD-8 counters have a 25-bit range, only the lower 24 bits may be
set, either directly or via the counter's preset attribute. Interrupts
are not supported by this driver.
The base port addresses for the devices may be configured via the base
array module parameter.
endif # COUNTER
...@@ -3,3 +3,5 @@ ...@@ -3,3 +3,5 @@
# #
obj-$(CONFIG_COUNTER) += counter.o obj-$(CONFIG_COUNTER) += counter.o
obj-$(CONFIG_104_QUAD_8) += 104-quad-8.o
...@@ -5,23 +5,6 @@ ...@@ -5,23 +5,6 @@
menu "Counters" menu "Counters"
config 104_QUAD_8
tristate "ACCES 104-QUAD-8 driver"
depends on PC104 && X86
select ISA_BUS_API
help
Say yes here to build support for the ACCES 104-QUAD-8 quadrature
encoder counter/interface device family (104-QUAD-8, 104-QUAD-4).
Performing a write to a counter's IIO_CHAN_INFO_RAW sets the counter and
also clears the counter's respective error flag. Although the counters
have a 25-bit range, only the lower 24 bits may be set, either directly
or via a counter's preset attribute. Interrupts are not supported by
this driver.
The base port addresses for the devices may be configured via the base
array module parameter.
config STM32_LPTIMER_CNT config STM32_LPTIMER_CNT
tristate "STM32 LP Timer encoder counter driver" tristate "STM32 LP Timer encoder counter driver"
depends on MFD_STM32_LPTIMER || COMPILE_TEST depends on MFD_STM32_LPTIMER || COMPILE_TEST
......
...@@ -4,5 +4,4 @@ ...@@ -4,5 +4,4 @@
# When adding new entries keep the list in alphabetical order # When adding new entries keep the list in alphabetical order
obj-$(CONFIG_104_QUAD_8) += 104-quad-8.o
obj-$(CONFIG_STM32_LPTIMER_CNT) += stm32-lptimer-cnt.o obj-$(CONFIG_STM32_LPTIMER_CNT) += stm32-lptimer-cnt.o
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment