platform/kernel/linux-starfive.git
15 months agoASoC: wm8995: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:50 +0000 (01:13 +0100)]
ASoC: wm8995: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8995 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-37-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8993: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:49 +0000 (01:13 +0100)]
ASoC: wm8993: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8993 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-36-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8991: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:48 +0000 (01:13 +0100)]
ASoC: wm8991: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8991 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-35-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8962: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:47 +0000 (01:13 +0100)]
ASoC: wm8962: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8962 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-34-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8961: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:46 +0000 (01:13 +0100)]
ASoC: wm8961: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8961 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-33-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8960: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:45 +0000 (01:13 +0100)]
ASoC: wm8960: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8960 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-32-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8904: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:44 +0000 (01:13 +0100)]
ASoC: wm8904: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8904 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-31-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8903: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:43 +0000 (01:13 +0100)]
ASoC: wm8903: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8903 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-30-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8900: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:42 +0000 (01:13 +0100)]
ASoC: wm8900: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8900 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-29-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8804: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:41 +0000 (01:13 +0100)]
ASoC: wm8804: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8804 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-28-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8776: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:40 +0000 (01:13 +0100)]
ASoC: wm8776: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8776 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-27-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8770: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:39 +0000 (01:13 +0100)]
ASoC: wm8770: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8770 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-26-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8753: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:38 +0000 (01:13 +0100)]
ASoC: wm8753: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8753 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-25-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8750: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:37 +0000 (01:13 +0100)]
ASoC: wm8750: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8750 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-24-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8741: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:36 +0000 (01:13 +0100)]
ASoC: wm8741: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8741 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-23-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8737: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:35 +0000 (01:13 +0100)]
ASoC: wm8737: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8737 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-22-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8731: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:34 +0000 (01:13 +0100)]
ASoC: wm8731: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8731 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-21-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8728: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:33 +0000 (01:13 +0100)]
ASoC: wm8728: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8728 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-20-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8711: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:32 +0000 (01:13 +0100)]
ASoC: wm8711: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8711 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-19-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8580: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:31 +0000 (01:13 +0100)]
ASoC: wm8580: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8580 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-18-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8523: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:30 +0000 (01:13 +0100)]
ASoC: wm8523: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8523 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-17-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm8510: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:29 +0000 (01:13 +0100)]
ASoC: wm8510: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8510 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-16-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm9090: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:28 +0000 (01:13 +0100)]
ASoC: wm9090: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm9090 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-15-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm9081: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:27 +0000 (01:13 +0100)]
ASoC: wm9081: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm9081 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-14-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm5100: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:26 +0000 (01:13 +0100)]
ASoC: wm5100: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm5100 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-13-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wm2200: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:25 +0000 (01:13 +0100)]
ASoC: wm2200: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm2200 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-12-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs4349: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:24 +0000 (01:13 +0100)]
ASoC: cs4349: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs4349 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-11-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs42xx8: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:23 +0000 (01:13 +0100)]
ASoC: cs42xx8: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs42xx8 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-10-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs42l56: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:22 +0000 (01:13 +0100)]
ASoC: cs42l56: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs42l56 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-9-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs42l52: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:21 +0000 (01:13 +0100)]
ASoC: cs42l52: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs42l52 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-8-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs4270: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:20 +0000 (01:13 +0100)]
ASoC: cs4270: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs4270 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-7-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs4265: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:19 +0000 (01:13 +0100)]
ASoC: cs4265: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs4265 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-6-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs42l51: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:18 +0000 (01:13 +0100)]
ASoC: cs42l51: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs42l51 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-5-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs35l56: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:17 +0000 (01:13 +0100)]
ASoC: cs35l56: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs35l56 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-4-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs35l45: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:16 +0000 (01:13 +0100)]
ASoC: cs35l45: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs35l45 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-3-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs35l41: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:15 +0000 (01:13 +0100)]
ASoC: cs35l41: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs35l41 driver to use the more modern data structure.

Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-2-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: cs35l36: Update to use maple tree register cache
Mark Brown [Thu, 13 Jul 2023 00:13:14 +0000 (01:13 +0100)]
ASoC: cs35l36: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the cs35l36 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-1-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoAdd Probe functionality support for amd platforms.
Mark Brown [Tue, 18 Jul 2023 12:09:03 +0000 (13:09 +0100)]
Add Probe functionality support for amd platforms.

