Commit Graph

21 Commits

Author SHA1 Message Date
Uwe Kleine-König 9abcd24002
ASoC: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de
Link: https://lore.kernel.org/r/20230425095716.331419-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-08 08:48:49 +09:00
Charles Keepax c06fb31849
ASoC: tscs42xx: Remove now redundant non_legacy_dai_naming flag
The ASoC core has now been changed to default to the non-legacy DAI
naming, as such drivers using the new scheme no longer need to specify
the non_legacy_dai_naming flag.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623125250.2355471-94-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-27 13:17:40 +01:00
Stephen Kitt f950ef9180
ASoC: tscs*: use simple i2c probe function
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220405163400.2156631-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-06 23:37:54 +01:00
Mark Brown 7cba0b38c3
ASoC: tscs42xx: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the tscs42xx driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223002751.1574345-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-02-28 13:33:33 +00:00
Kuninori Morimoto 9b4488efde
ASoC: tscs*: sync parameter naming (rate/sample_bits)
This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zh1an6vh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-21 12:38:05 +00:00
Tom Rix 32c5dca18b
ASoC: TSCS42xx: remove unneeded semicolon
A semicolon is not needed after a switch statement.

Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20201101160312.2296146-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-03 13:19:07 +00:00
Kuninori Morimoto 981abdfe99
ASoC: codecs: rename to snd_soc_component_read()
We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mu534me5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-22 15:13:40 +01:00
Pierre-Louis Bossart f361ca3680
ASoC: tscs42xx.c: fix boolean test
Reported by Coccinelle:
sound/soc/codecs/tscs42xx.c:392:5-31: WARNING: Comparison to bool

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-07 16:53:10 +00:00
Steven Eckhoff 53af408cd9
ASoC: TSCS42xx: Add headphone auto switching
Add headphone auto switching controls

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-18 12:54:38 +01:00
Steven Eckhoff 19d996cc3a
ASoC: TSCS42xx: Remove Playback/Capture in names
These aren't needed and some userspace apps don't work consistently with
them.

Remove Playback/Capture from control names

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-18 12:54:38 +01:00
Steven Eckhoff 58f7d470c8
ASoC: TSCS42xx: Add mic bias boost control
Add mic bias boost control

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-18 12:54:38 +01:00
Steven Eckhoff aa0f18d762
ASoC: TSCS42xx: Add CCF support to get sysclk
The TSCS42xx relies on set_sysclk to get a unique clock id and rate,
which prevents it from being used with the simple-card.

Remove set_sysclk callback
Add CCF support to get clock id and rate
Add clocks and clock-names to device tree binding

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-16 11:53:47 +01:00
Steven Eckhoff 7ab5ba47e8
ASoC: TSCS42xx: Cleanup private data members
Remove blrcm from private data
Remove dev from private data

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-16 11:53:46 +01:00
Steven Eckhoff 4c4825aed6
ASoC: TSCS42xx: Shorten lines and other cleanup
Shorten lines greater than 80 chars
Add const to struct snd_soc_component_driver

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-16 11:53:45 +01:00
Fabio Estevam c3fd6a1d1a
ASoC: tscs42xx: Remove owner assignment from i2c_driver
Structure i2c_driver does not need to set the owner field, as this will
be populated by the driver core.

Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28 10:15:56 +08:00
Steven Eckhoff 641eea3f8b
ASoC: TSCS42xx: Add missing headers
Add missing headers

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-09 13:00:38 +00:00
Colin Ian King 390f7bbdd7
ASoC: TSCS42xx: make const array norm_addrs static, reduces object code size
Don't populate the const array norm_addrs on the stack, instead make it
static.  Makes the object code smaller by over 230 bytes.  Also re-format
array data as the insertion of the static keywork made the first line
overly long.

Before:
   text	   data	    bss	    dec	    hex	filename
  53780	  34752	    256	  88788	  15ad4	linux/sound/soc/codecs/tscs42xx.o

After:
   text	   data	    bss	    dec	    hex	filename
  53461	  34840	    256	  88557	  159ed	linux/sound/soc/codecs/tscs42xx.o

(gcc version 7.2.0 x86_64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-15 15:17:19 +00:00
Kuninori Morimoto 4e46c228c7
ASoC: tscs42xx: replace codec to component
Now we can replace Codec to Component. Let's do it.

Note:
	xxx_codec_xxx()		->	xxx_component_xxx()
	.idle_bias_off = 0	->	.idle_bias_on = 1
	.ignore_pmdown_time = 0	->	.use_pmdown_time = 1
	-			->	.endianness = 1
	-			->	.non_legacy_dai_naming = 1

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12 09:52:57 +00:00
Colin Ian King 3511108a79
ASoC: TSCS42xx: make functions pll_event and dac_event static
The functions pll_event and dac_event are local to the source and do
not need to be in global scope, so make them static.

Cleans up sparse warnings:
symbol 'pll_event' was not declared. Should it be static?
symbol 'dac_event' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-09 17:02:42 +00:00
Steven Eckhoff 599522ea10
ASoC: TSCS42xx: Fix control names
The tscs42xx CODEC driver can confuse userspace with non-standard
control names.

Remove "Switch" from enum control type names.
Add "Switch" to on/off control type names.

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-09 17:02:22 +00:00
Steven Eckhoff ba6c295925
ASoC: TSCS42xx: Add support for Tempo Semiconductor's TSCS42xx audio CODEC
Currently there is no support for TSCS42xx audio CODECs.

Add support for TSCS42xx audio CODECs.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-05 12:37:41 +00:00