Uwe Kleine-König
ed5c2f5fd1
i2c: Make remove callback return void
...
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)
So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com >
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au >
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Crt Mori <cmo@melexis.com >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Acked-by: Marek Behún <kabel@kernel.org > # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Petr Machata <petrm@nvidia.com > # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com > # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com > # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl > # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org > # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com > # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com > # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com > # for iio
Acked-by: Peter Rosin <peda@axentia.se > # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com > # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de > # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com > # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com >
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com >
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com > # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Signed-off-by: Wolfram Sang <wsa@kernel.org >
2022-08-16 12:46:26 +02:00
Charles Keepax
d2d3219ebe
ASoC: max*: 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-53-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-06-27 13:17:02 +01:00
Mark Brown
8366d8ca0f
ASoC: max9860: Use modern ASoC DAI format terminology
...
As part of moving to remove the old style defines for the bus clocks update
the max9860 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org >
Acked-by: Peter Rosin <peda@axentia.se >
Link: https://lore.kernel.org/r/20220602125812.3551947-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-06-06 12:38:52 +01:00
Mark Brown
d14c87d8ef
ASoC: max9860: Use modern ASoC DAI format terminology
...
As part of moving to remove the old style defines for the bus clocks update
the max9860 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org >
Link: https://lore.kernel.org/r/20220222234026.712070-6-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-02-28 13:34:10 +00:00
Kuninori Morimoto
edfe9f451a
ASoC: codecs: max9860: Use dev_err_probe() helper
...
Use the dev_err_probe() helper, instead of open-coding the same
operation.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/20211214020843.2225831-5-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-12-20 12:47:05 +00:00
Kuninori Morimoto
cb40d1b458
ASoC: max*: 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/8735z2olg5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-01-21 12:38:03 +00:00
Gustavo A. R. Silva
3e146b55a4
ASoC: codecs: Use fallthrough pseudo-keyword
...
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Link: https://lore.kernel.org/r/20200709010359.GA18971@embeddedor
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-07-09 22:20:31 +01:00
Guennadi Liakhovetski
0bb423f2ea
ASoC: regulator notifier registration should be managed
...
Regulator notifiers, that were registered during codec driver probing,
must be unregistered during driver release, or device managed versions
have to be used. This patch fixes codec drivers, that weren't explicitly
unregistering notifiers and simplifies those, that did that manually.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Mark Brown <broonie@kernel.org >
2019-02-08 16:18:49 +00:00
Peter Rosin
a93532dbdc
ASoC: max9860: switch to SPDX license tag
...
It's less overhead, clearer and generally neater.
Signed-off-by: Peter Rosin <peda@axentia.se >
Signed-off-by: Mark Brown <broonie@kernel.org >
2018-04-16 12:37:36 +01:00
Peter Rosin
d0ca5a479a
ASoC: max9860: fix whitespace issues caused by mindless conversion
...
Long lines and bad alignment disturbs the reading pleasure.
Signed-off-by: Peter Rosin <peda@axentia.se >
Signed-off-by: Mark Brown <broonie@kernel.org >
2018-04-16 11:53:48 +01:00
Peter Rosin
0ae91ec43c
ASoC: max9860: switch to using .probe_new
...
Use the new probe style for i2c drivers.
Signed-off-by: Peter Rosin <peda@axentia.se >
Signed-off-by: Mark Brown <broonie@kernel.org >
2018-04-16 11:53:37 +01:00
Kuninori Morimoto
fbf60d9727
ASoC: max9860: 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 = 1 -> .idle_bias_on = 0
.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:49:02 +00:00
Bhumika Goyal
a180ba45b1
ASoC: codecs: add const to snd_soc_codec_driver structures
...
Declare snd_soc_codec_driver structures as const as they are only passed
as an argument to the function snd_soc_register_codec. This argument is
of type const, so declare the structures with this property as const.
In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in
a copy operation along with getting passed to snd_soc_register_codec.
So, it can be made const too.
Done using Coccinelle:
@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_soc_codec_driver s@p={...};
@good1@
identifier match.s;
position p;
@@
snd_soc_register_codec(...,&s@p,...)
@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p
@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_soc_codec_driver s={...};
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com >
Signed-off-by: Mark Brown <broonie@kernel.org >
2017-08-10 16:10:50 +01:00
Kuninori Morimoto
750a33e617
ASoC: codec duplicated callback function goes to component on max9860
...
codec driver and component driver has duplicated callback functions,
and codec side functions are just copied to component side when
register timing. This was quick-hack, but no longer needed.
This patch moves these functions from codec driver to component driver.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Signed-off-by: Mark Brown <broonie@kernel.org >
2016-08-08 11:57:57 +01:00
Wei Yongjun
716540fdd3
ASoC: max9860: fix non static symbol warnings
...
Fixes the following sparse warnings:
sound/soc/codecs/max9860.c:120:28: warning:
symbol 'max9860_regmap' was not declared. Should it be static?
sound/soc/codecs/max9860.c:596:25: warning:
symbol 'max9860_pm_ops' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn >
Signed-off-by: Mark Brown <broonie@kernel.org >
2016-06-18 14:09:00 +01:00
Peter Rosin
3b2af7f799
ASoC: max9860: new driver
...
This is a driver for the MAX9860 Mono Audio Voice Codec.
https://datasheets.maximintegrated.com/en/ds/MAX9860.pdf
This driver does not support sidetone since the DVST register field is
backwards with the mute near the maximum level instead of the minimum.
Signed-off-by: Peter Rosin <peda@axentia.se >
Signed-off-by: Mark Brown <broonie@kernel.org >
2016-05-30 16:15:55 +01:00