summaryrefslogtreecommitdiff
path: root/target/linux/omap/patches-3.12/415-ASoC-davinci-mcasp-Remove-redundant-num-serializer-D.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2013-11-15 12:23:17 +0000
committerImre Kaloz <kaloz@openwrt.org>2013-11-15 12:23:17 +0000
commite4eef7e6207078a4987b0e02d2ad4068083cf921 (patch)
treeae97c3d14f8a010428d78dfc27dde471ad897232 /target/linux/omap/patches-3.12/415-ASoC-davinci-mcasp-Remove-redundant-num-serializer-D.patch
parent1f3478901593dd3bb4f32b2cdcb4c4cfecdbea5a (diff)
downloadmtk-20170518-e4eef7e6207078a4987b0e02d2ad4068083cf921.zip
mtk-20170518-e4eef7e6207078a4987b0e02d2ad4068083cf921.tar.gz
mtk-20170518-e4eef7e6207078a4987b0e02d2ad4068083cf921.tar.bz2
replace the TI patch with a smaller patchset
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 38816
Diffstat (limited to 'target/linux/omap/patches-3.12/415-ASoC-davinci-mcasp-Remove-redundant-num-serializer-D.patch')
-rw-r--r--target/linux/omap/patches-3.12/415-ASoC-davinci-mcasp-Remove-redundant-num-serializer-D.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/target/linux/omap/patches-3.12/415-ASoC-davinci-mcasp-Remove-redundant-num-serializer-D.patch b/target/linux/omap/patches-3.12/415-ASoC-davinci-mcasp-Remove-redundant-num-serializer-D.patch
new file mode 100644
index 0000000..e377cb2
--- /dev/null
+++ b/target/linux/omap/patches-3.12/415-ASoC-davinci-mcasp-Remove-redundant-num-serializer-D.patch
@@ -0,0 +1,97 @@
+From fdb8d3521ecae71865df66a84a1cbe13f7daa6f5 Mon Sep 17 00:00:00 2001
+From: Peter Ujfalusi <peter.ujfalusi@ti.com>
+Date: Mon, 23 Sep 2013 11:25:02 +0300
+Subject: [PATCH 226/752] ASoC: davinci: mcasp: Remove redundant
+ num-serializer DT parameter
+
+The serial-dir array gives this information so there is no need to have the
+num-serializer property in DT description.
+Just ignore the property in the driver the DTS files can be updated
+separately without regression.
+Update the documentation at the same time for davinci-mcasp
+
+Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
+---
+ .../bindings/sound/davinci-mcasp-audio.txt | 8 +++----
+ sound/soc/davinci/davinci-mcasp.c | 22 +++++---------------
+ 2 files changed, 8 insertions(+), 22 deletions(-)
+
+diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
+index 2fd0bf2..be6cf94 100644
+--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
++++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
+@@ -13,10 +13,9 @@ Required properties:
+ good to keep "mpu" first in the list.
+ - op-mode : I2S/DIT ops mode.
+ - tdm-slots : Slots for TDM operation.
+-- num-serializer : Serializers used by McASP.
+-- serial-dir : A list of serializer pin mode. The list number should be equal
+- to "num-serializer" parameter. Each entry is a number indication
+- serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
++- serial-dir : A list of serializer configuration. Each entry is a number
++ indication serializer pin direction.
++ (0 - INACTIVE, 1 - TX, 2 - RX)
+ - dmas: two element list of DMA controller phandles and DMA request line
+ ordered pairs.
+ - dma-names: identifier string for each DMA request line in the dmas property.
+@@ -45,7 +44,6 @@ mcasp0: mcasp0@1d00000 {
+ interrupts-names = "tx", "rx";
+ op-mode = <0>; /* MCASP_IIS_MODE */
+ tdm-slots = <2>;
+- num-serializer = <16>;
+ serial-dir = <
+ 0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */
+ 0 0 0 0
+diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
+index acbf5f8..69e662e 100644
+--- a/sound/soc/davinci/davinci-mcasp.c
++++ b/sound/soc/davinci/davinci-mcasp.c
+@@ -1050,7 +1050,6 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
+ struct of_phandle_args dma_spec;
+
+ const u32 *of_serial_dir32;
+- u8 *of_serial_dir;
+ u32 val;
+ int i, ret = 0;
+
+@@ -1081,32 +1080,21 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
+ pdata->tdm_slots = val;
+ }
+
+- ret = of_property_read_u32(np, "num-serializer", &val);
+- if (ret >= 0)
+- pdata->num_serializer = val;
+-
+ of_serial_dir32 = of_get_property(np, "serial-dir", &val);
+ val /= sizeof(u32);
+- if (val != pdata->num_serializer) {
+- dev_err(&pdev->dev,
+- "num-serializer(%d) != serial-dir size(%d)\n",
+- pdata->num_serializer, val);
+- ret = -EINVAL;
+- goto nodata;
+- }
+-
+ if (of_serial_dir32) {
+- of_serial_dir = devm_kzalloc(&pdev->dev,
+- (sizeof(*of_serial_dir) * val),
+- GFP_KERNEL);
++ u8 *of_serial_dir = devm_kzalloc(&pdev->dev,
++ (sizeof(*of_serial_dir) * val),
++ GFP_KERNEL);
+ if (!of_serial_dir) {
+ ret = -ENOMEM;
+ goto nodata;
+ }
+
+- for (i = 0; i < pdata->num_serializer; i++)
++ for (i = 0; i < val; i++)
+ of_serial_dir[i] = be32_to_cpup(&of_serial_dir32[i]);
+
++ pdata->num_serializer = val;
+ pdata->serial_dir = of_serial_dir;
+ }
+
+--
+1.7.10.4
+