summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/p1022_ds.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: twl6040, fsl: use to_platform_deviceGeliang Tang2015-12-241-2/+1
| | | | | | | Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* powerpc/fsl: Move fsl_guts.h out of arch/powerpcScott Wood2015-10-211-1/+1
| | | | | | Freescale's Layerscape ARM chips use the same structure. Signed-off-by: Scott Wood <scottwood@freescale.com>
* ASoC: fsl: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* drivers: clean-up prom.h implicit includesRob Herring2013-10-091-0/+1
| | | | | | | | Powerpc is a mess of implicit includes by prom.h. Add the necessary explicit includes to drivers in preparation of prom.h cleanup. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Grant Likely <grant.likely@linaro.org>
* ASoC: fsl: remove __dev* attributesBill Pemberton2012-12-101-2/+2
| | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: fsl: use snd_soc_register_card to register the cardTimur Tabi2012-09-181-25/+6
| | | | | | | | | | | | | Use snd_soc_register_card() instead of platform_device_alloc("soc-audio") to register the sound card from the machine drivers. The use of platform_device_alloc is deprecated. Although several other drivers still use platform_device_alloc(), the Freescale drivers were not using it to pass driver data. Instead of fixing the driver data usage, it's better to replace the deprecated code. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'v3.4-rc2' into for-3.5Mark Brown2012-04-091-5/+5
|\ | | | | | | | | Linux 3.4-rc2 contains some bug fixes we need, including the addition of an export for regcache_sync_region().
| * powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.hTimur Tabi2012-03-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the check for CONFIG_PPC_85xx and CONFIG_PPC_86xx from fsl_guts.h. The check was originally intended to allow the same header file to be used on 85xx and 86xx systems, even though the Global Utilities register could be different. It turns out that they're not actually different, and so the check is not necessary. In addition, neither macro is defined for 64-bit e5500 kernels, so that causes a build break. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | ASoC: fsl: remove helper fsl_asoc_get_codec_dev_nameShawn Guo2012-04-011-11/+2
| | | | | | | | | | | | | | | | | | | | The ASoC core now can support matching codec with device node besides name, so we can save helper function fsl_asoc_get_codec_dev_name. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: fsl: create fsl_utils to accommodate the common functionsShawn Guo2012-04-011-140/+9
|/ | | | | | | | | | | | There is some amount of code duplication between mpc8610_hpcd and p1022_ds machine drivers, and the same code will be duplicated again when another new machine driver is added. The patch creates fsl_utils to accommodate the common functions to stop the code duplication. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: fsl: p1022ds: tell the WM8776 codec driver that it's the masterTimur Tabi2012-03-171-8/+16
| | | | | | | | | | | | | | | | | The WM8776 codec driver requires the machine driver to set one of the SND_SOC_DAIFMT_CBx_xxx values. The P1022DS machine driver should be setting SND_SOC_DAIFMT_CBM_CFM, but since that value was zero, no one noticed. Commit 75d9ac46 ("ASoC: Allow DAI formats to be specified in the dai_link"), however, changed the value of SND_SOC_DAIFMT_CBM_CFM from zero to a non-zero value, which means that it now needs to be specifically set by the machine driver. We also set SND_SOC_DAIFMT_NB_NF, for the same reason. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* ASoC: fsl: check property 'compatible' for the machine nameShawn Guo2012-03-091-27/+5
| | | | | | | | | | | Check /compatible rather than /model to determine the machine name. The p1022ds older device trees get a different /model from the new ones, while /compatible is consistent there, so checking /compatible will save the bother of detecting older p1022ds device trees. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: fsl: correct get_dma_channel parameter nameShawn Guo2012-02-281-2/+2
| | | | | | | | | The second parameter of function get_dma_channel is actually a property name rather than a compatible string, so rename it for less confusing. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: fsl/powerpc: don't rely on the cell-index propertyTimur Tabi2011-12-021-5/+8
| | | | | | | | | | | | | | Instead of using the 'cell-index' property in the I2C adapter node to determine the adapter number, just query the i2c_adapter object directly. Previously, the I2C nodes always appeared in cell-index order, so the dynamic numbering coincided with the cell-index property. With commit ab827d97 ("powerpc/85xx: Rework P1022DS device tree"), the I2C nodes are unintentionally reversed in the device tree, and so the machine driver guesses the wrong I2C adapter number. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: p1022ds: add support for fsl,P1022 and fsl,P1022DS model namesTimur Tabi2011-12-021-8/+28
| | | | | | | | | | | Commit ab827d97 ("powerpc/85xx: Rework P1022DS device tree") renamed the the /model property of the P1022DS device tree from "fsl,P1022" to "fsl,P1022DS". To support both old and new device trees, the ASoC machine driver for the P1022DS needs to query the /model property and update the platform driver object dynamically. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: fsl: Fix error handling if platform_device_add failsAxel Lin2011-09-201-1/+1
| | | | | | | | | Call platform_device_put() instead of platform_device_unregister() if platform_device_add() fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove redundant -codec from WM8776 driver nameMark Brown2011-08-311-1/+1
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Timur Tabi <timur@freescale.com>
* sound/soc/fsl/p1022_ds.c: add missing of_node_putJulia Lawall2011-08-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dma_channel_np has been accessed at this point, so decrease its reference count before leaving the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (...) { ... when != of_node_put(x) when != x = E3 when != E3 = x * return ...; } ... when != x = E2 when != I(...,x,...) S if (...) { ... when != x = E4 of_node_put(x); ... return ...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: p1022ds: fix incorrect referencing of device tree propertiesTimur Tabi2011-06-091-5/+5
| | | | | | | | | | | | Device tree integer properties are encoded in big-endian format, but some of the Freescale ASoC drivers were assuming that the host is in big-endian format as well. Although this is true, it's better to use endian-safe accessors. Also add a check for a failed ioremap() call in the SSI driver. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Replace pdev with card in machine driver probe and removeMark Brown2011-01-271-4/+2
| | | | | | | | In order to support cards instantiated without using soc-audio remove the use of the platform device in the card probe() and remove() ops. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
* ASoC: Add missing dev_set_drvdata in p1022_ds_probeAxel Lin2010-11-291-0/+1
| | | | | | | | | Otherwise, calling dev_get_drvdata in p1022_ds_remove returns NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: pl022_ds.c: Add of_node_put to avoid memory leakJulia Lawall2010-09-021-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a call to of_node_put in the error handling code following a call to of_parse_phandle. This patch also moves the existing call to of_node_put tothe end of the error handling code, to make it possible to jump to of_node_put without doing the other cleanup operations. These appear to be disjoint operations, so the ordering doesn't matter. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression x; expression E,E1,E2; statement S; @@ *x = (of_find_node_by_path |of_find_node_by_name |of_find_node_by_phandle |of_get_parent |of_get_next_parent |of_get_next_child |of_find_compatible_node |of_match_node |of_find_node_by_type |of_find_node_with_property |of_find_matching_node |of_parse_phandle )(...); ... if (x == NULL) S <... when != x = E *if (...) { ... when != of_node_put(x) when != if (...) { ... of_node_put(x); ... } ( return <+...x...+>; | * return ...; ) } ...> ( E2 = x; | of_node_put(x); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@slimlogic.uo.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: add support for the Freescale P1022 DS reference boardTimur Tabi2010-08-201-0/+590
The Freescale P1022 is a dual-core e500-based SOC with multimedia capabilities, specifically the same SSI audio controller on the MPC8610. The P1022 DS reference board includes a P1022 and a Wolfson Microelectronics WM8776 codec. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud