Lines Matching refs:arizona
67 dev_err(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)
69 dev_warn(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)
71 dev_dbg(_fll->arizona->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__)
85 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in arizona_spk_ev() local
93 dev_crit(arizona->dev, in arizona_spk_ev()
98 regmap_update_bits_async(arizona->regmap, in arizona_spk_ev()
103 regmap_update_bits_async(arizona->regmap, in arizona_spk_ev()
116 struct arizona *arizona = data; in arizona_thermal_warn() local
120 ret = regmap_read(arizona->regmap, ARIZONA_INTERRUPT_RAW_STATUS_3, in arizona_thermal_warn()
123 dev_err(arizona->dev, "Failed to read thermal status: %d\n", in arizona_thermal_warn()
126 dev_crit(arizona->dev, "Thermal warning\n"); in arizona_thermal_warn()
134 struct arizona *arizona = data; in arizona_thermal_shutdown() local
138 ret = regmap_read(arizona->regmap, ARIZONA_INTERRUPT_RAW_STATUS_3, in arizona_thermal_shutdown()
141 dev_err(arizona->dev, "Failed to read thermal status: %d\n", in arizona_thermal_shutdown()
144 dev_crit(arizona->dev, "Thermal shutdown\n"); in arizona_thermal_shutdown()
145 ret = regmap_update_bits(arizona->regmap, in arizona_thermal_shutdown()
150 dev_crit(arizona->dev, in arizona_thermal_shutdown()
174 struct arizona *arizona = priv->arizona; in arizona_init_spk() local
181 switch (arizona->type) { in arizona_init_spk()
197 int arizona_init_spk_irqs(struct arizona *arizona) in arizona_init_spk_irqs() argument
201 ret = arizona_request_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT_WARN, in arizona_init_spk_irqs()
203 arizona); in arizona_init_spk_irqs()
205 dev_err(arizona->dev, in arizona_init_spk_irqs()
209 ret = arizona_request_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT, in arizona_init_spk_irqs()
211 arizona); in arizona_init_spk_irqs()
213 dev_err(arizona->dev, in arizona_init_spk_irqs()
221 int arizona_free_spk_irqs(struct arizona *arizona) in arizona_free_spk_irqs() argument
223 arizona_free_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT_WARN, arizona); in arizona_free_spk_irqs()
224 arizona_free_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT, arizona); in arizona_free_spk_irqs()
243 struct arizona *arizona = priv->arizona; in arizona_init_mono() local
247 if (arizona->pdata.out_mono[i]) in arizona_init_mono()
259 struct arizona *arizona = priv->arizona; in arizona_init_gpio() local
262 switch (arizona->type) { in arizona_init_gpio()
274 for (i = 0; i < ARRAY_SIZE(arizona->pdata.gpio_defaults); i++) { in arizona_init_gpio()
275 switch (arizona->pdata.gpio_defaults[i] & ARIZONA_GPN_FN_MASK) { in arizona_init_gpio()
293 int arizona_init_common(struct arizona *arizona) in arizona_init_common() argument
295 struct arizona_pdata *pdata = &arizona->pdata; in arizona_init_common()
299 BLOCKING_INIT_NOTIFIER_HEAD(&arizona->notifier); in arizona_init_common()
308 regmap_update_bits(arizona->regmap, in arizona_init_common()
315 regmap_update_bits(arizona->regmap, in arizona_init_common()
322 regmap_update_bits(arizona->regmap, in arizona_init_common()
334 switch (arizona->type) { in arizona_init_common()
337 regmap_update_bits(arizona->regmap, in arizona_init_common()
343 regmap_update_bits(arizona->regmap, in arizona_init_common()
362 regmap_update_bits(arizona->regmap, in arizona_init_common()
371 int arizona_init_vol_limit(struct arizona *arizona) in arizona_init_vol_limit() argument
375 for (i = 0; i < ARRAY_SIZE(arizona->pdata.out_vol_limit); ++i) { in arizona_init_vol_limit()
376 if (arizona->pdata.out_vol_limit[i]) in arizona_init_vol_limit()
377 regmap_update_bits(arizona->regmap, in arizona_init_vol_limit()
380 arizona->pdata.out_vol_limit[i]); in arizona_init_vol_limit()
958 struct arizona *arizona = priv->arizona; in arizona_out_ev() local
975 switch (arizona->type) { in arizona_out_ev()
1025 switch (arizona->type) { in arizona_out_ev()
1077 struct arizona *arizona = priv->arizona; in arizona_hp_ev() local
1096 priv->arizona->hp_ena &= ~mask; in arizona_hp_ev()
1097 priv->arizona->hp_ena |= val; in arizona_hp_ev()
1100 if (priv->arizona->hpdet_clamp) in arizona_hp_ev()
1103 regmap_update_bits_async(arizona->regmap, ARIZONA_OUTPUT_ENABLES_1, in arizona_hp_ev()
1113 struct arizona *arizona = priv->arizona; in arizona_dvfs_enable() local
1116 ret = regulator_set_voltage(arizona->dcvdd, 1800000, 1800000); in arizona_dvfs_enable()
1122 ret = regmap_update_bits(arizona->regmap, in arizona_dvfs_enable()
1128 regulator_set_voltage(arizona->dcvdd, 1200000, 1800000); in arizona_dvfs_enable()
1138 struct arizona *arizona = priv->arizona; in arizona_dvfs_disable() local
1141 ret = regmap_update_bits(arizona->regmap, in arizona_dvfs_disable()
1149 ret = regulator_set_voltage(arizona->dcvdd, 1200000, 1800000); in arizona_dvfs_disable()
1329 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in arizona_clk_ev() local
1334 ret = regmap_read(arizona->regmap, w->reg, &val); in arizona_clk_ev()
1355 return clk_prepare_enable(arizona->mclk[clk_idx]); in arizona_clk_ev()
1357 clk_disable_unprepare(arizona->mclk[clk_idx]); in arizona_clk_ev()
1369 struct arizona *arizona = priv->arizona; in arizona_set_sysclk() local
1424 dev_dbg(arizona->dev, "%s cleared\n", name); in arizona_set_sysclk()
1436 dev_dbg(arizona->dev, "%s set to %uHz", name, freq); in arizona_set_sysclk()
1438 return regmap_update_bits(arizona->regmap, reg, mask, val); in arizona_set_sysclk()
1446 struct arizona *arizona = priv->arizona; in arizona_set_fmt() local
1519 regmap_update_bits_async(arizona->regmap, base + ARIZONA_AIF_BCLK_CTRL, in arizona_set_fmt()
1523 regmap_update_bits_async(arizona->regmap, base + ARIZONA_AIF_TX_PIN_CTRL, in arizona_set_fmt()
1526 regmap_update_bits_async(arizona->regmap, in arizona_set_fmt()
1530 regmap_update_bits(arizona->regmap, base + ARIZONA_AIF_FORMAT, in arizona_set_fmt()
1654 struct arizona *arizona = priv->arizona; in arizona_wm5102_set_dac_comp() local
1662 mutex_lock(&arizona->dac_comp_lock); in arizona_wm5102_set_dac_comp()
1664 dac_comp[1].def = arizona->dac_comp_coeff; in arizona_wm5102_set_dac_comp()
1666 dac_comp[2].def = arizona->dac_comp_enabled; in arizona_wm5102_set_dac_comp()
1668 mutex_unlock(&arizona->dac_comp_lock); in arizona_wm5102_set_dac_comp()
1670 regmap_multi_reg_write(arizona->regmap, in arizona_wm5102_set_dac_comp()
1699 switch (priv->arizona->type) { in arizona_hw_params_rate()
1718 switch (priv->arizona->type) { in arizona_hw_params_rate()
1781 struct arizona *arizona = priv->arizona; in arizona_hw_params() local
1786 int chan_limit = arizona->pdata.max_channels_clocked[dai->id - 1]; in arizona_hw_params()
1787 int tdm_width = arizona->tdm_width[dai->id - 1]; in arizona_hw_params()
1788 int tdm_slots = arizona->tdm_slots[dai->id - 1]; in arizona_hw_params()
1854 regmap_update_bits_async(arizona->regmap, in arizona_hw_params()
1857 regmap_update_bits(arizona->regmap, in arizona_hw_params()
1866 regmap_update_bits_async(arizona->regmap, in arizona_hw_params()
1869 regmap_update_bits_async(arizona->regmap, in arizona_hw_params()
1872 regmap_update_bits_async(arizona->regmap, in arizona_hw_params()
1875 regmap_update_bits_async(arizona->regmap, in arizona_hw_params()
1879 regmap_update_bits(arizona->regmap, in arizona_hw_params()
1888 regmap_update_bits_async(arizona->regmap, in arizona_hw_params()
1891 regmap_update_bits(arizona->regmap, in arizona_hw_params()
1978 struct arizona *arizona = priv->arizona; in arizona_set_channels_to_mask() local
1986 regmap_write(arizona->regmap, base + i, slot); in arizona_set_channels_to_mask()
2000 struct arizona *arizona = priv->arizona; in arizona_set_tdm_slot() local
2019 arizona->tdm_width[dai->id - 1] = slot_width; in arizona_set_tdm_slot()
2020 arizona->tdm_slots[dai->id - 1] = slots; in arizona_set_tdm_slot()
2178 switch (fll->arizona->type) { in arizona_calc_fratio()
2184 if (fll->arizona->rev < 3 || sync) in arizona_calc_fratio()
2329 static void arizona_apply_fll(struct arizona *arizona, unsigned int base, in arizona_apply_fll() argument
2333 regmap_update_bits_async(arizona->regmap, base + 3, in arizona_apply_fll()
2335 regmap_update_bits_async(arizona->regmap, base + 4, in arizona_apply_fll()
2337 regmap_update_bits_async(arizona->regmap, base + 5, in arizona_apply_fll()
2340 regmap_update_bits_async(arizona->regmap, base + 6, in arizona_apply_fll()
2347 regmap_update_bits(arizona->regmap, base + 0x7, in arizona_apply_fll()
2351 regmap_update_bits(arizona->regmap, base + 0x5, in arizona_apply_fll()
2354 regmap_update_bits(arizona->regmap, base + 0x9, in arizona_apply_fll()
2359 regmap_update_bits_async(arizona->regmap, base + 2, in arizona_apply_fll()
2366 struct arizona *arizona = fll->arizona; in arizona_is_enabled_fll() local
2370 ret = regmap_read(arizona->regmap, base + 1, ®); in arizona_is_enabled_fll()
2382 struct arizona *arizona = fll->arizona; in arizona_set_fll_clks() local
2387 ret = regmap_read(arizona->regmap, base + 6, &val); in arizona_set_fll_clks()
2399 clk = arizona->mclk[ARIZONA_MCLK1]; in arizona_set_fll_clks()
2402 clk = arizona->mclk[ARIZONA_MCLK2]; in arizona_set_fll_clks()
2418 struct arizona *arizona = fll->arizona; in arizona_enable_fll() local
2433 regmap_update_bits(fll->arizona->regmap, fll->base + 1, in arizona_enable_fll()
2436 regmap_update_bits_async(fll->arizona->regmap, fll->base + 0x9, in arizona_enable_fll()
2456 arizona_apply_fll(arizona, fll->base, &cfg, fll->ref_src, in arizona_enable_fll()
2461 arizona_apply_fll(arizona, fll->base + 0x10, &cfg, in arizona_enable_fll()
2468 arizona_apply_fll(arizona, fll->base, &cfg, in arizona_enable_fll()
2471 regmap_update_bits_async(arizona->regmap, fll->base + 0x11, in arizona_enable_fll()
2486 regmap_update_bits_async(arizona->regmap, fll->base + 0x17, in arizona_enable_fll()
2489 regmap_update_bits_async(arizona->regmap, fll->base + 0x17, in arizona_enable_fll()
2494 pm_runtime_get_sync(arizona->dev); in arizona_enable_fll()
2498 regmap_update_bits_async(arizona->regmap, fll->base + 0x11, in arizona_enable_fll()
2503 regmap_update_bits_async(arizona->regmap, fll->base + 1, in arizona_enable_fll()
2507 regmap_update_bits_async(arizona->regmap, fll->base + 1, in arizona_enable_fll()
2518 regmap_read(arizona->regmap, in arizona_enable_fll()
2534 struct arizona *arizona = fll->arizona; in arizona_disable_fll() local
2537 regmap_update_bits_async(arizona->regmap, fll->base + 1, in arizona_disable_fll()
2539 regmap_update_bits_check(arizona->regmap, fll->base + 1, in arizona_disable_fll()
2541 regmap_update_bits_check(arizona->regmap, fll->base + 0x11, in arizona_disable_fll()
2543 regmap_update_bits_async(arizona->regmap, fll->base + 1, in arizona_disable_fll()
2551 pm_runtime_put_autosuspend(arizona->dev); in arizona_disable_fll()
2613 int arizona_init_fll(struct arizona *arizona, int id, int base, int lock_irq, in arizona_init_fll() argument
2620 fll->arizona = arizona; in arizona_init_fll()
2624 regmap_read(arizona->regmap, ARIZONA_CLOCK_32K_1, &val); in arizona_init_fll()
2639 regmap_update_bits(arizona->regmap, fll->base + 1, in arizona_init_fll()
2728 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in arizona_eq_coeff_put() local
2735 len = params->num_regs * regmap_get_val_bytes(arizona->regmap); in arizona_eq_coeff_put()
2748 dev_err(arizona->dev, "Rejecting unstable EQ coefficients\n"); in arizona_eq_coeff_put()
2753 ret = regmap_read(arizona->regmap, params->base, &val); in arizona_eq_coeff_put()
2760 ret = regmap_raw_write(arizona->regmap, params->base, data, len); in arizona_eq_coeff_put()
2772 struct arizona *arizona = dev_get_drvdata(component->dev->parent); in arizona_lhpf_coeff_put() local
2777 dev_err(arizona->dev, "Rejecting unstable LHPF coefficients\n"); in arizona_lhpf_coeff_put()
2785 int arizona_of_get_audio_pdata(struct arizona *arizona) in arizona_of_get_audio_pdata() argument
2787 struct arizona_pdata *pdata = &arizona->pdata; in arizona_of_get_audio_pdata()
2788 struct device_node *np = arizona->dev->of_node; in arizona_of_get_audio_pdata()