• Peter Ujfalusi's avatar
    ASoC: davinci-mcasp: Update PDIR (pin direction) register handling · ca3d9433
    Peter Ujfalusi authored
    When McASP is master and the PDIR for the clock pins are configured as
    outputs before the clocking is configured it will output whatever clock
    is generated at the moment internally.
    The clock will switch to the correct rate only when the we start the clock
    generators.
    
    To avoid this we must only set the pin as output after the clock is
    configured and enabled.
    
    AXR pins configured as outputs behaves somehow interesting as well:
    when McASP is not enabled and the pin is selected as output it will not
    honor the DISMOD settings for the inactive state, but will pull the pin
    down.
    
    Add a new bitfield and mark the pins there which needs to be output and
    set the pins only at the time when they will behave correctly.
    
    On stream stop configure the pins back to input which makes them to obey
    the global pin configuration regarding to pull up/down.
    Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    ca3d9433
davinci-mcasp.c 56.7 KB