diff --git a/sound/soc/tegra-alt/tegra210_dmic_alt.c b/sound/soc/tegra-alt/tegra210_dmic_alt.c index 95239eba..647754c3 100644 --- a/sound/soc/tegra-alt/tegra210_dmic_alt.c +++ b/sound/soc/tegra-alt/tegra210_dmic_alt.c @@ -1,7 +1,7 @@ /* * tegra210_dmic_alt.c - Tegra210 DMIC driver * - * Copyright (c) 2014 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -30,6 +30,7 @@ #include #include #include +#include #include "tegra210_xbar_alt.h" #include "tegra210_dmic_alt.h" @@ -337,11 +338,13 @@ static const struct of_device_id tegra210_dmic_of_match[] = { static int tegra210_dmic_platform_probe(struct platform_device *pdev) { struct tegra210_dmic *dmic; + struct device_node *np = pdev->dev.of_node; struct resource *mem, *memregion; void __iomem *regs; int ret = 0; const struct of_device_id *match; struct tegra210_dmic_soc_data *soc_data; + const char *prod_name; match = of_match_device(tegra210_dmic_of_match, &pdev->dev); if (!match) { @@ -399,8 +402,7 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev) } regcache_cache_only(dmic->regmap, true); - if (of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-dmic-id", + if (of_property_read_u32(np, "nvidia,ahub-dmic-id", &pdev->dev.id) < 0) { dev_err(&pdev->dev, "Missing property nvidia,ahub-dmic-id\n"); @@ -423,6 +425,9 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev) goto err_suspend; } + if (of_property_read_string(np, "prod-name", &prod_name) == 0) + tegra_pinctrl_config_prod(&pdev->dev, prod_name); + return 0; err_suspend: diff --git a/sound/soc/tegra-alt/tegra210_i2s_alt.c b/sound/soc/tegra-alt/tegra210_i2s_alt.c index e265eb40..1a0a55ad 100644 --- a/sound/soc/tegra-alt/tegra210_i2s_alt.c +++ b/sound/soc/tegra-alt/tegra210_i2s_alt.c @@ -31,12 +31,14 @@ #include #include #include +#include #include #include #include #include #include + #include "tegra210_xbar_alt.h" #include "tegra210_i2s_alt.h" @@ -780,7 +782,7 @@ static int tegra210_i2s_platform_probe(struct platform_device *pdev) struct property *prop; void __iomem *regs; int ret = 0, count = 0, num_supplies; - const char *supply; + const char *supply, *prod_name; match = of_match_device(tegra210_i2s_of_match, &pdev->dev); if (!match) { @@ -892,6 +894,9 @@ static int tegra210_i2s_platform_probe(struct platform_device *pdev) of_property_read_bool(pdev->dev.of_node, "enable-cya"); + if (of_property_read_string(np, "prod-name", &prod_name) == 0) + tegra_pinctrl_config_prod(&pdev->dev, prod_name); + num_supplies = of_property_count_strings(np, "regulator-supplies"); if (num_supplies > 0) { i2s->num_supplies = num_supplies;