linux/sound/soc/meson
Kuninori Morimoto cf6e26c71b
ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()
We had read/write function for Codec, Platform, etc,
but these has been merged into snd_soc_component_read/write().

Internally, it is using regmap or driver function.
In read case, each styles are like below

regmap
	ret = regmap_read(..., reg, &val);

driver function
	val = xxx->read(..., reg);

Because of this kind of different style, to keep same read style,
when we merged each read function into snd_soc_component_read(),
we created snd_soc_component_read32(), like below.
commit 738b49efe6 ("ASoC: add snd_soc_component_read32")

(1)	val = snd_soc_component_read32(component, reg);

(2)	ret = snd_soc_component_read(component, reg, &val);

Many drivers are using snd_soc_component_read32(), and
some drivers are using snd_soc_component_read() today.

In generally, we don't check read function successes,
because, we will have many other issues at initial timing
if read function didn't work.

Now we can use soc_component_err() when error case.
This means, it is easy to notice if error occurred.

This patch aggressively merge snd_soc_component_read() and _read32(),
and makes snd_soc_component_read/write() as generally style.

This patch do
	1) merge snd_soc_component_read() and snd_soc_component_read32()
	2) it uses soc_component_err() when error case (easy to notice)
	3) keeps read32 for now by #define
	4) update snd_soc_component_read() for all drivers

Because _read() user drivers are not too many, this patch changes
all user drivers.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/87sgev4mfl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-22 15:13:36 +01:00
..
aiu-acodec-ctrl.c ASoC: meson: aiu: simplify component addition 2020-02-17 18:22:21 +00:00
aiu-codec-ctrl.c ASoC: meson: aiu: simplify component addition 2020-02-17 18:22:21 +00:00
aiu-encoder-i2s.c ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32() 2020-06-22 15:13:36 +01:00
aiu-encoder-spdif.c ASoC: meson: aiu: add i2s and spdif support 2020-02-13 20:57:22 +00:00
aiu-fifo-i2s.c ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32() 2020-06-22 15:13:36 +01:00
aiu-fifo-spdif.c ASoC: meson: aiu: add i2s and spdif support 2020-02-13 20:57:22 +00:00
aiu-fifo.c ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32() 2020-06-22 15:13:36 +01:00
aiu-fifo.h ASoC: meson: aiu: add i2s and spdif support 2020-02-13 20:57:22 +00:00
aiu.c ASoC: meson: aiu: add support for the Meson8 and Meson8b SoC families 2020-02-21 13:30:47 +00:00
aiu.h ASoC: meson: aiu: add support for the Meson8 and Meson8b SoC families 2020-02-21 13:30:47 +00:00
axg-card.c ASoC: meson: axg-card: fix codec-to-codec link setup 2020-04-20 13:58:21 +01:00
axg-fifo.c ASoC: meson: add missing free_irq() in error path 2020-06-09 12:04:57 +01:00
axg-fifo.h ASoC: meson: axg-fifo: relax period size constraints 2019-12-18 20:01:34 +00:00
axg-frddr.c ASoC: meson: axg-fifo: improve depth handling 2019-12-18 20:01:15 +00:00
axg-pdm.c ASoC: meson: axg-pdm: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:07:29 +01:00
axg-spdifin.c ASoC: meson: axg-spdifin: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:07:48 +01:00
axg-spdifout.c ASoC: meson: axg-spdifout: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:08:07 +01:00
axg-tdm-formatter.c Merge branch 'asoc-5.3' into asoc-5.4 2019-08-20 18:28:43 +01:00
axg-tdm-formatter.h ASoC: meson: axg-tdm-formatter: rework quirks settings 2019-04-05 09:26:39 +07:00
axg-tdm-interface.c ASoC: meson: use snd_soc_xxx_active() 2020-05-18 16:15:11 +01:00
axg-tdm.h ASoC: meson: axg-tdm: fix sample clock inversion 2019-06-13 19:44:02 +01:00
axg-tdmin.c ASoC: meson: tdmin: expose all 16 inputs 2019-09-05 18:17:13 +01:00
axg-tdmout.c ASoC: meson: tdmout: add sm1 support 2019-09-05 18:18:07 +01:00
axg-toddr.c ASoC: meson: axg-fifo: fix fifo threshold setup 2019-12-18 20:00:24 +00:00
g12a-toacodec.c ASoC: meson: g12a: add internal DAC glue driver 2020-02-21 16:39:04 +00:00
g12a-tohdmitx.c Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7 2020-02-24 22:26:06 +00:00
gx-card.c ASoC: meson: gx-card: fix codec-to-codec link setup 2020-04-20 13:58:22 +01:00
Kconfig ASoC: meson: imply acodec glue on axg sound card 2020-06-17 17:34:59 +01:00
Makefile ASoC: meson: g12a: add internal DAC glue driver 2020-02-21 16:39:04 +00:00
meson-card-utils.c ASoC: meson: fix memory leak of links if allocation of ldata fails 2020-06-05 12:13:03 +01:00
meson-card.h ASoC: meson: axg: extract sound card utils 2020-02-13 20:57:25 +00:00
meson-codec-glue.c ASoC: meson: codec-glue: fix pcm format cast warning 2020-02-14 20:51:17 +00:00
meson-codec-glue.h ASoC: meson: g12a: extract codec-to-codec utils 2020-02-13 20:57:20 +00:00
t9015.c ASoC: meson: add t9015 internal DAC driver 2020-02-19 20:20:07 +00:00