Merge series from V sujith kumar Reddy <vsujithkumar.reddy@amd.corp-partner.google.com>:

The Patch series consists of probe functionality support for amd
platforms.

15 months agoASoC: codec: wm8960: add additional probe check for codec identification
Frank Li [Thu, 13 Jul 2023 22:25:12 +0000 (18:25 -0400)]
ASoC: codec: wm8960: add additional probe check for codec identification

The wm8960 codec is not readable, resulting in a NACK for address 0x3d (8-bit).
This can partially indicate it. For example: wm8962 codec use the same address
but is readable. This additional probe check will help prevent loading the wm8960
module incorrectly on wm8962 hardware.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230713222513.1636591-1-Frank.Li@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoAdd support for rpmsg sound card on i.MX93 platform
Mark Brown [Mon, 17 Jul 2023 21:58:42 +0000 (22:58 +0100)]
Add support for rpmsg sound card on i.MX93 platform

Merge series from Chancel Liu <chancel.liu@nxp.com>:

Support rpmsg sound card on i.MX93 platform.

15 months agoASoC: qcom: Use the maple tree register cache
Mark Brown [Mon, 17 Jul 2023 21:58:36 +0000 (22:58 +0100)]
ASoC: qcom: Use the maple tree register cache

Merge series from Mark Brown <broonie@kernel.org>:

The maple tree register cache should now be a good replacement for the
rbtree cache in almost all situations, update the Qualcomm CODEC drivers
to use the newer cache.

15 months agoASoC: dt-bindings: audio-graph-card2: Drop incomplete example
Rob Herring [Fri, 7 Jul 2023 22:17:25 +0000 (16:17 -0600)]
ASoC: dt-bindings: audio-graph-card2: Drop incomplete example

The example in audio-graph-card2 binding is incomplete, uses
undocumented compatibles strings, and doesn't follow typical .dts
formatting. Rather than try to fix with what would probably be a lengthy
example, just drop the example.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230707221725.1071292-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: tegra: tegra20_ac97: Use devm_platform_get_and_ioremap_resource()
Yangtao Li [Tue, 11 Jul 2023 03:48:45 +0000 (11:48 +0800)]
ASoC: tegra: tegra20_ac97: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230711034846.69437-5-frank.li@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: pxa: Use devm_platform_get_and_ioremap_resource()
Yangtao Li [Tue, 11 Jul 2023 03:48:44 +0000 (11:48 +0800)]
ASoC: pxa: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230711034846.69437-4-frank.li@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: mediatek: mt8186: Convert to devm_platform_ioremap_resource()
Yangtao Li [Tue, 11 Jul 2023 03:48:43 +0000 (11:48 +0800)]
ASoC: mediatek: mt8186: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230711034846.69437-3-frank.li@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: ti: Convert to devm_platform_ioremap_resource_byname()
Yangtao Li [Tue, 11 Jul 2023 03:48:42 +0000 (11:48 +0800)]
ASoC: ti: Convert to devm_platform_ioremap_resource_byname()

Use devm_platform_ioremap_resource_byname() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230711034846.69437-2-frank.li@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: bcm: bcm63xx-i2s-whistler: Convert to devm_platform_ioremap_resource()
Yangtao Li [Tue, 11 Jul 2023 03:48:41 +0000 (11:48 +0800)]
ASoC: bcm: bcm63xx-i2s-whistler: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230711034846.69437-1-frank.li@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: SOF: amd: Add Probe register offset for renoir and rembrandt platform.
V sujith kumar Reddy [Thu, 13 Jul 2023 12:57:09 +0000 (18:27 +0530)]
ASoC: SOF: amd: Add Probe register offset for renoir and rembrandt platform.

Add Probe register offset for renoir and rembrandt platform to get
position update.

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20230713125709.418851-4-vsujithkumar.reddy@amd.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: SOF: Add acp-probe id to sof probe client driver for registration.
V sujith kumar Reddy [Thu, 13 Jul 2023 12:57:08 +0000 (18:27 +0530)]
ASoC: SOF: Add acp-probe id to sof probe client driver for registration.

