mxs-sgtl5000.c (4f2c0a4acffbec01079c28f839422e64ddeff004) mxs-sgtl5000.c (1e108e60a44a924e3666fa2a10b53f6c31522856)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright 2011 Freescale Semiconductor, Inc.
4 */
5
6#include <linux/module.h>
7#include <linux/device.h>
8#include <linux/of.h>

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

145 ret = mxs_saif_get_mclk(0, 44100 * 256, 44100);
146 if (ret) {
147 dev_err(&pdev->dev, "failed to get mclk\n");
148 return ret;
149 }
150
151 card->dev = &pdev->dev;
152
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright 2011 Freescale Semiconductor, Inc.
4 */
5
6#include <linux/module.h>
7#include <linux/device.h>
8#include <linux/of.h>

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

145 ret = mxs_saif_get_mclk(0, 44100 * 256, 44100);
146 if (ret) {
147 dev_err(&pdev->dev, "failed to get mclk\n");
148 return ret;
149 }
150
151 card->dev = &pdev->dev;
152
153 if (of_find_property(np, "audio-routing", NULL)) {
153 if (of_property_present(np, "audio-routing")) {
154 card->dapm_widgets = mxs_sgtl5000_dapm_widgets;
155 card->num_dapm_widgets = ARRAY_SIZE(mxs_sgtl5000_dapm_widgets);
156
157 ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
158 if (ret) {
159 dev_err(&pdev->dev, "failed to parse audio-routing (%d)\n",
160 ret);
161 return ret;

--- 38 unchanged lines hidden ---
154 card->dapm_widgets = mxs_sgtl5000_dapm_widgets;
155 card->num_dapm_widgets = ARRAY_SIZE(mxs_sgtl5000_dapm_widgets);
156
157 ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
158 if (ret) {
159 dev_err(&pdev->dev, "failed to parse audio-routing (%d)\n",
160 ret);
161 return ret;

--- 38 unchanged lines hidden ---