Lines Matching +full:i2s +full:- +full:regs
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 // linux/sound/bcm/bcm63xx-i2s-whistler.c
3 // BCM63xx whistler i2s driver
5 // Author: Kevin-Ke Li <kevin-ke.li@broadcom.com>
8 #include <linux/dma-mapping.h>
14 #include "bcm63xx-i2s.h"
16 #define DRV_NAME "brcm-i2s"
81 ret = clk_set_rate(i2s_priv->i2s_clk, params_rate(params)); in bcm63xx_i2s_hw_params()
83 dev_err(i2s_priv->dev, in bcm63xx_i2s_hw_params()
94 struct regmap *regmap_i2s = i2s_priv->regmap_i2s; in bcm63xx_i2s_startup()
96 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bcm63xx_i2s_startup()
107 * if it is generating the clock for the I2S bus. The bus in bcm63xx_i2s_startup()
147 struct regmap *regmap_i2s = i2s_priv->regmap_i2s; in bcm63xx_i2s_shutdown()
149 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bcm63xx_i2s_shutdown()
227 void __iomem *regs; in bcm63xx_i2s_dev_probe() local
232 i2s_priv = devm_kzalloc(&pdev->dev, sizeof(*i2s_priv), GFP_KERNEL); in bcm63xx_i2s_dev_probe()
234 return -ENOMEM; in bcm63xx_i2s_dev_probe()
236 i2s_clk = devm_clk_get(&pdev->dev, "i2sclk"); in bcm63xx_i2s_dev_probe()
238 dev_err(&pdev->dev, "%s: cannot get a brcm clock: %ld\n", in bcm63xx_i2s_dev_probe()
243 regs = devm_platform_ioremap_resource(pdev, 0); in bcm63xx_i2s_dev_probe()
244 if (IS_ERR(regs)) { in bcm63xx_i2s_dev_probe()
245 ret = PTR_ERR(regs); in bcm63xx_i2s_dev_probe()
249 regmap_i2s = devm_regmap_init_mmio(&pdev->dev, in bcm63xx_i2s_dev_probe()
250 regs, &brcm_i2s_regmap_config); in bcm63xx_i2s_dev_probe()
258 ret = devm_snd_soc_register_component(&pdev->dev, in bcm63xx_i2s_dev_probe()
262 dev_err(&pdev->dev, "failed to register the dai\n"); in bcm63xx_i2s_dev_probe()
266 i2s_priv->dev = &pdev->dev; in bcm63xx_i2s_dev_probe()
267 i2s_priv->i2s_clk = i2s_clk; in bcm63xx_i2s_dev_probe()
268 i2s_priv->regmap_i2s = regmap_i2s; in bcm63xx_i2s_dev_probe()
269 dev_set_drvdata(&pdev->dev, i2s_priv); in bcm63xx_i2s_dev_probe()
273 dev_err(&pdev->dev, "failed to register the pcm\n"); in bcm63xx_i2s_dev_probe()
285 {.compatible = "brcm,bcm63xx-i2s"},
301 MODULE_AUTHOR("Kevin,Li <kevin-ke.li@broadcom.com>");
302 MODULE_DESCRIPTION("Broadcom DSL XPON ASOC I2S Interface");