mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
ASoC: tegra-alt: support dynamic prod settings
Add driver support for DSPK/DMIC/I2S for dynamic prod settings. Bug 200388806 Change-Id: I0c7d77a36a7c5d213b707321605cbe41d5b182d9 Signed-off-by: Mohan Kumar <mkumard@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1691746 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Sameer Pujar
parent
6451c05c89
commit
e0b1e0193b
@@ -118,6 +118,13 @@ static int tegra186_dspk_runtime_resume(struct device *dev)
|
||||
struct tegra186_dspk *dspk = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
if (dspk->prod_name) {
|
||||
ret = tegra_pinctrl_config_prod(dev, dspk->prod_name);
|
||||
if (ret < 0)
|
||||
dev_warn(dev, "Failed to set %s setting\n",
|
||||
dspk->prod_name);
|
||||
}
|
||||
|
||||
if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) {
|
||||
if (!IS_ERR(dspk->pin_active_state) && dspk->is_pinctrl) {
|
||||
ret = pinctrl_select_state(dspk->pinctrl,
|
||||
@@ -461,7 +468,6 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
|
||||
int ret = 0;
|
||||
const struct of_device_id *match;
|
||||
struct tegra186_dspk_soc_data *soc_data;
|
||||
const char *prod_name;
|
||||
|
||||
match = of_match_device(tegra186_dspk_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
@@ -481,6 +487,7 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
|
||||
|
||||
dspk->soc_data = soc_data;
|
||||
dspk->is_shutdown = false;
|
||||
dspk->prod_name = NULL;
|
||||
|
||||
if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) {
|
||||
dspk->clk_dspk = devm_clk_get(&pdev->dev, NULL);
|
||||
@@ -558,11 +565,11 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
|
||||
goto err_suspend;
|
||||
}
|
||||
|
||||
if (of_property_read_string(np, "prod-name", &prod_name) == 0) {
|
||||
ret = tegra_pinctrl_config_prod(&pdev->dev, prod_name);
|
||||
if (of_property_read_string(np, "prod-name", &dspk->prod_name) == 0) {
|
||||
ret = tegra_pinctrl_config_prod(&pdev->dev, dspk->prod_name);
|
||||
if (ret < 0)
|
||||
dev_warn(&pdev->dev, "Failed to set %s setting\n",
|
||||
prod_name);
|
||||
dspk->prod_name);
|
||||
}
|
||||
|
||||
if (of_property_read_u32(np, "nvidia,is-pinctrl",
|
||||
|
||||
Reference in New Issue
Block a user