]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: davinci-mcasp: Update PDIR (pin direction) register handling
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 16 Nov 2018 13:41:39 +0000 (15:41 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 28 Nov 2018 12:40:57 +0000 (12:40 +0000)
commitf8c396ecdf3ce0069a4be6489bfe95e206d05856
tree9fadba15dedc67ddbcead14ea7841932d34081a8
parenta15f4cf7d375ec1373fce39dd6e57aff308c8e07
ASoC: davinci-mcasp: Update PDIR (pin direction) register handling

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: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/davinci/davinci-mcasp.c
sound/soc/davinci/davinci-mcasp.h