Lines Matching +full:tegra20 +full:- +full:das

1 // SPDX-License-Identifier: GPL-2.0-only
3 * tegra20_das.c - Tegra20 DAS driver
6 * Copyright (C) 2010 - NVIDIA, Inc.
17 #define DRV_NAME "tegra20-das"
85 * DAS: Digital audio switch (HW module controlled by this driver)
89 * The Tegra DAS is a mux/cross-bar which can connect each DAP to a specific
99 static inline void tegra20_das_write(struct tegra20_das *das, u32 reg, u32 val) in tegra20_das_write() argument
101 regmap_write(das->regmap, reg, val); in tegra20_das_write()
104 static void tegra20_das_connect_dap_to_dac(struct tegra20_das *das, int dap, int dac) in tegra20_das_connect_dap_to_dac() argument
113 tegra20_das_write(das, addr, reg); in tegra20_das_connect_dap_to_dac()
116 static void tegra20_das_connect_dac_to_dap(struct tegra20_das *das, int dac, int dap) in tegra20_das_connect_dac_to_dap() argument
127 tegra20_das_write(das, addr, reg); in tegra20_das_connect_dac_to_dap()
132 (TEGRA20_DAS_##name##_STRIDE * (TEGRA20_DAS_##name##_COUNT - 1)))
158 struct tegra20_das *das; in tegra20_das_probe() local
160 das = devm_kzalloc(&pdev->dev, sizeof(struct tegra20_das), GFP_KERNEL); in tegra20_das_probe()
161 if (!das) in tegra20_das_probe()
162 return -ENOMEM; in tegra20_das_probe()
168 das->regmap = devm_regmap_init_mmio(&pdev->dev, regs, in tegra20_das_probe()
170 if (IS_ERR(das->regmap)) { in tegra20_das_probe()
171 dev_err(&pdev->dev, "regmap init failed\n"); in tegra20_das_probe()
172 return PTR_ERR(das->regmap); in tegra20_das_probe()
175 tegra20_das_connect_dap_to_dac(das, TEGRA20_DAS_DAP_ID_1, in tegra20_das_probe()
177 tegra20_das_connect_dac_to_dap(das, TEGRA20_DAS_DAC_ID_1, in tegra20_das_probe()
179 tegra20_das_connect_dap_to_dac(das, TEGRA20_DAS_DAP_ID_3, in tegra20_das_probe()
181 tegra20_das_connect_dac_to_dap(das, TEGRA20_DAS_DAC_ID_3, in tegra20_das_probe()
188 { .compatible = "nvidia,tegra20-das", },
202 MODULE_DESCRIPTION("Tegra20 DAS driver");