]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ti: davinci-mcasp: Handle missing required DT properties
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 6 Nov 2020 07:25:51 +0000 (09:25 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 6 Nov 2020 17:46:03 +0000 (17:46 +0000)
commit19f07ca6f82259e68c6e6255939783759b950594
treeb6969a5a4a878cb66214036564060a39f1135955
parentfce5f37441296bef4792aba07869c578ef1c585d
ASoC: ti: davinci-mcasp: Handle missing required DT properties

McASP needs three required properties to be usable for audio:
op-mode, tdm-slots and the serial-dir array.

Instead of probing the driver even without the needed information we should
make sure that all the parameters are provided for operation.

The fact that McASP can act as a GPIO controller for it's pins complicates
this a bit, but as a general rule we can:
- we fail the probe if McASP is not configured to be used as gpiochip
- we will not register the DAI (and PCM) if gpiochip is defined

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201106072551.689-5-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ti/davinci-mcasp.c