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

ASoC: jz4740-i2s: Remove .set_sysclk() & friends

Merge series from Aidan MacDonald <aidanmacdonald.0x0@gmail.com>:

A quick series to get rid of .set_sysclk() from jz4740-i2s.
It wasn't used in practice so this shouldn't be troublesome for anyone,
and fortunately there aren't any backward compatibility concerns.

The actual rationale for removing it, as opposed to fixing the
issues of the current DT bindings and implementation, is provided
in the dt-bindings patch.

+2 -50
+2 -8
Documentation/devicetree/bindings/sound/ingenic,aic.yaml
··· 37 37 items: 38 38 - description: AIC clock 39 39 - description: I2S clock 40 - - description: EXT clock 41 - - description: PLL/2 clock 42 40 43 41 clock-names: 44 42 items: 45 43 - const: aic 46 44 - const: i2s 47 - - const: ext 48 - - const: pll half 49 45 50 46 dmas: 51 47 items: ··· 78 82 interrupts = <18>; 79 83 80 84 clocks = <&cgu JZ4740_CLK_AIC>, 81 - <&cgu JZ4740_CLK_I2S>, 82 - <&cgu JZ4740_CLK_EXT>, 83 - <&cgu JZ4740_CLK_PLL_HALF>; 84 - clock-names = "aic", "i2s", "ext", "pll half"; 85 + <&cgu JZ4740_CLK_I2S>; 86 + clock-names = "aic", "i2s"; 85 87 86 88 dmas = <&dmac 25 0xffffffff>, <&dmac 24 0xffffffff>; 87 89 dma-names = "rx", "tx";
-32
sound/soc/jz4740/jz4740-i2s.c
··· 23 23 #include <sound/initval.h> 24 24 #include <sound/dmaengine_pcm.h> 25 25 26 - #include "jz4740-i2s.h" 27 - 28 26 #define JZ_REG_AIC_CONF 0x00 29 27 #define JZ_REG_AIC_CTRL 0x04 30 28 #define JZ_REG_AIC_I2S_FMT 0x10 ··· 271 273 return 0; 272 274 } 273 275 274 - static int jz4740_i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, 275 - unsigned int freq, int dir) 276 - { 277 - struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); 278 - struct clk *parent; 279 - int ret = 0; 280 - 281 - switch (clk_id) { 282 - case JZ4740_I2S_CLKSRC_EXT: 283 - parent = clk_get(NULL, "ext"); 284 - if (IS_ERR(parent)) 285 - return PTR_ERR(parent); 286 - clk_set_parent(i2s->clk_i2s, parent); 287 - break; 288 - case JZ4740_I2S_CLKSRC_PLL: 289 - parent = clk_get(NULL, "pll half"); 290 - if (IS_ERR(parent)) 291 - return PTR_ERR(parent); 292 - clk_set_parent(i2s->clk_i2s, parent); 293 - ret = clk_set_rate(i2s->clk_i2s, freq); 294 - break; 295 - default: 296 - return -EINVAL; 297 - } 298 - clk_put(parent); 299 - 300 - return ret; 301 - } 302 - 303 276 static int jz4740_i2s_dai_probe(struct snd_soc_dai *dai) 304 277 { 305 278 struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); ··· 287 318 .trigger = jz4740_i2s_trigger, 288 319 .hw_params = jz4740_i2s_hw_params, 289 320 .set_fmt = jz4740_i2s_set_fmt, 290 - .set_sysclk = jz4740_i2s_set_sysclk, 291 321 }; 292 322 293 323 #define JZ4740_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | \
-10
sound/soc/jz4740/jz4740-i2s.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - 3 - #ifndef _JZ4740_I2S_H 4 - #define _JZ4740_I2S_H 5 - 6 - /* I2S clock source */ 7 - #define JZ4740_I2S_CLKSRC_EXT 0 8 - #define JZ4740_I2S_CLKSRC_PLL 1 9 - 10 - #endif