1 From fdb8d3521ecae71865df66a84a1cbe13f7daa6f5 Mon Sep 17 00:00:00 2001
2 From: Peter Ujfalusi <peter.ujfalusi@ti.com>
3 Date: Mon, 23 Sep 2013 11:25:02 +0300
4 Subject: [PATCH 226/752] ASoC: davinci: mcasp: Remove redundant
5 num-serializer DT parameter
7 The serial-dir array gives this information so there is no need to have the
8 num-serializer property in DT description.
9 Just ignore the property in the driver the DTS files can be updated
10 separately without regression.
11 Update the documentation at the same time for davinci-mcasp
13 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
15 .../bindings/sound/davinci-mcasp-audio.txt | 8 +++----
16 sound/soc/davinci/davinci-mcasp.c | 22 +++++---------------
17 2 files changed, 8 insertions(+), 22 deletions(-)
19 --- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
20 +++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
21 @@ -13,10 +13,9 @@ Required properties:
22 good to keep "mpu" first in the list.
23 - op-mode : I2S/DIT ops mode.
24 - tdm-slots : Slots for TDM operation.
25 -- num-serializer : Serializers used by McASP.
26 -- serial-dir : A list of serializer pin mode. The list number should be equal
27 - to "num-serializer" parameter. Each entry is a number indication
28 - serializer pin direction. (0 - INACTIVE, 1 - TX, 2 - RX)
29 +- serial-dir : A list of serializer configuration. Each entry is a number
30 + indication serializer pin direction.
31 + (0 - INACTIVE, 1 - TX, 2 - RX)
32 - dmas: two element list of DMA controller phandles and DMA request line
34 - dma-names: identifier string for each DMA request line in the dmas property.
35 @@ -45,7 +44,6 @@ mcasp0: mcasp0@1d00000 {
36 interrupts-names = "tx", "rx";
37 op-mode = <0>; /* MCASP_IIS_MODE */
39 - num-serializer = <16>;
41 0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */
43 --- a/sound/soc/davinci/davinci-mcasp.c
44 +++ b/sound/soc/davinci/davinci-mcasp.c
45 @@ -1050,7 +1050,6 @@ static struct snd_platform_data *davinci
46 struct of_phandle_args dma_spec;
48 const u32 *of_serial_dir32;
53 @@ -1081,32 +1080,21 @@ static struct snd_platform_data *davinci
54 pdata->tdm_slots = val;
57 - ret = of_property_read_u32(np, "num-serializer", &val);
59 - pdata->num_serializer = val;
61 of_serial_dir32 = of_get_property(np, "serial-dir", &val);
63 - if (val != pdata->num_serializer) {
65 - "num-serializer(%d) != serial-dir size(%d)\n",
66 - pdata->num_serializer, val);
71 if (of_serial_dir32) {
72 - of_serial_dir = devm_kzalloc(&pdev->dev,
73 - (sizeof(*of_serial_dir) * val),
75 + u8 *of_serial_dir = devm_kzalloc(&pdev->dev,
76 + (sizeof(*of_serial_dir) * val),
83 - for (i = 0; i < pdata->num_serializer; i++)
84 + for (i = 0; i < val; i++)
85 of_serial_dir[i] = be32_to_cpup(&of_serial_dir32[i]);
87 + pdata->num_serializer = val;
88 pdata->serial_dir = of_serial_dir;