Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: ti: davinci-i2s: Remove the unused clk_input_pin attribute

The clk_input_pin attribute of davinci_mcbsp_dev struct is not set since
commit 257ade78b601 ("ASoC: davinci-i2s: Convert to use edma-pcm").

Remove the attribute.
Keep the behaviour of the MCBSP_CLKR case as MCBSP_CLKR == 0.
I can't test the BC_FP format so I added back the initial comment that
was removed by commit ec6375533748 ("ASoC: DaVinci: Added selection of
clk input pin for McBSP"). This was the last dependency to
linux/platform_data/davinci_asp.h so it is not included anymore.

Remove the enum mcbsp_clk_input_pin from davinci_asp.h as it is not used
anywhere else.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://msgid.link/r/20240402071213.11671-4-bastien.curutchet@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Bastien Curutchet and committed by
Mark Brown
904fb8f8 6a4b6b06

+4 -35
-15
include/linux/platform_data/davinci_asp.h
··· 26 26 struct gen_pool *sram_pool; 27 27 28 28 /* 29 - * If McBSP peripheral gets the clock from an external pin, 30 - * there are three chooses, that are MCBSP_CLKX, MCBSP_CLKR 31 - * and MCBSP_CLKS. 32 - * Depending on different hardware connections it is possible 33 - * to use this setting to change the behaviour of McBSP 34 - * driver. 35 - */ 36 - int clk_input_pin; 37 - 38 - /* 39 29 * This flag works when both clock and FS are outputs for the cpu 40 30 * and makes clock more accurate (FS is not symmetrical and the 41 31 * clock is very fast. ··· 79 89 MCASP_VERSION_3, /* TI81xx/AM33xx */ 80 90 MCASP_VERSION_4, /* DRA7xxx */ 81 91 MCASP_VERSION_OMAP, /* OMAP4/5 */ 82 - }; 83 - 84 - enum mcbsp_clk_input_pin { 85 - MCBSP_CLKR = 0, /* as in DM365 */ 86 - MCBSP_CLKS, 87 92 }; 88 93 89 94 #define INACTIVE_MODE 0
+4 -20
sound/soc/ti/davinci-i2s.c
··· 19 19 #include <linux/delay.h> 20 20 #include <linux/io.h> 21 21 #include <linux/clk.h> 22 - #include <linux/platform_data/davinci_asp.h> 23 22 24 23 #include <sound/core.h> 25 24 #include <sound/pcm.h> ··· 158 159 159 160 unsigned int fmt; 160 161 int clk_div; 161 - int clk_input_pin; 162 162 bool i2s_accurate_sck; 163 163 }; 164 164 ··· 237 239 DAVINCI_MCBSP_PCR_CLKRM; 238 240 break; 239 241 case SND_SOC_DAIFMT_BC_FP: 240 - pcr = DAVINCI_MCBSP_PCR_FSRM | DAVINCI_MCBSP_PCR_FSXM; 241 242 /* 242 - * Selection of the clock input pin that is the 243 - * input for the Sample Rate Generator. 244 - * McBSP FSR and FSX are driven by the Sample Rate 245 - * Generator. 243 + * McBSP CLKR pin is the input for the Sample Rate Generator. 244 + * McBSP FSR and FSX are driven by the Sample Rate Generator. 246 245 */ 247 - switch (dev->clk_input_pin) { 248 - case MCBSP_CLKS: 249 - pcr |= DAVINCI_MCBSP_PCR_CLKXM | 250 - DAVINCI_MCBSP_PCR_CLKRM; 251 - break; 252 - case MCBSP_CLKR: 253 - pcr |= DAVINCI_MCBSP_PCR_SCLKME; 254 - break; 255 - default: 256 - dev_err(dev->dev, "bad clk_input_pin\n"); 257 - return -EINVAL; 258 - } 259 - 246 + pcr = DAVINCI_MCBSP_PCR_FSRM | DAVINCI_MCBSP_PCR_FSXM; 247 + pcr |= DAVINCI_MCBSP_PCR_SCLKME; 260 248 break; 261 249 case SND_SOC_DAIFMT_BC_FC: 262 250 /* codec is master */