• Karoly Pados's avatar
    USB: serial: ftdi_sio: implement GPIO support for FT-X devices · ba93cc7d
    Karoly Pados authored
    This patch allows using the CBUS pins of FT-X devices as GPIO in CBUS
    bitbanging mode. There is no conflict between the GPIO and VCP
    functionality in this mode. Tested on FT230X and FT231X.
    
    As there is no way to request the current CBUS register configuration
    from the device, all CBUS pins are set to a known state when the first
    GPIO is requested. This allows using libftdi to set the GPIO pins
    before loading this module for UART functionality, a behavior that
    existing applications might be relying upon (though no specific case
    is known to the authors of this patch).
    Signed-off-by: default avatarKaroly Pados <pados@pados.hu>
    [ johan: minor style changes ]
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    ba93cc7d
ftdi_sio.h 17.8 KB