This patch adds acp-probe id as a match id to support probe functionality
for amd platforms.

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20230713125709.418851-3-vsujithkumar.reddy@amd.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: SOF: amd: Add Probe functionality support for amd platforms.
V sujith kumar Reddy [Thu, 13 Jul 2023 12:57:07 +0000 (18:27 +0530)]
ASoC: SOF: amd: Add Probe functionality support for amd platforms.

This patch consist of probe client device registration,stream tag
and dma channel configuration for SOF firmware.

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20230713125709.418851-2-vsujithkumar.reddy@amd.corp-partner.google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: fsl_rpmsg: Add support for i.MX93 platform
Chancel Liu [Fri, 14 Jul 2023 09:29:13 +0000 (17:29 +0800)]
ASoC: fsl_rpmsg: Add support for i.MX93 platform

Add compatible string and specific soc data to support rpmsg sound card
on i.MX93 platform.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://lore.kernel.org/r/20230714092913.1591195-3-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX93
Chancel Liu [Fri, 14 Jul 2023 09:29:12 +0000 (17:29 +0800)]
ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX93

Add compatible string for i.MX93 platform which supports audio
function through rpmsg channel between Cortex-A and Cortex-M core.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230714092913.1591195-2-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wsa883x: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 18:29:35 +0000 (19:29 +0100)]
ASoC: wsa883x: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wsa883x driver to use the more modern data structure.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230712-asoc-qcom-maple-v1-4-15f8089664b9@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wsa881x: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 18:29:34 +0000 (19:29 +0100)]
ASoC: wsa881x: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wsa881x driver to use the more modern data structure.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230712-asoc-qcom-maple-v1-3-15f8089664b9@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wcd938x: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 18:29:33 +0000 (19:29 +0100)]
ASoC: wcd938x: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wcd938x driver to use the more modern data structure.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230712-asoc-qcom-maple-v1-2-15f8089664b9@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: wcd9335: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 18:29:32 +0000 (19:29 +0100)]
ASoC: wcd9335: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wcd9335 driver to use the more modern data structure.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230712-asoc-qcom-maple-v1-1-15f8089664b9@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: codecs: ES8326: Add es8326_mute function
Zhu Ning [Fri, 14 Jul 2023 03:24:49 +0000 (11:24 +0800)]
ASoC: codecs: ES8326: Add es8326_mute function

The internal analog power and hp Vref of es8326 should always be on to
reduce pop noise. The HP_VOL and HP_CAL are moved to es8326_mute function
so they are turned on at last and turned off at first.

Also, the calibration should be done manually once during start-up
to reduce DC offset on headphone.

Signed-off-by: Zhu Ning <zhuning0077@gmail.com>
Link: https://lore.kernel.org/r/20230714032453.3334-1-zhuning0077@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: ad: Update Analog Devices drivers to maple tree
Mark Brown [Thu, 13 Jul 2023 20:23:23 +0000 (21:23 +0100)]
ASoC: ad: Update Analog Devices drivers to maple tree

Merge series from Mark Brown <broonie@kernel.org>:

The maple tree register cache has now got to feature parity with the
rbtree cache, there are some different tradeoffs made and it should be a
better choice for most modern systems.  Convert the Analog Devices
drivers to use the more modern data structure.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (10):
      ASoC: ad1836: Update to use maple tree register cache
      ASoC: ad1980: Update to use maple tree register cache
      ASoC: adau1372: Update to use maple tree register cache
      ASoC: adau1373: Update to use maple tree register cache
      ASoC: adau1701: Update to use maple tree register cache
      ASoC: adau1761: Update to use maple tree register cache
      ASoC: adau1781: Update to use maple tree register cache
      ASoC: adau1977: Update to use maple tree register cache
      ASoC: adau7118: Update to use maple tree register cache
      ASoC: adav80x: Update to use maple tree register cache

 sound/soc/codecs/ad1836.c       | 2 +-
 sound/soc/codecs/ad1980.c       | 2 +-
 sound/soc/codecs/adau1372.c     | 2 +-
 sound/soc/codecs/adau1373.c     | 2 +-
 sound/soc/codecs/adau1701.c     | 2 +-
 sound/soc/codecs/adau1761.c     | 2 +-
 sound/soc/codecs/adau1781.c     | 2 +-
 sound/soc/codecs/adau1977.c     | 2 +-
 sound/soc/codecs/adau7118-i2c.c | 2 +-
 sound/soc/codecs/adav80x.c      | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)
