Commit Graph

276369 Commits

Author SHA1 Message Date
Mark Brown 71d171847d mfd: Add WM1811A device ID to wm8994 driver
The WM1811A is a variant of the WM1811 with pin configuration changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:29 +08:00
Mark Brown 443e67ed8d mfd: Correct revision display for WM1811 revision D
As WM1811 revision C was transparent to software the revision IDs for
subsequent revisions are one less than they would normally be. Correct
for this in log messages.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:24 +08:00
Mark Brown 43913e5ef9 mfd: Constify WM8994 regulator_init_data
The driver has no need to modify the regulator_init_data so declare it
const to allow machine code to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:19 +08:00
Mark Brown 346978980a mfd: Initialise WM8994 register cache after reading chip ID registers
The different devices handled by the WM8994 can be distinguished using
their ID registers so we don't need to rely on the user having registered
the device correctly. Instead do the initial regmap setup with a minimal
configuration only supporting physical I/O and then configure the cache
once we have identified the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:13 +08:00
Mark Brown c3f1386171 mfd: Enable register cache for wm8994 devices
As part of this we provide information about the registers that exist in
the device to the regmap core, drop the small amount of cache that the
core had been using and let regmap do the sync.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:05 +08:00
Mark Brown 4412823a0a Merge branch 'topic/cache' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into HEAD 2011-12-13 00:10:45 +08:00
Mark Brown 01ed260f22 mfd: Add wm8994 register access and default information
Describe the register map to the regmap core so that we can use its
diagnostic features and cache support.  This is split out from the patch
using it due to the size so that the actual code change is a bit clearer.

As the various devices are supersets of each other the access maps are
built up by layering the functions on top of each other, though the
interface for specifying the register defaults isn't currently amenable
to this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:10:15 +08:00
Mark Brown 4de45284d3 mfd: Define some additional wm8994 registers
Add a bunch of definitions for wm8994 registers that are not currently
used by software.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:10:06 +08:00
Mark Brown be79cf2fd2 mfd: Don't hard code the reset value for WM8994 devices
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:10:01 +08:00
Mark Brown 26c34c25e5 mfd: Disable more pulls on WM8994
Disable more pulls by default on WM8994 for a small current saving. Since
some designs do leave SPKMODE floating provide platform data to allow that
to be left enabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:09:34 +08:00
Mark Brown 2fa3349467 mfd: Convert wm8994 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:09:29 +08:00
Mark Brown cf763c2e60 mfd: Add basic device tree binding for wm8994
Add a placeholder device tree binding for the wm8994 driver. At present
the binding is essentially null as none of the platform data is supported,
and at least some of that will depend on the pending regulator bindings.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:09:11 +08:00
Mark Brown 583cca6e2b mfd: Remove some unused functions in wm8894-irq
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Oritz <sameo@linux.intel.com>
2011-12-13 00:07:47 +08:00
Axel Lin 0604ca48f1 ASoC: Add missed MODULE_LICENSE("GPL") for imx-pcm-fiq
This driver can be built as module and the file header indicates that
the driver is published under the GPL.
Thus add MODULE_LICENSE("GPL") for it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 18:10:02 +08:00
Mark Brown 3628137646 ASoC: Raise Speyside audio system clock rate to 512fs
To support advanced system functionality for additional components; the
actively used clocks will remain the same for current components. Also
factor the rate out to a single #define while we're at it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 12:59:11 +08:00
Mark Brown 0a105ddb35 Merge branch 'for-3.2' into for-3.3 2011-12-12 12:59:06 +08:00
Axel Lin 497d496598 ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 12:58:42 +08:00
Jonathan Neuschäfer 62e4a13e60 ASoC: WM8958: correctly show firmware magic on mismatch
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 12:44:02 +08:00
Mark Brown 43a9519758 Merge branch 'for-3.2' into for-3.3
Conflicts:
	sound/soc/mxs/mxs-pcm.c
