Commit 1974a042dd15f1f007a3a1a2dd7a23ca0e42c01d
Committed by
Mark Brown
1 parent
208229ecb9
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
ASoC: Samsung: Get I2S src_clk from clock alias id.
As the I2S src clks are registered with clkdev using generic connection id, driver can get the clk name using generic id. So the variable representing the array of rclk src clks is deleted. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Showing 2 changed files with 6 additions and 12 deletions Side-by-side Diff
include/linux/platform_data/asoc-s3c.h
... | ... | @@ -38,12 +38,6 @@ |
38 | 38 | #define QUIRK_NEED_RSTCLR (1 << 3) |
39 | 39 | /* Quirks of the I2S controller */ |
40 | 40 | u32 quirks; |
41 | - | |
42 | - /* | |
43 | - * Array of clock names that can be used to generate I2S signals. | |
44 | - * Also corresponds to clocks of I2SMOD[10] | |
45 | - */ | |
46 | - const char **src_clk; | |
47 | 41 | dma_addr_t idma_addr; |
48 | 42 | }; |
49 | 43 |
sound/soc/samsung/i2s.c
... | ... | @@ -49,8 +49,6 @@ |
49 | 49 | struct clk *clk; |
50 | 50 | /* Clock for generating I2S signals */ |
51 | 51 | struct clk *op_clk; |
52 | - /* Array of clock names for op_clk */ | |
53 | - const char **src_clk; | |
54 | 52 | /* Pointer to the Primary_Fifo if this is Sec_Fifo, NULL otherwise */ |
55 | 53 | struct i2s_dai *pri_dai; |
56 | 54 | /* Pointer to the Secondary_Fifo if it has one, NULL otherwise */ |
... | ... | @@ -432,8 +430,12 @@ |
432 | 430 | } |
433 | 431 | } |
434 | 432 | |
435 | - i2s->op_clk = clk_get(&i2s->pdev->dev, | |
436 | - i2s->src_clk[clk_id]); | |
433 | + if (clk_id) | |
434 | + i2s->op_clk = clk_get(&i2s->pdev->dev, | |
435 | + "i2s_opclk1"); | |
436 | + else | |
437 | + i2s->op_clk = clk_get(&i2s->pdev->dev, | |
438 | + "i2s_opclk0"); | |
437 | 439 | clk_prepare_enable(i2s->op_clk); |
438 | 440 | i2s->rclk_srcrate = clk_get_rate(i2s->op_clk); |
439 | 441 | |
... | ... | @@ -1067,7 +1069,6 @@ |
1067 | 1069 | (struct s3c2410_dma_client *)&pri_dai->dma_capture; |
1068 | 1070 | pri_dai->dma_playback.channel = dma_pl_chan; |
1069 | 1071 | pri_dai->dma_capture.channel = dma_cp_chan; |
1070 | - pri_dai->src_clk = i2s_cfg->src_clk; | |
1071 | 1072 | pri_dai->dma_playback.dma_size = 4; |
1072 | 1073 | pri_dai->dma_capture.dma_size = 4; |
1073 | 1074 | pri_dai->base = regs_base; |
... | ... | @@ -1088,7 +1089,6 @@ |
1088 | 1089 | (struct s3c2410_dma_client *)&sec_dai->dma_playback; |
1089 | 1090 | /* Use iDMA always if SysDMA not provided */ |
1090 | 1091 | sec_dai->dma_playback.channel = dma_pl_sec_chan ? : -1; |
1091 | - sec_dai->src_clk = i2s_cfg->src_clk; | |
1092 | 1092 | sec_dai->dma_playback.dma_size = 4; |
1093 | 1093 | sec_dai->base = regs_base; |
1094 | 1094 | sec_dai->quirks = quirks; |