ASoC: cs35l41: Set the max SPI speed for the whole device
authorLucas Tanure <tanureal@opensource.cirrus.com>
Tue, 23 Nov 2021 16:31:39 +0000 (16:31 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 24 Nov 2021 12:57:10 +0000 (12:57 +0000)
commit872fc0b6bde8b2dd6891c740cd792d214255dca3
treeb999a80bbdab048febdcc61dc060b7e3513f2e9b
parent8a6cc0ded6d942e4a506c421c4d87a634bda6e75
ASoC: cs35l41: Set the max SPI speed for the whole device

Higher speeds are only supported when PLL is enabled, but
the current driver doesn't enable PLL outside of stream
use cases, so better to set the lowest SPI speed accepted
by the entire device.

Move the current frequency set to the spi sub-driver so
the whole device can benefit from that speed.

spi-max-frequency property could be used, but ACPI systems don't
support it, so by setting it in the spi sub-driver probe
both Device Trees and ACPI systems are supported.

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211123163149.1530535-2-tanureal@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l41-spi.c
sound/soc/codecs/cs35l41.c
sound/soc/codecs/cs35l41.h