OSDN Git Service

ASoC: sun4i-codec: Expand quirks to handle register offsets and card creation
authorChen-Yu Tsai <wens@csie.org>
Thu, 3 Nov 2016 07:55:44 +0000 (15:55 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 3 Nov 2016 20:29:27 +0000 (14:29 -0600)
commitbc03f0d576000739694ed95e89c71cda78964224
tree9183881f2d3aefdd97fbcda834ed2cad6c3caa48
parent184f22d9b8b2b0614d922f9825cf1a68094d5217
ASoC: sun4i-codec: Expand quirks to handle register offsets and card creation

The A31 has a similar codec to the A10/A20. The PCM parts are very
similar, with just different register offsets. The analog paths are
very different. There are more inputs and outputs.

The A31s, A23, and H3 have a similar PCM interface, again with register
offsets slightly rearranged. The analog path controls, while very
similar between them and the A31, have been moved a separate bus which
is accessed through a message box like interface in the PRCM address
range. This would be handled by a separate auxiliary device tied in
through the device tree in its supporting create_card function.

The quirks structure is expanded to include different register offsets
and separate callbacks for creating the ASoC card. The regmap_config,
quirks, and of_device_match tables have been moved to facilitate this.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun4i-codec.c