imx-card.c
Includes Linux kernel module headerAssigns a negative errno constant
SHA-256fe32ed8862922c5521b1bbc8c33334890f5ce1f0f6dc18f0e67e0596306e866f
MaleculeO(Er)H(Os)
Evidence
1// SPDX-License-Identifier: GPL-2.0+
2// Copyright 2017-2021 NXP
3
4#include <linux/module.h>
5#include <linux/init.h>
6#include <linux/slab.h>
7#include <linux/gpio/consumer.h>
8#include <linux/of.h>
9#include <linux/i2c.h>
10#include <linux/clk.h>
11#include <sound/soc.h>
12#include <sound/pcm_params.h>
13#include <sound/pcm.h>
14#include <sound/soc-dapm.h>
15#include <sound/simple_card_utils.h>
16
17#include "fsl_sai.h"
18
19#define IMX_CARD_MCLK_22P5792MHZ 22579200
20#define IMX_CARD_MCLK_24P576MHZ 24576000
21
22enum …
28:10… 42888,
29 CODEC_WM8524,
30};
31
32/*
33 * Mapping LRCK fs and frame width, table 3 & 4 in datasheet
34 * @rmin: min rate
35 * @rmax: max rate
36 * @wmin: min frame …
55/*
56 * struct imx_card_plat_data - specific info for codecs
57 *
58 * @fs_mul: ratio of mclk/fs for normal mode
59 * @tdm_fs_mul: ratio of mclk/fs for tdm …
569:36… num_links, sizeof(*link), GFP_KERNEL);
570 if (!card->dai_link)
571 return -ENOMEM;
572
573 data->link_data = devm_kcalloc(dev, num_links, sizeof(*link_data), GFP_KERNEL);
⋯4 lines
600:12… {
601 dev_err(dev, "%s: Can't find cpu DT node\n", link->name);
602 ret = -EINVAL;
603 goto err;
604 }
⋯5 lines