---
base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
change-id: 20230701-asoc-ad-maple-170068cf0c39

Best regards,
--
Mark Brown <broonie@kernel.org>

15 months agoASoC: q6dsp: q6apm: make g_apm static
Min-Hua Chen [Thu, 13 Jul 2023 15:17:43 +0000 (23:17 +0800)]
ASoC: q6dsp: q6apm: make g_apm static

This patch fixes the following sprse warning:

sound/soc/qcom/qdsp6/q6apm.c:30:14: sparse: warning: symbol 'g_apm' was not declared. Should it be static?

No functional change intended

Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
Link: https://lore.kernel.org/r/20230713151744.86072-1-minhuadotchen@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: amd: acp: clean up some inconsistent indentings
Yang Li [Thu, 13 Jul 2023 06:51:06 +0000 (14:51 +0800)]
ASoC: amd: acp: clean up some inconsistent indentings

sound/soc/amd/acp/acp-rembrandt.c:283 rmb_pcm_resume() warn: inconsistent indenting

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5863
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230713065106.21564-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: adav80x: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:59 +0000 (00:13 +0100)]
ASoC: adav80x: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the adav80x driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-10-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: adau7118: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:58 +0000 (00:13 +0100)]
ASoC: adau7118: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the adau7118 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-9-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: adau1977: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:57 +0000 (00:13 +0100)]
ASoC: adau1977: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the adau1977 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-8-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: adau1781: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:56 +0000 (00:13 +0100)]
ASoC: adau1781: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the adau1781 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-7-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: adau1761: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:55 +0000 (00:13 +0100)]
ASoC: adau1761: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the adau1761 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-6-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: adau1701: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:54 +0000 (00:13 +0100)]
ASoC: adau1701: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the adau1701 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-5-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: adau1373: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:53 +0000 (00:13 +0100)]
ASoC: adau1373: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the adau1373 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-4-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: adau1372: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:52 +0000 (00:13 +0100)]
ASoC: adau1372: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the adau1382 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-3-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: ad1980: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:51 +0000 (00:13 +0100)]
ASoC: ad1980: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the ad1980 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-2-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: ad1836: Update to use maple tree register cache
Mark Brown [Wed, 12 Jul 2023 23:13:50 +0000 (00:13 +0100)]
ASoC: ad1836: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the ad1836 driver to use the more modern data structure.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-ad-maple-v1-1-7d2f35d42b5f@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: Intel: sof_rt5682: add jsl_rt5650 board config
Brent Lu [Wed, 12 Jul 2023 19:14:23 +0000 (03:14 +0800)]
ASoC: Intel: sof_rt5682: add jsl_rt5650 board config

This configuration supports JSL boards which implement ALC5650 dual
I2S interface codec. Two DAI links are added: AIF1 (on codec side) for
headphone and AIF2 for speakers.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230712191423.443765-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
15 months agoASoC: Another set of platform remove conversions
Mark Brown [Wed, 12 Jul 2023 11:38:07 +0000 (12:38 +0100)]
ASoC: Another set of platform remove conversions

Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:

Two more drivers were added during the current merge window that
are users of the original .remove callback that I plan to get rid of.
Convert them to .remove_new.

15 months agoASoC: rt5677: Refactor GPIO and use
Mark Brown [Wed, 12 Jul 2023 11:37:59 +0000 (12:37 +0100)]
ASoC: rt5677: Refactor GPIO and use

Merge series from Andy Shevchenko <andriy.shevchenko@linux.intel.com>:

The code can be simplified with refactored GPIO parts and with use of
device_get_match_data(). Besides that couple of additional changes,
one for maintenance and one for making IRQ domain agnostic (not being
pinned to OF).

15 months agoRefactor acp legacy driver and add
Mark Brown [Wed, 12 Jul 2023 11:37:52 +0000 (12:37 +0100)]
Refactor acp legacy driver and add

