Loading asoc/codecs/wcd937x/wcd937x_slave.c +10 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018, The Linux Foundation. All rights reserved. * Copyright (c) 2018, 2021, The Linux Foundation. All rights reserved. */ #include <linux/module.h> Loading @@ -11,6 +11,8 @@ #include <linux/component.h> #include <soc/soundwire.h> #define SWR_MAX_RETRY 5 struct wcd937x_slave_priv { struct swr_device *swr_slave; }; Loading @@ -22,6 +24,7 @@ static int wcd937x_slave_bind(struct device *dev, struct wcd937x_slave_priv *wcd937x_slave = NULL; uint8_t devnum = 0; struct swr_device *pdev = to_swr_device(dev); int retry = SWR_MAX_RETRY; if (pdev == NULL) { dev_err(dev, "%s: pdev is NULL\n", __func__); Loading @@ -37,7 +40,12 @@ static int wcd937x_slave_bind(struct device *dev, wcd937x_slave->swr_slave = pdev; do { /* Add delay for soundwire enumeration */ usleep_range(100, 110); ret = swr_get_logical_dev_num(pdev, pdev->addr, &devnum); } while (ret && --retry); if (ret) { dev_dbg(&pdev->dev, "%s get devnum %d for dev addr %lx failed\n", Loading Loading
asoc/codecs/wcd937x/wcd937x_slave.c +10 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018, The Linux Foundation. All rights reserved. * Copyright (c) 2018, 2021, The Linux Foundation. All rights reserved. */ #include <linux/module.h> Loading @@ -11,6 +11,8 @@ #include <linux/component.h> #include <soc/soundwire.h> #define SWR_MAX_RETRY 5 struct wcd937x_slave_priv { struct swr_device *swr_slave; }; Loading @@ -22,6 +24,7 @@ static int wcd937x_slave_bind(struct device *dev, struct wcd937x_slave_priv *wcd937x_slave = NULL; uint8_t devnum = 0; struct swr_device *pdev = to_swr_device(dev); int retry = SWR_MAX_RETRY; if (pdev == NULL) { dev_err(dev, "%s: pdev is NULL\n", __func__); Loading @@ -37,7 +40,12 @@ static int wcd937x_slave_bind(struct device *dev, wcd937x_slave->swr_slave = pdev; do { /* Add delay for soundwire enumeration */ usleep_range(100, 110); ret = swr_get_logical_dev_num(pdev, pdev->addr, &devnum); } while (ret && --retry); if (ret) { dev_dbg(&pdev->dev, "%s get devnum %d for dev addr %lx failed\n", Loading