20 Jul, 2020

1 commit

  • This drivers allows to use the capture mode of the Timer Counter Block
    hardware block available in Microchip SoCs through the counter subsystem.

    Two functions of the counter are supported for the moment: period
    capture and quadrature decoder. The latter is only supported by the
    SAMA5 series of SoCs.

    For the period capture mode a basic setup has been chosen that will
    reset the counter each time the period is actually reached. Of course
    the device offers much more possibilities.

    For quadrature mode, both channel 0 and 1 must be configured even if we
    only capture the position (no revolution/rotation).

    Signed-off-by: Kamel Bouhara
    Signed-off-by: Jonathan Cameron

    Kamel Bouhara
     

18 Oct, 2019

1 commit

  • This adds a new counter driver for the Texas Instruments Enhanced
    Quadrature Encoder Pulse (eQEP) module.

    Only very basic functionality is currently implemented - only enough to
    be able to read the position. The actual device has many more features
    which can be added to the driver on an as-needed basis.

    It is not possible to read the QEPA/B signal values in hardware, so
    that feature is omitted.

    The TI_PWMSS kernel option is selected in Kconfig to enable the parent
    bus, which is needed for power management.

    Signed-off-by: David Lechner
    Signed-off-by: Jonathan Cameron

    David Lechner
     

18 Jun, 2019

1 commit

  • …jic23/iio into staging-linus

    Jonathan writes:

    Second set of IIO fixes for the 5.2 cycle.

    * ad7150
    - sense of bit for controlling adaptive vs fixed threshold was flipped.
    * adt7316
    - Fix a build issue due to wrong headers for gpio usage.
    * lsm6dsx
    - correctly suspend / resume i2c slaves when the host goes to sleep.
    * mlx90632
    - relax a compatability check to allow for newer devices.

    Also one counters fix

    * counter/ftm-quaddec
    - missing dependencies in Kconfig.

    * tag 'iio-fixes-for-5.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
    counter/ftm-quaddec: Add missing dependencies in Kconfig
    staging: iio: adt7316: Fix build errors when GPIOLIB is not set
    iio: temperature: mlx90632 Relax the compatibility check
    iio: imu: st_lsm6dsx: fix PM support for st_lsm6dsx i2c controller
    staging:iio:ad7150: fix threshold mode config bit

    Greg Kroah-Hartman
     

08 Jun, 2019

1 commit


21 May, 2019

1 commit


26 Apr, 2019

5 commits

  • This driver exposes the counter for the quadrature decoder of the
    FlexTimer Module, present in the LS1021A soc.

    Signed-off-by: Patrick Havelange
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    Patrick Havelange
     
  • Add support for new counter device to stm32-lptimer.

    Signed-off-by: Fabrice Gasnier
    Reviewed-by: Jonathan Cameron
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    Fabrice Gasnier
     
  • Implement counter part of the STM32 timer hardware block by using
    counter API. Hardware only supports X2 and X4 quadrature modes. A
    ceiling value can be set to define the maximum value reachable by the
    counter.

    Signed-off-by: Benjamin Gaignard
    Co-authored-by: Fabrice Gasnier
    Reviewed-by: Jonathan Cameron
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Gaignard
     
  • 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: Jonathan Cameron
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    William Breathitt Gray
     
  • This patch introduces the Generic Counter interface for supporting
    counter devices.

    In the context of the Generic Counter interface, a counter is defined as
    a device that reports one or more "counts" based on the state changes of
    one or more "signals" as evaluated by a defined "count function."

    Driver callbacks should be provided to communicate with the device: to
    read and write various Signals and Counts, and to set and get the
    "action mode" and "count function" for various Synapses and Counts
    respectively.

    To support a counter device, a driver must first allocate the available
    Counter Signals via counter_signal structures. These Signals should
    be stored as an array and set to the signals array member of an
    allocated counter_device structure before the Counter is registered to
    the system.

    Counter Counts may be allocated via counter_count structures, and
    respective Counter Signal associations (Synapses) made via
    counter_synapse structures. Associated counter_synapse structures are
    stored as an array and set to the the synapses array member of the
    respective counter_count structure. These counter_count structures are
    set to the counts array member of an allocated counter_device structure
    before the Counter is registered to the system.

    A counter device is registered to the system by passing the respective
    initialized counter_device structure to the counter_register function;
    similarly, the counter_unregister function unregisters the respective
    Counter. The devm_counter_register and devm_counter_unregister functions
    serve as device memory-managed versions of the counter_register and
    counter_unregister functions respectively.

    Reviewed-by: Jonathan Cameron
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    William Breathitt Gray