Merge series from Syed Saba Kareem <Syed.SabaKareem@amd.com>:

This patch series to refactor acp leagacy driver and add pm ops
support for rembrandt platforms.

15 months agoAdd acpi mahine id's for vangogh platform and
Mark Brown [Wed, 12 Jul 2023 11:37:45 +0000 (12:37 +0100)]
Add acpi mahine id's for vangogh platform and

Merge series from Venkata Prasad Potturu <venkataprasad.potturu@amd.com>:

This patch series is to add acpi machine id's for vangogh platform
and add new dmi entries and machine driver support for nau8821 and
max98388 codecs.

15 months agoASoC: mt8188: add memory-region support
Mark Brown [Wed, 12 Jul 2023 11:37:38 +0000 (12:37 +0100)]
ASoC: mt8188: add memory-region support

Merge series from Trevor Wu <trevor.wu@mediatek.com>:

This series introduces support for memory-region, allowing afe memif to
utilize the region specified in dts.

15 months agoAMD Vangogh support for NAU8821/MAX98388
Mark Brown [Wed, 12 Jul 2023 11:37:30 +0000 (12:37 +0100)]
AMD Vangogh support for NAU8821/MAX98388

Merge series from Cristian Ciocaltea <cristian.ciocaltea@collabora.com>:

This patch series extends the Vangogh machine driver to support a variant
based on the Nuvoton NAU88L21 Codec and the Analog Devices MAX98388
Speaker Amplifier.

15 months agoASoC: Intel: avs: New boards and fixes to existing
Mark Brown [Wed, 12 Jul 2023 11:37:23 +0000 (12:37 +0100)]
ASoC: Intel: avs: New boards and fixes to existing

Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Series adds support for two boards: es8336 and rt5663. The former is
utilized by some KBL-based tablets whereas the latter unlocks
Chromebooks with rt5663 i2c codecs.

As existing implementation of es8336 (es8316.c) codec driver is not
prepared to cope with KBL-based platforms, couple of small,
clock-related changes precede anything avs-driver related.

The tail of patchset cleans up existing implementation of rt5682.

15 months agoASoC: remove copy of intlog10()
Mark Brown [Wed, 12 Jul 2023 11:37:15 +0000 (12:37 +0100)]
ASoC: remove copy of intlog10()

Merge series from Andy Shevchenko <andriy.shevchenko@linux.intel.com>:

The first three patches moves intlog10() to be available in entire
kernel. The last one removes copy of it in one driver. Besides already
good Lines of Code (LoC) statistics the upcoming users, if any, can
utilize the exported functions.

The series can be routed via ASoC tree (as Mauro suggested).

Note, int_log.h is separated from math.h due to licensing.
I dunno if we can mix two in a single header file. In any
case we may do it later on.

15 months agoAdd support for IIO devices in ASoC
Mark Brown [Wed, 12 Jul 2023 11:37:07 +0000 (12:37 +0100)]
Add support for IIO devices in ASoC

Merge series from Herve Codina <herve.codina@bootlin.com>:

Several weeks ago, I sent a series [1] for adding a potentiometer as an
auxiliary device in ASoC. The feedback was that the potentiometer should
be directly handled in IIO (as other potentiometers) and something more
generic should be present in ASoC in order to have a binding to import
some IIO devices into sound cards.

The series related to the IIO potentiometer device is already applied.

This series introduces audio-iio-aux. Its goal is to offer the binding
between IIO and ASoC.
It exposes attached IIO devices as ASoC auxiliary devices and allows to
control them through mixer controls.

On my system, the IIO device is a potentiometer and it is present in an
amplifier design present in the audio path.

16 months agoASoC: rt5645: add the system level suspend-resume callback
Shuming Fan [Wed, 5 Jul 2023 04:29:31 +0000 (12:29 +0800)]
ASoC: rt5645: add the system level suspend-resume callback

This patch handles the regmap settings and re-detects the jack when the system level
suspend/resume.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20230705042931.24950-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: stac9766: fix build errors with REGMAP_AC97
Randy Dunlap [Sat, 1 Jul 2023 04:48:36 +0000 (21:48 -0700)]
ASoC: stac9766: fix build errors with REGMAP_AC97

