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: SMA1303: Remove the sysclk setting in devicetree

In SMA1303, this device does not support MCLK.
So it need to remove sysclk setting in devicetree.

Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
Link: https://lore.kernel.org/r/20230209084903.13000-2-kiseok.jo@irondevice.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kiseok Jo and committed by
Mark Brown
2512839d 35ff1051

+2 -35
+2 -35
sound/soc/codecs/sma1303.c
··· 998 998 params_channels(params)); 999 999 1000 1000 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 1001 - 1002 - if (sma1303->sys_clk_id == SMA1303_PLL_CLKIN_MCLK 1003 - || sma1303->sys_clk_id == SMA1303_PLL_CLKIN_BCLK) { 1004 - 1001 + if (sma1303->sys_clk_id == SMA1303_PLL_CLKIN_BCLK) { 1005 1002 if (sma1303->last_bclk != bclk) { 1006 1003 sma1303_setup_pll(component, bclk); 1007 1004 sma1303->last_bclk = bclk; ··· 1677 1680 static int sma1303_i2c_probe(struct i2c_client *client) 1678 1681 { 1679 1682 struct sma1303_priv *sma1303; 1680 - struct device_node *np = client->dev.of_node; 1681 1683 int ret, i = 0; 1682 - u32 value = 0; 1683 1684 unsigned int device_info, status, otp_stat; 1684 1685 1685 1686 sma1303 = devm_kzalloc(&client->dev, ··· 1693 1698 "Failed to allocate register map: %d\n", ret); 1694 1699 1695 1700 return ret; 1696 - } 1697 - 1698 - if (np) { 1699 - if (!of_property_read_u32(np, "sys-clk-id", &value)) { 1700 - switch (value) { 1701 - case SMA1303_EXTERNAL_CLOCK_19_2: 1702 - case SMA1303_EXTERNAL_CLOCK_24_576: 1703 - case SMA1303_PLL_CLKIN_MCLK: 1704 - dev_dbg(&client->dev, "MCLK is not supported\n"); 1705 - break; 1706 - case SMA1303_PLL_CLKIN_BCLK: 1707 - dev_dbg(&client->dev, 1708 - "Take an BCLK(SCK) and covert it to an internal PLL for use\n"); 1709 - break; 1710 - default: 1711 - dev_err(&client->dev, 1712 - "Invalid sys-clk-id: %u\n", value); 1713 - return -EINVAL; 1714 - } 1715 - sma1303->sys_clk_id = value; 1716 - } else { 1717 - dev_dbg(&client->dev, "Use the internal PLL clock by default\n"); 1718 - sma1303->sys_clk_id = SMA1303_PLL_CLKIN_BCLK; 1719 - } 1720 - } else { 1721 - dev_err(&client->dev, 1722 - "device node initialization error\n"); 1723 - devm_kfree(&client->dev, sma1303); 1724 - return -ENODEV; 1725 1701 } 1726 1702 1727 1703 ret = sma1303_regmap_read(sma1303, ··· 1749 1783 sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT; 1750 1784 sma1303->tdm_slot_rx = 0; 1751 1785 sma1303->tdm_slot_tx = 0; 1786 + sma1303->sys_clk_id = SMA1303_PLL_CLKIN_BCLK; 1752 1787 1753 1788 sma1303->dev = &client->dev; 1754 1789 sma1303->kobj = &client->dev.kobj;