2011-12-11 11:24:44 +08:00
Lothar Waßmann 7c08be84f8 ASoC: Fix an obvious copy paste error in an error message
The message was obviously copied from soc_init_codec_debugfs()

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-11 10:59:49 +08:00
Lothar Waßmann 9fd369b193 ASoC: mxs: Add appropriate MODULE_ALIAS()
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-11 10:59:02 +08:00
Lothar Waßmann 06c8eb9a91 ASoC: mxs: Add missing MODULE_LICENSE("GPL")
The sound driver refuses to load as module, because of the missing
MODULE_LICENSE("GPL").
The file header indicates that the driver is indeed published under
the GPL.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-11 10:58:55 +08:00
Mark Brown f04b8d6ece Merge branch 'for-3.2' into for-3.3 2011-12-11 03:01:33 +08:00
Mark Brown 37d5993c5c ASoC: Fix WM8996 24.576MHz clock operation
Record the clock after the divider as that is what all SYSCLK users see.
Without this the other clock configuration in the device comes out at
half rate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-12-11 03:01:09 +08:00
Mark Brown 3025ae45d6 ASoC: Convert wm8770 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:36:59 +08:00
Axel Lin 7fcadfd176 ASoC: Fix comments for disabling amplifier and PGA
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:28 +08:00
Mark Brown 46ce904f7d ASoC: Convert WM8900 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:18 +08:00
Mark Brown 5a37452421 ASoC: Convert WM8804 to table based control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:17 +08:00
Mark Brown bc9c040d36 ASoC: Make WM8770 SPI usage unconditional
The device only supports SPI.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:16 +08:00
Mark Brown bf97ca9a0d ASoC: Convert WM8776 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:15 +08:00
Stephen Warren 2610ab7767 ASoC: Refactor some conditions and loop in soc_bind_dai_link()
Transform some loops from:

for_each(x) {
    if (f(x)) {
        work_on(x);
    }
}

to new structure:

for_each(x) {
    if (!f(x))
        continue;

    work_on(x);
}

This will allow future modification of f(x) with less impact to the code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 12:45:54 +08:00
Stephen Warren 7b9b5e1170 ASoC: Tegra: Move DAS configuration into DAS driver
Move DAS routing setup into the DAS driver itself. This removes the need
to duplicate this in each machine driver, of which we'll soon have three.

An added advantage is that the machine drivers no longer call the Tegra20-
specific DAS functions by name, so the machine driver no longer needs to
be split up into Tegra20 and Tegra30 versions.

If individual machine drivers need a different routing setup to this
default, they can still call the DAS functions to set that up.

Long-term, DAS will be a codec driver, and user-space will be able to
control its routing, possibly within constraints that the machine driver
sets up. Configuring the DAS routing from the DAS driver is a very slight
move in that direction.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 12:34:07 +08:00
Axel Lin 16b24881a0 ASoC: wm8960: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 11:37:31 +08:00
Mark Brown 4105ab846c ASoC: Rely on core enabling the wm8994 with runtime PM
No need to do this in the driver now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 09:22:48 +08:00
Mark Brown f1aac484f7 ASoC: Take a pm_runtime reference on DAPM devices that are enabled
As for PCMs take a runtime power management reference to devices that are
in a non-off bias, avoiding the need to do this in individual drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 09:22:36 +08:00
Mark Brown beaff340e0 ASoC: Use core pm_runtime callbacks for omap-mcpdm
Now that the core holds a pm_runtime reference to the device while the
link is active there is no need for the driver to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2011-12-08 09:22:04 +08:00
Mark Brown 06d07b6b1c ASoC: Use core pm_runtime callbacks for omap-dmic
Now that the core holds a pm_runtime reference to the device while the
link is active there is no need for the driver to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2011-12-08 09:21:51 +08:00
Mark Brown d6652ef822 ASoC: Hold runtime PM references to components of active DAIs
Every device that implements runtime power management for DAIs is doing
it in pretty much the same way: in the startup callback they take a
runtime PM reference and then in the shutdown callback they release that
reference, keeping the device active while the DAI is active. Given the
frequency with which this is done and the obviousness of the need to keep
the device active in this period factor the code out into the core, taking
references on the device for each CPU DAI, CODEC DAI and DMA device in the
core.

As runtime PM is reference counted this shouldn't interfere with any
other reference holding by the drivers, and since (in common with the
existing implementations) we don't check for errors on enabling it
shouldn't matter if the device actually has runtime PM enabled or not.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2011-12-08 09:21:45 +08:00
Mark Brown bf4df93593 Merge branch 'for-3.2' into for-3.3 2011-12-08 00:15:39 +08:00
Axel Lin 209e8cf668 ASoC: Convert e800_wm9712 to use gpio_request_one()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 00:14:19 +08:00
Axel Lin 8faab941be ASoC: Fix error handling in e800_init to free gpios
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 00:14:19 +08:00
Axel Lin 5ff7ada748 ASoC: Convert e750_wm9705 to use gpio_request_one()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 00:14:19 +08:00
Axel Lin c1496b4ac3 ASoC: Fix a typo in s3c24xx_simtec_tlv320aic23 driver
Fix a typo introduced by commit e00c3f55
"ASoC: Convert Samsung directory to module_platform_driver".