Select REGMAP_AC97 to fix these build errors:

ERROR: modpost: "regmap_ac97_default_volatile" [sound/soc/codecs/snd-soc-stac9766.ko] undefined!
ERROR: modpost: "__regmap_init_ac97" [sound/soc/codecs/snd-soc-stac9766.ko] undefined!

Fixes: 6bbf787bb70c ("ASoC: stac9766: Convert to regmap")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20230701044836.18789-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: Convert pm8916-wcd-analog-codec to YAML
Konrad Dybcio [Tue, 27 Jun 2023 16:24:21 +0000 (18:24 +0200)]
ASoC: Convert pm8916-wcd-analog-codec to YAML

Convert the PM8916 analog WCD codec bindings to YAML.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230627-topic-more_bindings-v1-5-6b4b6cd081e5@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: dwc: Add TDM mode support
Maxim Kochetkov [Thu, 22 Jun 2023 20:00:29 +0000 (23:00 +0300)]
ASoC: dwc: Add TDM mode support

Depending on hardware implementaion of DWC I2S controller may support
TDM mode if enabled in SoC at design time.
Unfortunately there is no way to detect TDM capability for DWC by
reading registers. Anyway, if such capability enabled, TDM mode
can be enabled and configured by dai-tdm-slot-* DT options.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Link: https://lore.kernel.org/r/20230622200031.120168-1-fido_max@inbox.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: tas2781: No need to set device_driver owner
Yang Li [Sun, 25 Jun 2023 01:05:47 +0000 (09:05 +0800)]
ASoC: tas2781: No need to set device_driver owner

Remove .owner field if calls are used which set it automatically.

to silence the warning:
./sound/soc/codecs/tas2781-i2c.c:746:3-8: No need to set .owner here.  The core will do it.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5589
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230625010547.7353-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: dt-bindings: nau8821: Convert to dtschema
Seven Lee [Wed, 28 Jun 2023 08:50:09 +0000 (16:50 +0800)]
ASoC: dt-bindings: nau8821: Convert to dtschema

Convert the NAU8821 audio CODEC bindings to DT schema.

Signed-off-by: Seven Lee <wtli@nuvoton.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230628085009.1130318-1-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: rt722-sdca: Remove redundant sdca mask
Jack Yu [Wed, 21 Jun 2023 08:07:50 +0000 (16:07 +0800)]
ASoC: rt722-sdca: Remove redundant sdca mask

Remove redundant sdca mask for clear code.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/20230621080750.13511-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: soc-core: protect dlc->of_node under mutex
Kuninori Morimoto [Thu, 29 Jun 2023 23:52:20 +0000 (23:52 +0000)]
ASoC: soc-core: protect dlc->of_node under mutex

dlc->of_node will be set on snd_soc_get_dlc(), but we want
1) protect it by mutex, 2) set only when successed.
This patch do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878rc1kerv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: imx-pcm-rpmsg: Set PCM hardware parameters separately
Chancel Liu [Sun, 25 Jun 2023 06:54:12 +0000 (14:54 +0800)]
ASoC: imx-pcm-rpmsg: Set PCM hardware parameters separately

Different PCM devices may have different PCM hardware parameters. It
requires PCM hardware parameters set separately if there is more than
one rpmsg sound card.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20230625065412.651870-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: rt5645: implement set_jack callback
Shuming Fan [Wed, 5 Jul 2023 04:23:48 +0000 (12:23 +0800)]
ASoC: rt5645: implement set_jack callback

Add a wrapper function to support set_jack component driver callback.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20230705042349.24905-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: soc-core.c: cleanup soc_dai_link_sanity_check()
Kuninori Morimoto [Wed, 21 Jun 2023 02:18:17 +0000 (02:18 +0000)]
ASoC: soc-core.c: cleanup soc_dai_link_sanity_check()

Required CPU/Codec/Platform dlc (snd_soc_dai_link_component) are similar
but not same, and very complex. Current implementation is very confusable
and it will be more complex if multi Component was supported.
This patch cleanup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o7l9blsn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: soc-core.c: initialize dlc on snd_soc_get_dai_id()
Kuninori Morimoto [Wed, 21 Jun 2023 02:18:10 +0000 (02:18 +0000)]
ASoC: soc-core.c: initialize dlc on snd_soc_get_dai_id()

