summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/sma1303.c
diff options
context:
space:
mode:
authorKiseok Jo <kiseok.jo@irondevice.com>2023-02-08 12:24:17 +0300
committerMark Brown <broonie@kernel.org>2023-02-08 14:51:49 +0300
commit1edc70c3a4c2b07dceac3ab7d564a283549a2534 (patch)
tree8215588ea51f9959f8c2b0a8599fc08a8595bdb2 /sound/soc/codecs/sma1303.c
parent55194032620ae97338ac435505f1296e13fbe821 (diff)
downloadlinux-1edc70c3a4c2b07dceac3ab7d564a283549a2534.tar.xz
ASoC: SMA1303: Remove the I2C Retry property in devicetree
It's necessary to set the value for each device, so remove that. Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com> Link: https://lore.kernel.org/r/20230208092420.5037-5-kiseok.jo@irondevice.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/sma1303.c')
-rw-r--r--sound/soc/codecs/sma1303.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c
index fbedba574ff4..fdcc40f5fc61 100644
--- a/sound/soc/codecs/sma1303.c
+++ b/sound/soc/codecs/sma1303.c
@@ -1621,21 +1621,6 @@ static int sma1303_i2c_probe(struct i2c_client *client)
}
if (np) {
- if (!of_property_read_u32(np, "i2c-retry", &value)) {
- if (value > 50 || value <= 0) {
- sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT;
- dev_dbg(&client->dev, "%s : %s\n", __func__,
- "i2c-retry out of range (up to 50)");
- } else {
- sma1303->retry_cnt = value;
- dev_dbg(&client->dev, "%s : %s = %u\n",
- __func__, "i2c-retry count", value);
- }
- } else {
- dev_dbg(&client->dev, "%s : %s = %d\n", __func__,
- "i2c-retry count", SMA1303_I2C_RETRY_COUNT);
- sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT;
- }
if (!of_property_read_u32(np, "tdm-slot-rx", &value)) {
dev_dbg(&client->dev,
"tdm slot rx is '%d' from DT\n", value);
@@ -1733,6 +1718,7 @@ static int sma1303_i2c_probe(struct i2c_client *client)
sma1303->last_ocp_val = 0x08;
sma1303->last_over_temp = 0xC0;
sma1303->tsdw_cnt = 0;
+ sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT;
sma1303->dev = &client->dev;
sma1303->kobj = &client->dev.kobj;