Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) * tegra_rt5640.c - Tegra machine ASoC driver for boards using RT5640 codec.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * Based on code copyright/by:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  * Copyright (C) 2010-2012 - NVIDIA, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  * Copyright (C) 2011 The AC100 Kernel Team <ac100@lists.lauchpad.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  * (c) 2009, 2010 Nvidia Graphics Pvt. Ltd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  * Copyright 2007 Wolfson Microelectronics PLC.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include <linux/gpio.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include <linux/of_gpio.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #include <sound/core.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #include <sound/jack.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #include <sound/pcm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #include <sound/pcm_params.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #include <sound/soc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #include "../codecs/rt5640.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #include "tegra_asoc_utils.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #define DRV_NAME "tegra-snd-rt5640"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) struct tegra_rt5640 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	struct tegra_asoc_utils_data util_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	int gpio_hp_det;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	enum of_gpio_flags gpio_hp_det_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) static int tegra_rt5640_asoc_hw_params(struct snd_pcm_substream *substream,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 					struct snd_pcm_hw_params *params)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	struct snd_soc_card *card = rtd->card;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	int srate, mclk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	int err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	srate = params_rate(params);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	mclk = 256 * srate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	if (err < 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 		dev_err(card->dev, "Can't configure clocks\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		return err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	err = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_MCLK, mclk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 					SND_SOC_CLOCK_IN);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	if (err < 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		dev_err(card->dev, "codec_dai clock not set\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		return err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) static const struct snd_soc_ops tegra_rt5640_ops = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	.hw_params = tegra_rt5640_asoc_hw_params,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) static struct snd_soc_jack tegra_rt5640_hp_jack;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) static struct snd_soc_jack_pin tegra_rt5640_hp_jack_pins[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		.pin = "Headphones",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		.mask = SND_JACK_HEADPHONE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) static struct snd_soc_jack_gpio tegra_rt5640_hp_jack_gpio = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	.name = "Headphone detection",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	.report = SND_JACK_HEADPHONE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	.debounce_time = 150,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	.invert = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) static const struct snd_soc_dapm_widget tegra_rt5640_dapm_widgets[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	SND_SOC_DAPM_HP("Headphones", NULL),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	SND_SOC_DAPM_SPK("Speakers", NULL),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	SND_SOC_DAPM_MIC("Mic Jack", NULL),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) static const struct snd_kcontrol_new tegra_rt5640_controls[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	SOC_DAPM_PIN_SWITCH("Speakers"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) static int tegra_rt5640_asoc_init(struct snd_soc_pcm_runtime *rtd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(rtd->card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	snd_soc_card_jack_new(rtd->card, "Headphones", SND_JACK_HEADPHONE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 			      &tegra_rt5640_hp_jack, tegra_rt5640_hp_jack_pins,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 			      ARRAY_SIZE(tegra_rt5640_hp_jack_pins));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	if (gpio_is_valid(machine->gpio_hp_det)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		tegra_rt5640_hp_jack_gpio.gpio = machine->gpio_hp_det;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 		tegra_rt5640_hp_jack_gpio.invert =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 			!!(machine->gpio_hp_det_flags & OF_GPIO_ACTIVE_LOW);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 		snd_soc_jack_add_gpios(&tegra_rt5640_hp_jack,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 						1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 						&tegra_rt5640_hp_jack_gpio);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) SND_SOC_DAILINK_DEFS(aif1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	DAILINK_COMP_ARRAY(COMP_EMPTY()),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5640-aif1")),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	DAILINK_COMP_ARRAY(COMP_EMPTY()));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) static struct snd_soc_dai_link tegra_rt5640_dai = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	.name = "RT5640",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	.stream_name = "RT5640 PCM",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	.init = tegra_rt5640_asoc_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	.ops = &tegra_rt5640_ops,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 			SND_SOC_DAIFMT_CBS_CFS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	SND_SOC_DAILINK_REG(aif1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) static struct snd_soc_card snd_soc_tegra_rt5640 = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	.name = "tegra-rt5640",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	.driver_name = "tegra",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	.owner = THIS_MODULE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	.dai_link = &tegra_rt5640_dai,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	.num_links = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	.controls = tegra_rt5640_controls,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	.num_controls = ARRAY_SIZE(tegra_rt5640_controls),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	.dapm_widgets = tegra_rt5640_dapm_widgets,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	.num_dapm_widgets = ARRAY_SIZE(tegra_rt5640_dapm_widgets),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	.fully_routed = true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) static int tegra_rt5640_probe(struct platform_device *pdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	struct device_node *np = pdev->dev.of_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	struct snd_soc_card *card = &snd_soc_tegra_rt5640;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	struct tegra_rt5640 *machine;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	machine = devm_kzalloc(&pdev->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 			sizeof(struct tegra_rt5640), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	if (!machine)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	card->dev = &pdev->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	snd_soc_card_set_drvdata(card, machine);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	machine->gpio_hp_det = of_get_named_gpio_flags(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		np, "nvidia,hp-det-gpios", 0, &machine->gpio_hp_det_flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	if (machine->gpio_hp_det == -EPROBE_DEFER)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 		return -EPROBE_DEFER;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	ret = snd_soc_of_parse_card_name(card, "nvidia,model");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	ret = snd_soc_of_parse_audio_routing(card, "nvidia,audio-routing");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	tegra_rt5640_dai.codecs->of_node = of_parse_phandle(np,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 			"nvidia,audio-codec", 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	if (!tegra_rt5640_dai.codecs->of_node) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 		dev_err(&pdev->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 			"Property 'nvidia,audio-codec' missing or invalid\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	tegra_rt5640_dai.cpus->of_node = of_parse_phandle(np,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 			"nvidia,i2s-controller", 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	if (!tegra_rt5640_dai.cpus->of_node) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		dev_err(&pdev->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 			"Property 'nvidia,i2s-controller' missing or invalid\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	tegra_rt5640_dai.platforms->of_node = tegra_rt5640_dai.cpus->of_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	ret = devm_snd_soc_register_card(&pdev->dev, card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	if (ret) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 			ret);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 		return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) static const struct of_device_id tegra_rt5640_of_match[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	{ .compatible = "nvidia,tegra-audio-rt5640", },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	{},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) static struct platform_driver tegra_rt5640_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	.driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		.name = DRV_NAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 		.pm = &snd_soc_pm_ops,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 		.of_match_table = tegra_rt5640_of_match,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	.probe = tegra_rt5640_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) module_platform_driver(tegra_rt5640_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) MODULE_DESCRIPTION("Tegra+RT5640 machine ASoC driver");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) MODULE_LICENSE("GPL v2");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) MODULE_ALIAS("platform:" DRV_NAME);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) MODULE_DEVICE_TABLE(of, tegra_rt5640_of_match);