Current snd_soc_get_dai_id() is initializing dlc *manually*,
but it will might be a problem if dlc had new extra parameter.
This patch uses default initialization, otherwise, non initialized
part will be strange value.
This is prepare for multi Component support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pm5pblst.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: SOF: amd: refactor PSP smn_read
Mastan Katragadda [Fri, 30 Jun 2023 07:05:43 +0000 (12:35 +0530)]
ASoC: SOF: amd: refactor PSP smn_read

Use the read_poll_timeout marco for PSP smn_read calls.

Signed-off-by: Mastan Katragadda <Mastan.Katragadda@amd.com>
Link: https://lore.kernel.org/r/20230630070544.2167421-2-Mastan.Katragadda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: simple-card: Handle additional devices
Herve Codina [Fri, 23 Jun 2023 08:58:30 +0000 (10:58 +0200)]
ASoC: simple-card: Handle additional devices

An additional-devs subnode can be present in the simple-card top node.
This subnode is used to declared some "virtual" additional devices.

Create related devices from this subnode and avoid this subnode presence
to interfere with the already supported subnodes analysis.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20230623085830.749991-14-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: codecs: Add support for the generic IIO auxiliary devices
Herve Codina [Fri, 23 Jun 2023 08:58:29 +0000 (10:58 +0200)]
ASoC: codecs: Add support for the generic IIO auxiliary devices

Industrial I/O devices can be present in the audio path.
These devices needs to be used as audio components in order to be
fully integrated in the audio path.

This support allows to consider these Industrial I/O devices as
auxiliary audio devices and allows one to control them using mixer
controls.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20230623085830.749991-13-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoASoC: soc-dapm.h: Convert macros to return a compound literal
Herve Codina [Fri, 23 Jun 2023 08:58:28 +0000 (10:58 +0200)]
ASoC: soc-dapm.h: Convert macros to return a compound literal

The SND_SOC_DAPM_* helpers family are used to build widgets array in a
static way.

Convert them to return a compound literal in order to use them in both
static and dynamic way.
With this conversion, the different SND_SOC_DAPM_* parameters can be
computed by the code and the widget can be built based on this parameter
computation.
  static int create_widget(char *input_name)
  {
          struct snd_soc_dapm_widget widget;
          char name*;
          ...
          name = input_name;
          if (!name)
                  name = "default";

          widget = SND_SOC_DAPM_INPUT(name);
          ...
  }

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20230623085830.749991-12-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoiio: inkern: Add a helper to query an available minimum raw value
Herve Codina [Fri, 23 Jun 2023 08:58:27 +0000 (10:58 +0200)]
iio: inkern: Add a helper to query an available minimum raw value

A helper, iio_read_max_channel_raw() exists to read the available
maximum raw value of a channel but nothing similar exists to read the
available minimum raw value.

This new helper, iio_read_min_channel_raw(), fills the hole and can be
used for reading the available minimum raw value of a channel.
It is fully based on the existing iio_read_max_channel_raw().

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20230623085830.749991-11-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoiio: inkern: Replace a FIXME comment by a TODO one
Herve Codina [Fri, 23 Jun 2023 08:58:26 +0000 (10:58 +0200)]
iio: inkern: Replace a FIXME comment by a TODO one

This FIXME comment is more a TODO one.
It is a note when someone will need for this currently unsupported case.

Change from FIXME to TODO.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20230623085830.749991-10-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agoiio: inkern: Use max_array() to get the maximum value from an array
Herve Codina [Fri, 23 Jun 2023 08:58:25 +0000 (10:58 +0200)]
iio: inkern: Use max_array() to get the maximum value from an array

Use max_array() to get the maximum value from an array instead of a
custom local loop.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20230623085830.749991-9-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
16 months agominmax: Introduce {min,max}_array()
Herve Codina [Fri, 23 Jun 2023 08:58:24 +0000 (10:58 +0200)]
minmax: Introduce {min,max}_array()

Introduce min_array() (resp max_array()) in order to get the
minimal (resp maximum) of values present in an array.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20230623085830.749991-8-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>