wm8997.c (97acb6a8fcc4e5c2cdc2693a35acdc5a7461aaa3) wm8997.c (fdabc3f10e774ddc86ba715b9bc0c861d7e0834c)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * wm8997.c -- WM8997 ALSA SoC Audio driver
4 *
5 * Copyright 2012 Wolfson Microelectronics plc
6 *
7 * Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
8 */

--- 1147 unchanged lines hidden (view full) ---

1156 for (i = 0; i < ARRAY_SIZE(wm8997_dai); i++)
1157 arizona_init_dai(&wm8997->core, i);
1158
1159 /* Latch volume update bits */
1160 for (i = 0; i < ARRAY_SIZE(wm8997_digital_vu); i++)
1161 regmap_update_bits(arizona->regmap, wm8997_digital_vu[i],
1162 WM8997_DIG_VU, WM8997_DIG_VU);
1163
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * wm8997.c -- WM8997 ALSA SoC Audio driver
4 *
5 * Copyright 2012 Wolfson Microelectronics plc
6 *
7 * Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
8 */

--- 1147 unchanged lines hidden (view full) ---

1156 for (i = 0; i < ARRAY_SIZE(wm8997_dai); i++)
1157 arizona_init_dai(&wm8997->core, i);
1158
1159 /* Latch volume update bits */
1160 for (i = 0; i < ARRAY_SIZE(wm8997_digital_vu); i++)
1161 regmap_update_bits(arizona->regmap, wm8997_digital_vu[i],
1162 WM8997_DIG_VU, WM8997_DIG_VU);
1163
1164 pm_runtime_enable(&pdev->dev);
1165 pm_runtime_idle(&pdev->dev);
1166
1167 arizona_init_common(arizona);
1168
1169 ret = arizona_init_vol_limit(arizona);
1170 if (ret < 0)
1171 goto err_jack_codec_dev;
1172 ret = arizona_init_spk_irqs(arizona);
1173 if (ret < 0)
1174 goto err_jack_codec_dev;
1175
1176 ret = devm_snd_soc_register_component(&pdev->dev,
1177 &soc_component_dev_wm8997,
1178 wm8997_dai,
1179 ARRAY_SIZE(wm8997_dai));
1180 if (ret < 0) {
1181 dev_err(&pdev->dev, "Failed to register component: %d\n", ret);
1182 goto err_spk_irqs;
1183 }
1184
1164 arizona_init_common(arizona);
1165
1166 ret = arizona_init_vol_limit(arizona);
1167 if (ret < 0)
1168 goto err_jack_codec_dev;
1169 ret = arizona_init_spk_irqs(arizona);
1170 if (ret < 0)
1171 goto err_jack_codec_dev;
1172
1173 ret = devm_snd_soc_register_component(&pdev->dev,
1174 &soc_component_dev_wm8997,
1175 wm8997_dai,
1176 ARRAY_SIZE(wm8997_dai));
1177 if (ret < 0) {
1178 dev_err(&pdev->dev, "Failed to register component: %d\n", ret);
1179 goto err_spk_irqs;
1180 }
1181
1182 pm_runtime_enable(&pdev->dev);
1183 pm_runtime_idle(&pdev->dev);
1184
1185 return ret;
1186
1187err_spk_irqs:
1188 arizona_free_spk_irqs(arizona);
1189err_jack_codec_dev:
1185 return ret;
1186
1187err_spk_irqs:
1188 arizona_free_spk_irqs(arizona);
1189err_jack_codec_dev:
1190 pm_runtime_disable(&pdev->dev);
1190 arizona_jack_codec_dev_remove(&wm8997->core);
1191
1192 return ret;
1193}
1194
1195static int wm8997_remove(struct platform_device *pdev)
1196{
1197 struct wm8997_priv *wm8997 = platform_get_drvdata(pdev);

--- 25 unchanged lines hidden ---
1191 arizona_jack_codec_dev_remove(&wm8997->core);
1192
1193 return ret;
1194}
1195
1196static int wm8997_remove(struct platform_device *pdev)
1197{
1198 struct wm8997_priv *wm8997 = platform_get_drvdata(pdev);

--- 25 unchanged lines hidden ---