Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -268,12 +268,12 @@ L: linux-gpio@vger.kernel.org
S:	Maintained
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>
L:	linux-iio@vger.kernel.org
S:	Maintained
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
M:	William Breathitt Gray <vilhelm.gray@gmail.com>
+1367 −0

File changed and moved.

Preview size limit exceeded, changes collapsed.

+21 −0
Original line number Diff line number Diff line
@@ -8,3 +8,24 @@ menuconfig COUNTER
	  This enables counter device support through the Generic Counter
	  interface. You only need to enable this, if you also want to enable
	  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
+2 −0
Original line number Diff line number Diff line
@@ -3,3 +3,5 @@
#

obj-$(CONFIG_COUNTER) += counter.o

obj-$(CONFIG_104_QUAD_8)	+= 104-quad-8.o
+0 −17
Original line number Diff line number Diff line
@@ -5,23 +5,6 @@

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
	tristate "STM32 LP Timer encoder counter driver"
	depends on MFD_STM32_LPTIMER || COMPILE_TEST
Loading