• Kamel Bouhara's avatar
    counter: Add microchip TCB capture counter · 106b1041
    Kamel Bouhara authored
    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: default avatarKamel Bouhara <kamel.bouhara@bootlin.com>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    106b1041
microchip-tcb-capture.c 10.4 KB