This fixes the build error:
  CC      sound/soc/samsung/s3c24xx_simtec_tlv320aic23.o
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c: In function 'simtec_audio_tlv320aic32_driver_init':
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:105: error: 'simtec_audio_tlv320aic32_driver' undeclared (first use in this function)
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:105: error: (Each undeclared identifier is reported only once
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:105: error: for each function it appears in.)
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c: In function 'simtec_audio_tlv320aic32_driver_exit':
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:105: error: 'simtec_audio_tlv320aic32_driver' undeclared (first use in this function)
make[3]: *** [sound/soc/samsung/s3c24xx_simtec_tlv320aic23.o] Error 1
make[2]: *** [sound/soc/samsung] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

I think we had better naming it with *driver, thus I change
it to simtec_audio_tlv320aic23_driver.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 00:13:18 +08:00
Axel Lin 974edd30be ASoC: Include linux/module.h for smdk2443_wm9710
Include linux/module.h to fix below build error:
  CC      sound/soc/samsung/smdk2443_wm9710.o
sound/soc/samsung/smdk2443_wm9710.c:64: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/smdk2443_wm9710.c:64: warning: data definition has no type or storage class
sound/soc/samsung/smdk2443_wm9710.c:64: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
sound/soc/samsung/smdk2443_wm9710.c:64: warning: function declaration isn't a prototype
sound/soc/samsung/smdk2443_wm9710.c:65: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/smdk2443_wm9710.c:65: warning: data definition has no type or storage class
sound/soc/samsung/smdk2443_wm9710.c:65: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
sound/soc/samsung/smdk2443_wm9710.c:65: warning: function declaration isn't a prototype
sound/soc/samsung/smdk2443_wm9710.c:66: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/smdk2443_wm9710.c:66: warning: data definition has no type or storage class
sound/soc/samsung/smdk2443_wm9710.c:66: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
sound/soc/samsung/smdk2443_wm9710.c:66: warning: function declaration isn't a prototype
make[3]: *** [sound/soc/samsung/smdk2443_wm9710.o] Error 1
make[2]: *** [sound/soc/samsung] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 00:12:12 +08:00
Axel Lin 68264d2a08 ASoC: Fix a typo in jive_wm8750
Fix a typo in jive_wm8750 that introduces below build error.
Also removes an unused err variable.

  CC      sound/soc/samsung/jive_wm8750.o
sound/soc/samsung/jive_wm8750.c: In function 'jive_wm8750_init':
sound/soc/samsung/jive_wm8750.c:104: warning: unused variable 'err'
sound/soc/samsung/jive_wm8750.c: At top level:
sound/soc/samsung/jive_wm8750.c:134: error: unknown field 'dapm_widgtets' specified in initializer
sound/soc/samsung/jive_wm8750.c:134: warning: initialization from incompatible pointer type
make[3]: *** [sound/soc/samsung/jive_wm8750.o] Error 1
make[2]: *** [sound/soc/samsung] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 00:11:20 +08:00
Mark Brown b960ce74a7 ASoC: Convert Samsung I2S driver to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2011-12-07 23:56:50 +08:00
Stephen Warren f18b4e2ee9 ASoC: WM8903: Add of_match_table
This allows the device to be matched against the device tree using the
compatible flag directly, as is standard, rather than falling back to
matching .id_table against the non-vendor portion of the first compatible
property value.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-07 21:51:04 +08:00
Mark Brown 21abbb024f Merge branch 'for-3.2' into for-3.3 2011-12-06 11:01:38 +00:00
Axel Lin f8f626f537 ASoC: Fix build dependency for SND_SOC_JZ4740_CODEC
Currently SND_SOC_JZ4740_CODEC depends on SOC_JZ4740 but SOC_JZ4740 is not
defined in any Kconfig. Thus the codec driver will not be built when select
"Build all ASoC CODEC drivers".
(Unless it is selected by SND_JZ4740_SOC_QI_LB60).
Remove the dependency with SOC_JZ4740, then this code driver can be built when
select "Build all ASoC CODEC drivers".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 11:01:20 +00:00
Axel Lin 68bfcafaae ASoC: Include linux/io.h for jz4740 codec
Include linux/io.h to fix below build errors:

  CC      sound/soc/codecs/jz4740.o
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_read':
sound/soc/codecs/jz4740.c:82: error: implicit declaration of function 'readl'
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_write':
sound/soc/codecs/jz4740.c:92: error: implicit declaration of function 'writel'
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_probe':
sound/soc/codecs/jz4740.c:373: error: implicit declaration of function 'ioremap'
sound/soc/codecs/jz4740.c:373: warning: assignment makes pointer from integer without a cast
sound/soc/codecs/jz4740.c:393: error: implicit declaration of function 'iounmap'
make[3]: *** [sound/soc/codecs/jz4740.o] Error 1
make[2]: *** [sound/soc/codecs] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 11:01:10 +00:00