summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs35l32.c
AgeCommit message (Collapse)AuthorFilesLines
2015-08-30Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', ↵Mark Brown1-1/+1
'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next
2015-08-30Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', ↵Mark Brown1-48/+9
'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next
2015-08-14ASoC: cs35l32: Use case range at appropriate placesAxel Lin1-40/+5
Use case range syntax makes the code shorter with better readability when we have a large number of continuous switch cases. Below are the summary of readable/volatile/precious registers. The readable registers: 0x01 ~ 0x0D, 0x0F ~ 0x1C The volatile registers: 0x01 ~ 0x05, 0x15 ~ 0x18 The precious registers: 0x15 ~ 0x18 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-07-23ASoC: cs35l32: Remove unneeded NULL test for cs35l32->reset_gpioAxel Lin1-8/+4
It's safe to call gpiod_set_value_cansleep() with NULL desc. 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-07-17regmap: Use reg_sequence for multi_reg_write / register_patchNariman Poushin1-1/+1
Separate the functionality using sequences of register writes from the functions that take register defaults. This change renames the arguments in order to support the extension of reg_sequence to take an optional delay to be applied after any given register in a sequence is written. This avoids adding an int to all register defaults, which could substantially increase memory usage for regmaps with large default tables. This also updates all the clients of multi_reg_write/register_patch. Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.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-04-27ASoC: cs35l32: Remove unused including <linux/version.h>Wei Yongjun1-1/+0
Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24ASoC: improve usage of gpiod APIUwe Kleine-König1-13/+6
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Simplify drivers accordingly. Also there is an *_optional variant that serves well here. The sematics is slightly changed here by using it as error checking is more strict now: If GPIOLIB is not enabled an error is returned instead of just ignoring the gpio. On one hand this is bad for devices that don't "have" the respective gpio as the driver is failing now. On the other hand there is no means to assert that this gpio is really not needed or if only the driver to control it is not available. The latter is a real reason to fail and so it's defensive to fail here, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-06ASoC: cs35l32: 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-12-13sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki1-1/+1
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under sound/. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Mark Brown <broonie@kernel.org>
2014-09-17ASoC: cs35l32: remove second linux/slab.h inclusionFabian Frederick1-1/+0
linux/slab.h was included twice. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-28ASoC: cs35l32: Simplify implementation of cs35l32_codec_set_sysclkAxel Lin1-21/+7
Use single snd_soc_update_bits() call to update the register bits. 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-08-28ASoC: cs35l32: Remove unneeded regulator_bulk_free call in cs35l32_i2c_removeAxel Lin1-2/+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: cs35l32: use true/false returns for bool functionsBrian Austin1-4/+4
Return true or false instead of 1 and 0 Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17ASoC: cs35l32: fix compile warning for i2c_probeBrian Austin1-0/+1
Forgot to add a return for err_disable goto statement. Causes compile warning of control reaching end of non-void Signed-off-by: Brian Austin <briann.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17ASoC: cs35l32: Add support for CS35L32 Boosted AmplifierBrian Austin1-0/+647
This patch adds support for the Cirrus Logic CS35L32 Boosted Amplifier I2S output provides monitor data to the SOC/CODEC/DSP for speaker protection/enhancement algorithms Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>