summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-io.c
AgeCommit message (Collapse)Author
2012-06-23ASoC: io: Don't dereference regmap if we failed to get oneMark Brown
Avoids a crash in invalid configurations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2012-06-03ASoC: io: Use dev_get_regmap() if driver doesn't provide a regmapMark Brown
Less error prone and one less line of code in drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-21ASoC: io: Retrieve val_bytes from the regmap APIMark Brown
Allow us to build infrastructure which needs to know the size of a value without requiring regmap based drivers to supply this information to both ASoC and regmap by asking regmap for the value. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-21ASoC: Use regmap update bits operation for drivers using regmapMark Brown
If a driver is using regmap directly ensure that we're coherent with non-ASoC register updates by using the regmap API directly to do our read/modify/write cycles. This will bypass the ASoC cache but drivers using regmap directly should not be using the ASoC cache. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where neededPaul Gortmaker
These aren't modules, but they do make use of these macros, so they will need export.h to get that definition. Previously, they got it via the implicit module.h inclusion. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-09ASoC: Squash error codes from regmap down to -1 on readMark Brown
The ASoC code always uses -1 as the error code due to reporting errors in band with the value. Ensure we don't confuse anything by making sure we don't pass actual error codes back into the rest of the code on read. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-14ASoC: Support !CONFIG_REGMAP buildsMark Brown
Since we changed regmap to be selected and register per bus rather than via the core only we can't rely on it being enabled by the ASoC core. Support compiling it out. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reported-by: Axel Lin <axel.lin@gmail.com>
2011-08-12ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modulesStephen Warren
When CONFIG_REGMAP_I2C/SPI are m, CONFIG_REGMAP_I2C_MODULE is set in the pre-processor instead of CONFIG_REGMAP_I2C. This removes SND_SOC_I2C as a valid option for snd_soc_codec_set_cache_io()'s control parameter, and causes any ASoC regmap-using codec built as a module to fail to initialize. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-11ASoC: soc-io: Add CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI guards for ↵Axel Lin
regmap_init_i2c/regmap_init_spi In the case of "make da8xx_omapl_defconfig;make", the SPI support is disabled. Thus calling regmap_init_spi in soc-io.c has below build error. ERROR: "regmap_init_spi" [sound/soc/snd-soc-core.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 This patch fixes the build error by adding CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI guards for regmap_init_i2c/regmap_init_spi. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-08ASoC: Add regmap as a control typeMark Brown
Allow drivers to set up their own regmap API structures. This is mainly useful with MFDs where the core driver will have set up regmap at the minute, though it may make sense to push the existing regmap setup out of the core into the drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-08ASoC: Use new register map API for ASoC generic physical I/OMark Brown
Remove all the ASoC specific physical I/O code and replace it with calls into the regmap API. The bulk write code can only be used safely if all regmap calls are locked with the CODEC lock, we need to add bulk support to the regmap API or replace the code with an open coded loop (though currently it has no users...). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-13Merge branch 'for-3.0' into for-3.1Mark Brown
Trival fixup for move of I/O code into separate file. Conflicts: sound/soc/soc-cache.c
2011-06-13ASoC: Don't use codec->control_data in bulk writeMark Brown
In order to facilitate merging with the register map I/O replace the use of control_data for the bulk writes with direct lookup of the client data from the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-13ASoC: Move register I/O code into a separate fileMark Brown
For clarity and to help ongoing refactoring in this area create a new file to contain the physical I/O functions, separating them out from the cache operations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>