aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/cs42l56.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-08-15ASoC: cs42l56: remove unused variable 'adc_swap_enum'YueHaibing1-8/+0
sound/soc/codecs/cs42l56.c:206:30: warning: adc_swap_enum defined but not used [-Wunused-const-variable=] It is never used, so can be removed. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190815092436.34632-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-5/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-12ASoC: cs42l56: replace codec to componentKuninori Morimoto1-80/+78
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>
2017-11-27ASoC: cs42l56: Improve two size determinations in cs42l56_i2c_probe()Markus Elfring1-5/+2
Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-27ASoC: cs42l56: Delete an error message for a failed memory allocation in cs42l56_i2c_probe()Markus Elfring1-4/+2
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-05ASoC: cs42l56: Fix misuse of regmap_update_bitsFlorian Vaussard1-4/+8
Using regmap_update_bits(..., mask, 1) with 'mask' following (1 << k) and k greater than 0 is wrong. Indeed, _regmap_update_bits will perform (mask & 1), which results in 0 if LSB of mask is 0. Thus the call regmap_update_bits(..., mask, 1) is in reality equivalent to regmap_update_bits(..., mask, 0). In such a case, the correct use is regmap_update_bits(..., mask, mask). This driver is performing such a mistake with the CS42L56_AIN*_REF_MASK masks, which equal 0x10, 0x20, 0x40 and 0x80. Fix the driver to make it consistent with the API. Please note that this change is untested, as I do not have this piece of hardware. Testers are welcome! Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-25ASoC: cs42l56: Make ID registers volatile and remove cache bypassCharles Keepax1-6/+0
Rather than manually enabling cache bypass when reading the ID registers simply remove the default which will cause the first read to go to the hardware. The old code worked this is simply the more standard way to implement this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: codec duplicated callback function goes to component on cs42l56Kuninori Morimoto1-7/+8
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-04-26ASoC: cs42l56: Use IS_ENABLED() instead of checking for built-in or moduleJavier Martinez Canillas1-1/+1
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-30Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-nextMark Brown1-12/+9
2015-08-30Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42l73', 'asoc/topic/cs4349' and 'asoc/topic/da732x' into asoc-nextMark Brown1-46/+1
2015-08-30Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', 'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-nextMark Brown1-1/+1
2015-08-14ASoC: cs42l56: Use case range at appropriate placeAxel Lin1-46/+1
The readable registers are in continuous range: 0x01 ~ 0x2e. Use case range syntax makes the code shorter with better readability when we have a large number of continuous switch cases. No functional change with this patch. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen1-12/+9
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error. Generate using the following coccinelle script // <smpl> @@ declarer name DECLARE_TLV_DB_RANGE; identifier tlv; constant x; @@ -unsigned int tlv[] = { - TLV_DB_RANGE_HEAD(x), +DECLARE_TLV_DB_RANGE(tlv, ... -}; +); // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15ASoC: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15ASoC: Constify snd_soc_dai_ops variablesAxel Lin1-1/+1
The snd_soc_dai_ops variables are not modified after initialization in these drivers, so make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01ASoC: cs42l56: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen1-2/+2
The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27ASoC: Move bias level update to the coreLars-Peter Clausen1-1/+0
All drivers have the same line at the end of the set_bias_level callback to update the bias_level state. Move this update into snd_soc_dapm_force_bias_level() and remove them from the drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-05ASoC: cs42l56: Constify struct regmap_config and snd_soc_codec_driverKrzysztof Kozlowski1-2/+2
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Make struct snd_soc_codec_driver const as well (snd_soc_register_codec() accepts pointer to const). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-09ASoC: cs42l56: Cleanup manual bias level transitionsLars-Peter Clausen1-19/+1
Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either. The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28ASoC: cs42l56: Remove unneeded regulator_bulk_free call in cs42l56_removeAxel Lin1-3/+0
The regulator_bulk_free() call is not required because current code is using devm_regulator_bulk_get(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28ASoC: cs42l56: use true/false returns for bool functionsBrian Austin1-2/+2
Return true or false instead of 1 and 0 Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-04Merge remote-tracking branches 'asoc/topic/cs4265', 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8', 'asoc/topic/cx20442' and 'asoc/topic/davinci' into asoc-nextMark Brown1-19/+45
2014-07-17ASoC: Fix SOC_DOUBLE_R_SX_TLV volume mixer argumentsBrian Austin1-6/+6
Remove unnecessary bit shifts. Correct min value to match datasheet. Num steps = number of steps between min and max. Reported-by: Ryan Harvey <ryan.harvey@cirrus.com> Signed-off-by: Ryan Harvey <ryan.harvey@cirrus.com> Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-17ASoC: cs42l56: Fix stereo channel register assignment for Headphone and LineOut volume mixersBrian Austin1-2/+2
Stereo Headphone and LineOut volume mixers are now attached to HPA+HPB, LOA+LOB. Reported-by: Ryan Harvey <ryan.harvey@cirrus.com> Signed-off-by: Ryan Harvey <ryan.harvey@cirrus.com> Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-08ASoC: cs42l56: Move ADC/PCM Swap to DAPMBrian Austin1-19/+45
The Swap controls for ADC/PCM paths should be in the DAPM domain. Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01ASoC: cs42l56: Fix new value argument in snd_soc_update_bits callsAxel Lin1-39/+31
The new value argument needs proper shift to match the mask bit fields. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05ASoC: Add support for CS42L56 CODECBrian Austin1-0/+1427
This patch adds support for the Cirrus Logic Low Power Stereo I2C CODEC Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>