Lines Matching full:cs42l43
3 // CS42L43 CODEC driver
14 #include <linux/mfd/cs42l43.h>
15 #include <linux/mfd/cs42l43-regs.h>
28 #include "cs42l43.h"
222 struct cs42l43 *cs42l43 = priv->core; in cs42l43_startup() local
223 int provider = !!regmap_test_bits(cs42l43->regmap, CS42L43_ASP_CLK_CONFIG2, in cs42l43_startup()
265 struct cs42l43 *cs42l43 = priv->core; in cs42l43_set_sample_rate() local
275 regmap_update_bits(cs42l43->regmap, CS42L43_SAMPLE_RATE1, in cs42l43_set_sample_rate()
286 struct cs42l43 *cs42l43 = priv->core; in cs42l43_asp_hw_params() local
287 int dsp_mode = !!regmap_test_bits(cs42l43->regmap, CS42L43_ASP_CTRL, in cs42l43_asp_hw_params()
289 int provider = !!regmap_test_bits(cs42l43->regmap, CS42L43_ASP_CLK_CONFIG2, in cs42l43_asp_hw_params()
326 regmap_update_bits(cs42l43->regmap, CS42L43_ASP_CLK_CONFIG1, in cs42l43_asp_hw_params()
330 regmap_update_bits(cs42l43->regmap, CS42L43_ASP_FSYNC_CTRL1, in cs42l43_asp_hw_params()
334 regmap_update_bits(cs42l43->regmap, CS42L43_ASP_FSYNC_CTRL4, in cs42l43_asp_hw_params()
358 regmap_update_bits(cs42l43->regmap, reg, in cs42l43_asp_hw_params()
375 struct cs42l43 *cs42l43 = priv->core; in cs42l43_asp_set_fmt() local
376 int provider = regmap_test_bits(cs42l43->regmap, CS42L43_ASP_CLK_CONFIG2, in cs42l43_asp_set_fmt()
443 regmap_update_bits(cs42l43->regmap, CS42L43_ASP_CTRL, in cs42l43_asp_set_fmt()
446 regmap_update_bits(cs42l43->regmap, CS42L43_ASP_DATA_CTRL, in cs42l43_asp_set_fmt()
450 regmap_update_bits(cs42l43->regmap, CS42L43_ASP_CLK_CONFIG2, in cs42l43_asp_set_fmt()
454 regmap_update_bits(cs42l43->regmap, CS42L43_ASP_FSYNC_CTRL3, in cs42l43_asp_set_fmt()
534 .name = "cs42l43-asp",
553 .name = "cs42l43-dp1",
565 .name = "cs42l43-dp2",
577 .name = "cs42l43-dp3",
589 .name = "cs42l43-dp4",
601 .name = "cs42l43-dp5",
613 .name = "cs42l43-dp6",
625 .name = "cs42l43-dp7",
911 struct cs42l43 *cs42l43 = priv->core; in cs42l43_spk_vu_sync() local
915 regmap_update_bits(cs42l43->regmap, CS42L43_INTP_VOLUME_CTRL1, in cs42l43_spk_vu_sync()
917 regmap_update_bits(cs42l43->regmap, CS42L43_INTP_VOLUME_CTRL1, in cs42l43_spk_vu_sync()
925 struct cs42l43 *cs42l43 = priv->core; in cs42l43_shutter_get() local
940 ret = regcache_drop_region(cs42l43->regmap, CS42L43_SHUTTER_CONTROL, in cs42l43_shutter_get()
947 ret = regmap_read(cs42l43->regmap, CS42L43_SHUTTER_CONTROL, &val); in cs42l43_shutter_get()
1150 struct cs42l43 *cs42l43 = priv->core; in cs42l43_eq_ev() local
1156 regmap_update_bits(cs42l43->regmap, CS42L43_MUTE_EQ_IN0, in cs42l43_eq_ev()
1160 regmap_update_bits(cs42l43->regmap, CS42L43_COEFF_RD_WR0, in cs42l43_eq_ev()
1164 regmap_write(cs42l43->regmap, CS42L43_COEFF_DATA_IN0, in cs42l43_eq_ev()
1167 regmap_update_bits(cs42l43->regmap, CS42L43_COEFF_RD_WR0, in cs42l43_eq_ev()
1172 ret = regmap_read_poll_timeout(cs42l43->regmap, CS42L43_INIT_DONE0, in cs42l43_eq_ev()
1178 regmap_update_bits(cs42l43->regmap, CS42L43_MUTE_EQ_IN0, in cs42l43_eq_ev()
1203 struct cs42l43 *cs42l43 = priv->core; in cs42l43_set_pll() local
1205 lockdep_assert_held(&cs42l43->pll_lock); in cs42l43_set_pll()
1210 if (regmap_test_bits(cs42l43->regmap, CS42L43_CTRL_REG, CS42L43_PLL_EN_MASK)) { in cs42l43_set_pll()
1237 struct cs42l43 *cs42l43 = priv->core; in cs42l43_enable_pll() local
1243 lockdep_assert_held(&cs42l43->pll_lock); in cs42l43_enable_pll()
1247 freq = cs42l43->sdw_freq; in cs42l43_enable_pll()
1248 else if (!cs42l43->sdw_freq) in cs42l43_enable_pll()
1249 cs42l43->sdw_freq = freq; in cs42l43_enable_pll()
1275 regmap_update_bits(cs42l43->regmap, CS42L43_PLL_CONTROL, in cs42l43_enable_pll()
1279 regmap_write(cs42l43->regmap, CS42L43_FDIV_FRAC, config->div); in cs42l43_enable_pll()
1280 regmap_update_bits(cs42l43->regmap, CS42L43_CTRL_REG, in cs42l43_enable_pll()
1284 regmap_update_bits(cs42l43->regmap, CS42L43_CAL_RATIO, in cs42l43_enable_pll()
1286 regmap_update_bits(cs42l43->regmap, CS42L43_PLL_CONTROL, in cs42l43_enable_pll()
1291 regmap_update_bits(cs42l43->regmap, CS42L43_CTRL_REG, in cs42l43_enable_pll()
1297 regmap_update_bits(cs42l43->regmap, CS42L43_CTRL_REG, in cs42l43_enable_pll()
1299 regmap_update_bits(cs42l43->regmap, CS42L43_PLL_CONTROL, in cs42l43_enable_pll()
1307 cs42l43->sdw_pll_active = true; in cs42l43_enable_pll()
1316 regmap_multi_reg_write(cs42l43->regmap, enable_seq, ARRAY_SIZE(enable_seq)); in cs42l43_enable_pll()
1327 struct cs42l43 *cs42l43 = priv->core; in cs42l43_disable_pll() local
1331 lockdep_assert_held(&cs42l43->pll_lock); in cs42l43_disable_pll()
1333 regmap_multi_reg_write(cs42l43->regmap, disable_seq, ARRAY_SIZE(disable_seq)); in cs42l43_disable_pll()
1334 regmap_update_bits(cs42l43->regmap, CS42L43_CTRL_REG, CS42L43_PLL_EN_MASK, 0); in cs42l43_disable_pll()
1335 regmap_update_bits(cs42l43->regmap, CS42L43_PLL_CONTROL, in cs42l43_disable_pll()
1338 cs42l43->sdw_pll_active = false; in cs42l43_disable_pll()
1348 struct cs42l43 *cs42l43 = priv->core; in cs42l43_pll_ev() local
1351 mutex_lock(&cs42l43->pll_lock); in cs42l43_pll_ev()
1376 mutex_unlock(&cs42l43->pll_lock); in cs42l43_pll_ev()
1436 struct cs42l43 *cs42l43 = priv->core; in cs42l43_hp_ev() local
1456 regmap_update_bits(cs42l43->regmap, CS42L43_BLOCK_EN8, in cs42l43_hp_ev()
1482 struct cs42l43 *cs42l43 = priv->core; in cs42l43_mic_ev() local
1521 ret = regmap_read(cs42l43->regmap, reg, val); in cs42l43_mic_ev()
1529 regmap_update_bits(cs42l43->regmap, reg, mute | ramp, mute); in cs42l43_mic_ev()
1532 regmap_update_bits(cs42l43->regmap, reg, mute | ramp, *val); in cs42l43_mic_ev()
1546 struct cs42l43 *cs42l43 = priv->core; in cs42l43_adc_ev() local
1564 regmap_update_bits(cs42l43->regmap, CS42L43_BLOCK_EN3, in cs42l43_adc_ev()
2000 struct cs42l43 *cs42l43 = priv->core; in cs42l43_set_sysclk() local
2003 mutex_lock(&cs42l43->pll_lock); in cs42l43_set_sysclk()
2005 mutex_unlock(&cs42l43->pll_lock); in cs42l43_set_sysclk()
2013 struct cs42l43 *cs42l43 = priv->core; in cs42l43_component_probe() local
2015 snd_soc_component_init_regmap(component, cs42l43->regmap); in cs42l43_component_probe()
2027 .name = "cs42l43-codec",
2137 struct cs42l43 *cs42l43 = dev_get_drvdata(pdev->dev.parent); in cs42l43_codec_probe() local
2143 dom = irq_find_matching_fwnode(dev_fwnode(cs42l43->dev), DOMAIN_BUS_ANY); in cs42l43_codec_probe()
2152 priv->core = cs42l43; in cs42l43_codec_probe()
2191 ret = regmap_read(cs42l43->regmap, CS42L43_SHUTTER_CONTROL, &val); in cs42l43_codec_probe()
2211 priv->mclk = clk_get_optional(cs42l43->dev, "mclk"); in cs42l43_codec_probe()
2263 { "cs42l43-codec", },
2270 .name = "cs42l43-codec",
2282 MODULE_DESCRIPTION("CS42L43 CODEC Driver");