drivers/net/wireless/realtek/rtw89/core.h
6546
struct rtw89_tas_info tas;
drivers/net/wireless/realtek/rtw89/phy.c
3500
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/phy.c
3505
if (!tas->enable || src == RTW89_SAR_SOURCE_NONE)
drivers/net/wireless/realtek/rtw89/phy.c
3518
tas->instant_txpwr = rtw89_db_to_linear(0);
drivers/net/wireless/realtek/rtw89/phy.c
3520
tas->instant_txpwr = DIV_ROUND_DOWN_ULL(linear, cur_idx);
drivers/net/wireless/realtek/rtw89/regd.c
850
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/regd.c
853
if (!tas->enable)
drivers/net/wireless/realtek/rtw89/regd.c
865
tas->block_regd = !(tas->enabled_countries & tas_country &&
drivers/net/wireless/realtek/rtw89/sar.c
246
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
249
if (!tas->enable)
drivers/net/wireless/realtek/rtw89/sar.c
279
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
295
switch (tas->state) {
drivers/net/wireless/realtek/rtw89/sar.c
360
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
369
rtw89_tas_state_str(tas->state));
drivers/net/wireless/realtek/rtw89/sar.c
371
tas->window_size * 2);
drivers/net/wireless/realtek/rtw89/sar.c
551
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
553
if (tas->state == state)
drivers/net/wireless/realtek/rtw89/sar.c
557
rtw89_tas_state_str(tas->state), rtw89_tas_state_str(state));
drivers/net/wireless/realtek/rtw89/sar.c
559
tas->state = state;
drivers/net/wireless/realtek/rtw89/sar.c
603
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
608
WARN_ON_ONCE(tas->window_size > RTW89_TAS_TXPWR_WINDOW);
drivers/net/wireless/realtek/rtw89/sar.c
610
if (tas->window_size == window_size)
drivers/net/wireless/realtek/rtw89/sar.c
614
tas->window_size, window_size);
drivers/net/wireless/realtek/rtw89/sar.c
616
head_idx = (tas->txpwr_tail_idx - window_size + 1 + RTW89_TAS_TXPWR_WINDOW) %
drivers/net/wireless/realtek/rtw89/sar.c
620
total_txpwr += tas->txpwr_history[j];
drivers/net/wireless/realtek/rtw89/sar.c
623
tas->window_size = window_size;
drivers/net/wireless/realtek/rtw89/sar.c
624
tas->total_txpwr = total_txpwr;
drivers/net/wireless/realtek/rtw89/sar.c
625
tas->txpwr_head_idx = head_idx;
drivers/net/wireless/realtek/rtw89/sar.c
632
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
644
instant_txpwr = tas->instant_txpwr;
drivers/net/wireless/realtek/rtw89/sar.c
648
tas->total_txpwr += txpwr - tas->txpwr_history[tas->txpwr_head_idx];
drivers/net/wireless/realtek/rtw89/sar.c
649
tas->total_tx_ratio += tx_ratio - tas->tx_ratio_history[tas->tx_ratio_idx];
drivers/net/wireless/realtek/rtw89/sar.c
650
tas->tx_ratio_history[tas->tx_ratio_idx] = tx_ratio;
drivers/net/wireless/realtek/rtw89/sar.c
652
tas->txpwr_head_idx = (tas->txpwr_head_idx + 1) % RTW89_TAS_TXPWR_WINDOW;
drivers/net/wireless/realtek/rtw89/sar.c
653
tas->txpwr_tail_idx = (tas->txpwr_tail_idx + 1) % RTW89_TAS_TXPWR_WINDOW;
drivers/net/wireless/realtek/rtw89/sar.c
654
tas->tx_ratio_idx = (tas->tx_ratio_idx + 1) % RTW89_TAS_TX_RATIO_WINDOW;
drivers/net/wireless/realtek/rtw89/sar.c
655
tas->txpwr_history[tas->txpwr_tail_idx] = txpwr;
drivers/net/wireless/realtek/rtw89/sar.c
665
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
672
linear = DIV_ROUND_DOWN_ULL(tas->total_txpwr, tas->window_size * PERCENT);
drivers/net/wireless/realtek/rtw89/sar.c
674
tx_ratio_avg = tas->total_tx_ratio / RTW89_TAS_TX_RATIO_WINDOW;
drivers/net/wireless/realtek/rtw89/sar.c
675
dpr_on_threshold = tas->dpr_on_threshold;
drivers/net/wireless/realtek/rtw89/sar.c
676
dpr_off_threshold = tas->dpr_off_threshold;
drivers/net/wireless/realtek/rtw89/sar.c
698
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
720
tas->enable = false;
drivers/net/wireless/realtek/rtw89/sar.c
723
tas->enable = true;
drivers/net/wireless/realtek/rtw89/sar.c
729
if (!tas->enable) {
drivers/net/wireless/realtek/rtw89/sar.c
734
tas->enabled_countries = ptr->enabled_countries;
drivers/net/wireless/realtek/rtw89/sar.c
743
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
754
tas->dpr_on_threshold = cfg - RTW89_TAS_SAR_GAP;
drivers/net/wireless/realtek/rtw89/sar.c
755
tas->dpr_off_threshold = cfg - RTW89_TAS_SAR_GAP - RTW89_TAS_DPR_GAP;
drivers/net/wireless/realtek/rtw89/sar.c
758
if (!force && tas->keep_history)
drivers/net/wireless/realtek/rtw89/sar.c
763
tas->txpwr_history[i] = linear;
drivers/net/wireless/realtek/rtw89/sar.c
766
tas->tx_ratio_history[i] = RTW89_TAS_DFLT_TX_RATIO;
drivers/net/wireless/realtek/rtw89/sar.c
768
tas->total_tx_ratio = RTW89_TAS_DFLT_TX_RATIO * RTW89_TAS_TX_RATIO_WINDOW;
drivers/net/wireless/realtek/rtw89/sar.c
769
tas->total_txpwr = linear * RTW89_TAS_TXPWR_WINDOW;
drivers/net/wireless/realtek/rtw89/sar.c
770
tas->window_size = RTW89_TAS_TXPWR_WINDOW;
drivers/net/wireless/realtek/rtw89/sar.c
771
tas->txpwr_head_idx = 0;
drivers/net/wireless/realtek/rtw89/sar.c
772
tas->txpwr_tail_idx = RTW89_TAS_TXPWR_WINDOW - 1;
drivers/net/wireless/realtek/rtw89/sar.c
773
tas->tx_ratio_idx = 0;
drivers/net/wireless/realtek/rtw89/sar.c
774
tas->state = RTW89_TAS_STATE_DPR_OFF;
drivers/net/wireless/realtek/rtw89/sar.c
775
tas->backup_state = RTW89_TAS_STATE_DPR_OFF;
drivers/net/wireless/realtek/rtw89/sar.c
776
tas->keep_history = true;
drivers/net/wireless/realtek/rtw89/sar.c
784
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
794
if (!rtw89_tas_query_sar_config(rtwdev, &cfg) || tas->block_regd)
drivers/net/wireless/realtek/rtw89/sar.c
797
if (tas->pause)
drivers/net/wireless/realtek/rtw89/sar.c
808
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
818
tas->backup_state = tas->state;
drivers/net/wireless/realtek/rtw89/sar.c
821
rtw89_tas_state_update(rtwdev, tas->backup_state);
drivers/net/wireless/realtek/rtw89/sar.c
828
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
839
tas->pause = true;
drivers/net/wireless/realtek/rtw89/sar.c
843
tas->pause = false;
drivers/net/wireless/realtek/rtw89/sar.c
854
struct rtw89_tas_info *tas = &rtwdev->tas;
drivers/net/wireless/realtek/rtw89/sar.c
856
if (!tas->enable)
drivers/target/target_core_tmr.c
269
bool tas,
drivers/target/target_core_tmr.c
325
rc = __target_check_io_state(cmd, tmr_sess, tas);
drivers/target/target_core_tmr.c
363
bool tas;
drivers/target/target_core_tmr.c
375
tas = dev->dev_attrib.emulate_tas;
drivers/target/target_core_tmr.c
403
dev->transport->name, tas);
drivers/target/target_core_tmr.c
405
core_tmr_drain_state_list(dev, prout_cmd, tmr_sess, tas,
drivers/target/target_core_tmr.c
72
struct se_session *tmr_sess, bool tas)
drivers/target/target_core_tmr.c
97
if ((tmr_sess != se_cmd->se_sess) && tas)
drivers/target/target_core_transport.c
2960
static void target_wait_free_cmd(struct se_cmd *cmd, bool *aborted, bool *tas)
drivers/target/target_core_transport.c
2965
__transport_wait_for_tasks(cmd, true, aborted, tas, &flags);
drivers/target/target_core_transport.c
3010
bool aborted = false, tas = false;
drivers/target/target_core_transport.c
3013
target_wait_free_cmd(cmd, &aborted, &tas);
drivers/target/target_core_transport.c
3292
bool *aborted, bool *tas, unsigned long *flags)
drivers/target/target_core_transport.c
3305
*tas = true;
drivers/target/target_core_transport.c
3347
bool ret, aborted = false, tas = false;
drivers/target/target_core_transport.c
3350
ret = __transport_wait_for_tasks(cmd, false, &aborted, &tas, &flags);
drivers/target/target_core_transport.c
834
bool tas = cmd->transport_state & CMD_T_TAS;
drivers/target/target_core_transport.c
838
pr_debug("tag %#llx: send_abort_response = %d\n", cmd->tag, tas);
drivers/target/target_core_transport.c
840
if (tas) {
sound/aoa/codecs/tas.c
100
static int tas_reset_init(struct tas *tas);
sound/aoa/codecs/tas.c
102
static struct tas *codec_to_tas(struct aoa_codec *codec)
sound/aoa/codecs/tas.c
104
return container_of(codec, struct tas, codec);
sound/aoa/codecs/tas.c
107
static inline int tas_write_reg(struct tas *tas, u8 reg, u8 len, u8 *data)
sound/aoa/codecs/tas.c
110
return i2c_smbus_write_byte_data(tas->i2c, reg, *data);
sound/aoa/codecs/tas.c
112
return i2c_smbus_write_i2c_block_data(tas->i2c, reg, len, data);
sound/aoa/codecs/tas.c
115
static void tas3004_set_drc(struct tas *tas)
sound/aoa/codecs/tas.c
119
if (tas->drc_enabled)
sound/aoa/codecs/tas.c
124
if (tas->drc_range > 0xef)
sound/aoa/codecs/tas.c
126
else if (tas->drc_range < 0)
sound/aoa/codecs/tas.c
129
val[2] = tas->drc_range;
sound/aoa/codecs/tas.c
134
tas_write_reg(tas, TAS_REG_DRC, 6, val);
sound/aoa/codecs/tas.c
137
static void tas_set_treble(struct tas *tas)
sound/aoa/codecs/tas.c
141
tmp = tas3004_treble(tas->treble);
sound/aoa/codecs/tas.c
142
tas_write_reg(tas, TAS_REG_TREBLE, 1, &tmp);
sound/aoa/codecs/tas.c
145
static void tas_set_bass(struct tas *tas)
sound/aoa/codecs/tas.c
149
tmp = tas3004_bass(tas->bass);
sound/aoa/codecs/tas.c
150
tas_write_reg(tas, TAS_REG_BASS, 1, &tmp);
sound/aoa/codecs/tas.c
153
static void tas_set_volume(struct tas *tas)
sound/aoa/codecs/tas.c
159
left = tas->cached_volume_l;
sound/aoa/codecs/tas.c
160
right = tas->cached_volume_r;
sound/aoa/codecs/tas.c
165
if (tas->mute_l) left = 0;
sound/aoa/codecs/tas.c
166
if (tas->mute_r) right = 0;
sound/aoa/codecs/tas.c
182
tas_write_reg(tas, TAS_REG_VOL, 6, block);
sound/aoa/codecs/tas.c
185
static void tas_set_mixer(struct tas *tas)
sound/aoa/codecs/tas.c
192
val = tas->mixer_l[i];
sound/aoa/codecs/tas.c
199
tas_write_reg(tas, TAS_REG_LMIX, 9, block);
sound/aoa/codecs/tas.c
202
val = tas->mixer_r[i];
sound/aoa/codecs/tas.c
209
tas_write_reg(tas, TAS_REG_RMIX, 9, block);
sound/aoa/codecs/tas.c
236
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
238
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
239
ucontrol->value.integer.value[0] = tas->cached_volume_l;
sound/aoa/codecs/tas.c
240
ucontrol->value.integer.value[1] = tas->cached_volume_r;
sound/aoa/codecs/tas.c
247
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
256
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
257
if (tas->cached_volume_l == ucontrol->value.integer.value[0]
sound/aoa/codecs/tas.c
258
&& tas->cached_volume_r == ucontrol->value.integer.value[1])
sound/aoa/codecs/tas.c
261
tas->cached_volume_l = ucontrol->value.integer.value[0];
sound/aoa/codecs/tas.c
262
tas->cached_volume_r = ucontrol->value.integer.value[1];
sound/aoa/codecs/tas.c
263
if (tas->hw_enabled)
sound/aoa/codecs/tas.c
264
tas_set_volume(tas);
sound/aoa/codecs/tas.c
282
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
284
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
285
ucontrol->value.integer.value[0] = !tas->mute_l;
sound/aoa/codecs/tas.c
286
ucontrol->value.integer.value[1] = !tas->mute_r;
sound/aoa/codecs/tas.c
293
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
295
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
296
if (tas->mute_l == !ucontrol->value.integer.value[0]
sound/aoa/codecs/tas.c
297
&& tas->mute_r == !ucontrol->value.integer.value[1])
sound/aoa/codecs/tas.c
300
tas->mute_l = !ucontrol->value.integer.value[0];
sound/aoa/codecs/tas.c
301
tas->mute_r = !ucontrol->value.integer.value[1];
sound/aoa/codecs/tas.c
302
if (tas->hw_enabled)
sound/aoa/codecs/tas.c
303
tas_set_volume(tas);
sound/aoa/codecs/tas.c
329
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
332
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
333
ucontrol->value.integer.value[0] = tas->mixer_l[idx];
sound/aoa/codecs/tas.c
334
ucontrol->value.integer.value[1] = tas->mixer_r[idx];
sound/aoa/codecs/tas.c
342
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
345
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
346
if (tas->mixer_l[idx] == ucontrol->value.integer.value[0]
sound/aoa/codecs/tas.c
347
&& tas->mixer_r[idx] == ucontrol->value.integer.value[1])
sound/aoa/codecs/tas.c
350
tas->mixer_l[idx] = ucontrol->value.integer.value[0];
sound/aoa/codecs/tas.c
351
tas->mixer_r[idx] = ucontrol->value.integer.value[1];
sound/aoa/codecs/tas.c
353
if (tas->hw_enabled)
sound/aoa/codecs/tas.c
354
tas_set_mixer(tas);
sound/aoa/codecs/tas.c
385
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
387
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
388
ucontrol->value.integer.value[0] = tas->drc_range;
sound/aoa/codecs/tas.c
395
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
401
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
402
if (tas->drc_range == ucontrol->value.integer.value[0])
sound/aoa/codecs/tas.c
405
tas->drc_range = ucontrol->value.integer.value[0];
sound/aoa/codecs/tas.c
406
if (tas->hw_enabled)
sound/aoa/codecs/tas.c
407
tas3004_set_drc(tas);
sound/aoa/codecs/tas.c
425
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
427
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
428
ucontrol->value.integer.value[0] = tas->drc_enabled;
sound/aoa/codecs/tas.c
435
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
437
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
438
if (tas->drc_enabled == ucontrol->value.integer.value[0])
sound/aoa/codecs/tas.c
441
tas->drc_enabled = !!ucontrol->value.integer.value[0];
sound/aoa/codecs/tas.c
442
if (tas->hw_enabled)
sound/aoa/codecs/tas.c
443
tas3004_set_drc(tas);
sound/aoa/codecs/tas.c
467
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
469
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
470
ucontrol->value.enumerated.item[0] = !!(tas->acr & TAS_ACR_INPUT_B);
sound/aoa/codecs/tas.c
477
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
482
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
483
oldacr = tas->acr;
sound/aoa/codecs/tas.c
490
tas->acr &= ~(TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL);
sound/aoa/codecs/tas.c
492
tas->acr |= TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL |
sound/aoa/codecs/tas.c
494
if (oldacr == tas->acr)
sound/aoa/codecs/tas.c
496
if (tas->hw_enabled)
sound/aoa/codecs/tas.c
497
tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr);
sound/aoa/codecs/tas.c
534
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
536
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
537
ucontrol->value.integer.value[0] = tas->treble;
sound/aoa/codecs/tas.c
544
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
549
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
550
if (tas->treble == ucontrol->value.integer.value[0])
sound/aoa/codecs/tas.c
553
tas->treble = ucontrol->value.integer.value[0];
sound/aoa/codecs/tas.c
554
if (tas->hw_enabled)
sound/aoa/codecs/tas.c
555
tas_set_treble(tas);
sound/aoa/codecs/tas.c
581
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
583
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
584
ucontrol->value.integer.value[0] = tas->bass;
sound/aoa/codecs/tas.c
591
struct tas *tas = snd_kcontrol_chip(kcontrol);
sound/aoa/codecs/tas.c
596
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
597
if (tas->bass == ucontrol->value.integer.value[0])
sound/aoa/codecs/tas.c
600
tas->bass = ucontrol->value.integer.value[0];
sound/aoa/codecs/tas.c
601
if (tas->hw_enabled)
sound/aoa/codecs/tas.c
602
tas_set_bass(tas);
sound/aoa/codecs/tas.c
638
static int tas_reset_init(struct tas *tas)
sound/aoa/codecs/tas.c
642
tas->codec.gpio->methods->all_amps_off(tas->codec.gpio);
sound/aoa/codecs/tas.c
644
tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0);
sound/aoa/codecs/tas.c
646
tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 1);
sound/aoa/codecs/tas.c
648
tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0);
sound/aoa/codecs/tas.c
650
tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio);
sound/aoa/codecs/tas.c
653
if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp))
sound/aoa/codecs/tas.c
656
tas->acr |= TAS_ACR_ANALOG_PDOWN;
sound/aoa/codecs/tas.c
657
if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
sound/aoa/codecs/tas.c
661
if (tas_write_reg(tas, TAS_REG_MCS2, 1, &tmp))
sound/aoa/codecs/tas.c
664
tas3004_set_drc(tas);
sound/aoa/codecs/tas.c
667
tas->treble = TAS3004_TREBLE_ZERO;
sound/aoa/codecs/tas.c
668
tas->bass = TAS3004_BASS_ZERO;
sound/aoa/codecs/tas.c
669
tas_set_treble(tas);
sound/aoa/codecs/tas.c
670
tas_set_bass(tas);
sound/aoa/codecs/tas.c
672
tas->acr &= ~TAS_ACR_ANALOG_PDOWN;
sound/aoa/codecs/tas.c
673
if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
sound/aoa/codecs/tas.c
683
struct tas *tas = cii->codec_data;
sound/aoa/codecs/tas.c
688
tas->codec.gpio->methods->all_amps_off(tas->codec.gpio);
sound/aoa/codecs/tas.c
689
tas->hw_enabled = 0;
sound/aoa/codecs/tas.c
693
scoped_guard(mutex, &tas->mtx) {
sound/aoa/codecs/tas.c
694
tas_reset_init(tas);
sound/aoa/codecs/tas.c
695
tas_set_volume(tas);
sound/aoa/codecs/tas.c
696
tas_set_mixer(tas);
sound/aoa/codecs/tas.c
697
tas->hw_enabled = 1;
sound/aoa/codecs/tas.c
698
tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio);
sound/aoa/codecs/tas.c
712
static int tas_suspend(struct tas *tas)
sound/aoa/codecs/tas.c
714
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
715
tas->hw_enabled = 0;
sound/aoa/codecs/tas.c
716
tas->acr |= TAS_ACR_ANALOG_PDOWN;
sound/aoa/codecs/tas.c
717
tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr);
sound/aoa/codecs/tas.c
721
static int tas_resume(struct tas *tas)
sound/aoa/codecs/tas.c
724
guard(mutex)(&tas->mtx);
sound/aoa/codecs/tas.c
725
tas_reset_init(tas);
sound/aoa/codecs/tas.c
726
tas_set_volume(tas);
sound/aoa/codecs/tas.c
727
tas_set_mixer(tas);
sound/aoa/codecs/tas.c
728
tas->hw_enabled = 1;
sound/aoa/codecs/tas.c
763
struct tas *tas = codec_to_tas(codec);
sound/aoa/codecs/tas.c
766
if (!tas->codec.gpio || !tas->codec.gpio->methods) {
sound/aoa/codecs/tas.c
771
scoped_guard(mutex, &tas->mtx) {
sound/aoa/codecs/tas.c
772
if (tas_reset_init(tas)) {
sound/aoa/codecs/tas.c
776
tas->hw_enabled = 1;
sound/aoa/codecs/tas.c
779
if (tas->codec.soundbus_dev->attach_codec(tas->codec.soundbus_dev,
sound/aoa/codecs/tas.c
781
&tas_codec_info, tas)) {
sound/aoa/codecs/tas.c
786
if (aoa_snd_device_new(SNDRV_DEV_CODEC, tas, &ops)) {
sound/aoa/codecs/tas.c
790
err = aoa_snd_ctl_add(snd_ctl_new1(&volume_control, tas));
sound/aoa/codecs/tas.c
794
err = aoa_snd_ctl_add(snd_ctl_new1(&mute_control, tas));
sound/aoa/codecs/tas.c
798
err = aoa_snd_ctl_add(snd_ctl_new1(&pcm1_control, tas));
sound/aoa/codecs/tas.c
802
err = aoa_snd_ctl_add(snd_ctl_new1(&monitor_control, tas));
sound/aoa/codecs/tas.c
806
err = aoa_snd_ctl_add(snd_ctl_new1(&capture_source_control, tas));
sound/aoa/codecs/tas.c
810
err = aoa_snd_ctl_add(snd_ctl_new1(&drc_range_control, tas));
sound/aoa/codecs/tas.c
814
err = aoa_snd_ctl_add(snd_ctl_new1(&drc_switch_control, tas));
sound/aoa/codecs/tas.c
818
err = aoa_snd_ctl_add(snd_ctl_new1(&treble_control, tas));
sound/aoa/codecs/tas.c
822
err = aoa_snd_ctl_add(snd_ctl_new1(&bass_control, tas));
sound/aoa/codecs/tas.c
828
tas->codec.soundbus_dev->detach_codec(tas->codec.soundbus_dev, tas);
sound/aoa/codecs/tas.c
829
snd_device_free(aoa_get_card(), tas);
sound/aoa/codecs/tas.c
835
struct tas *tas = codec_to_tas(codec);
sound/aoa/codecs/tas.c
837
if (!tas->codec.soundbus_dev)
sound/aoa/codecs/tas.c
839
tas->codec.soundbus_dev->detach_codec(tas->codec.soundbus_dev, tas);
sound/aoa/codecs/tas.c
846
struct tas *tas;
sound/aoa/codecs/tas.c
848
tas = kzalloc_obj(struct tas);
sound/aoa/codecs/tas.c
850
if (!tas)
sound/aoa/codecs/tas.c
853
mutex_init(&tas->mtx);
sound/aoa/codecs/tas.c
854
tas->i2c = client;
sound/aoa/codecs/tas.c
855
i2c_set_clientdata(client, tas);
sound/aoa/codecs/tas.c
858
tas->drc_range = TAS3004_DRC_MAX / 2;
sound/aoa/codecs/tas.c
860
strscpy(tas->codec.name, "tas");
sound/aoa/codecs/tas.c
861
tas->codec.owner = THIS_MODULE;
sound/aoa/codecs/tas.c
862
tas->codec.init = tas_init_codec;
sound/aoa/codecs/tas.c
863
tas->codec.exit = tas_exit_codec;
sound/aoa/codecs/tas.c
864
tas->codec.node = of_node_get(node);
sound/aoa/codecs/tas.c
866
if (aoa_codec_register(&tas->codec)) {
sound/aoa/codecs/tas.c
874
mutex_destroy(&tas->mtx);
sound/aoa/codecs/tas.c
875
of_node_put(tas->codec.node);
sound/aoa/codecs/tas.c
876
kfree(tas);
sound/aoa/codecs/tas.c
882
struct tas *tas = i2c_get_clientdata(client);
sound/aoa/codecs/tas.c
885
aoa_codec_unregister(&tas->codec);
sound/aoa/codecs/tas.c
886
of_node_put(tas->codec.node);
sound/aoa/codecs/tas.c
889
tas_write_reg(tas, TAS_REG_ACR, 1, &tmp);
sound/aoa/codecs/tas.c
891
mutex_destroy(&tas->mtx);
sound/aoa/codecs/tas.c
892
kfree(tas);
sound/soc/codecs/tas675x.c
1052
static void tas675x_program_slot_offsets(struct tas675x_priv *tas,
sound/soc/codecs/tas675x.c
1060
if (tas->audio_slot >= 0)
sound/soc/codecs/tas675x.c
1061
offset = tas->audio_slot * slot_width;
sound/soc/codecs/tas675x.c
1062
else if (tas->tx_mask)
sound/soc/codecs/tas675x.c
1063
offset = __ffs(tas->tx_mask) * slot_width;
sound/soc/codecs/tas675x.c
1066
offset += tas->bclk_offset;
sound/soc/codecs/tas675x.c
1067
regmap_update_bits(tas->regmap, TAS675X_SDIN_OFFSET_MSB_REG,
sound/soc/codecs/tas675x.c
1070
regmap_write(tas->regmap, TAS675X_SDIN_AUDIO_OFFSET_REG,
sound/soc/codecs/tas675x.c
1079
if (tas->llp_slot >= 0)
sound/soc/codecs/tas675x.c
1080
offset = tas->llp_slot * slot_width;
sound/soc/codecs/tas675x.c
1081
else if (tas->tx_mask)
sound/soc/codecs/tas675x.c
1082
offset = __ffs(tas->tx_mask) * slot_width;
sound/soc/codecs/tas675x.c
1085
offset += tas->bclk_offset;
sound/soc/codecs/tas675x.c
1086
regmap_update_bits(tas->regmap, TAS675X_SDIN_OFFSET_MSB_REG,
sound/soc/codecs/tas675x.c
1089
regmap_write(tas->regmap, TAS675X_SDIN_LL_OFFSET_REG,
sound/soc/codecs/tas675x.c
1094
if (!tas->slot_width)
sound/soc/codecs/tas675x.c
1096
if (tas->vpredict_slot >= 0) {
sound/soc/codecs/tas675x.c
1097
offset = tas->vpredict_slot * slot_width;
sound/soc/codecs/tas675x.c
1098
offset += tas->bclk_offset;
sound/soc/codecs/tas675x.c
1099
regmap_update_bits(tas->regmap, TAS675X_SDOUT_OFFSET_MSB_REG,
sound/soc/codecs/tas675x.c
1102
regmap_write(tas->regmap, TAS675X_VPREDICT_OFFSET_REG,
sound/soc/codecs/tas675x.c
1105
if (tas->isense_slot >= 0) {
sound/soc/codecs/tas675x.c
1106
offset = tas->isense_slot * slot_width;
sound/soc/codecs/tas675x.c
1107
offset += tas->bclk_offset;
sound/soc/codecs/tas675x.c
1108
regmap_update_bits(tas->regmap, TAS675X_SDOUT_OFFSET_MSB_REG,
sound/soc/codecs/tas675x.c
1111
regmap_write(tas->regmap, TAS675X_ISENSE_OFFSET_REG,
sound/soc/codecs/tas675x.c
1118
dev_warn(tas->dev,
sound/soc/codecs/tas675x.c
1128
struct tas675x_priv *tas = snd_soc_component_get_drvdata(component);
sound/soc/codecs/tas675x.c
113
static inline int tas675x_set_state_all(struct tas675x_priv *tas, u8 state)
sound/soc/codecs/tas675x.c
1136
if ((READ_ONCE(tas->active_playback_dais) || READ_ONCE(tas->active_capture_dais)) &&
sound/soc/codecs/tas675x.c
1137
tas->rate && tas->rate != rate) {
sound/soc/codecs/tas675x.c
1140
rate, tas->rate);
sound/soc/codecs/tas675x.c
1172
tas->saved_rtldg_en = val;
sound/soc/codecs/tas675x.c
1181
} else if (tas->saved_rtldg_en) {
sound/soc/codecs/tas675x.c
1196
tas->saved_rtldg_en);
sound/soc/codecs/tas675x.c
1198
tas->saved_rtldg_en = 0;
sound/soc/codecs/tas675x.c
120
return regmap_multi_reg_write(tas->regmap, seq, ARRAY_SIZE(seq));
sound/soc/codecs/tas675x.c
1214
tas675x_program_slot_offsets(tas, dai->id,
sound/soc/codecs/tas675x.c
1215
tas->slot_width ?: params_width(params));
sound/soc/codecs/tas675x.c
1217
tas->rate = rate;
sound/soc/codecs/tas675x.c
1225
struct tas675x_priv *tas = snd_soc_component_get_drvdata(component);
sound/soc/codecs/tas675x.c
1256
tas->bclk_offset = 0;
sound/soc/codecs/tas675x.c
1266
tas->bclk_offset = 0;
sound/soc/codecs/tas675x.c
1276
tas->bclk_offset = 0;
sound/soc/codecs/tas675x.c
1287
tas->bclk_offset = 1;
sound/soc/codecs/tas675x.c
1299
tas->bclk_offset = 0;
sound/soc/codecs/tas675x.c
1320
if (tas->vpredict_slot >= 0)
sound/soc/codecs/tas675x.c
1322
if (tas->isense_slot >= 0)
sound/soc/codecs/tas675x.c
1329
if (tas->vpredict_slot >= 0 && tas->isense_slot >= 0 &&
sound/soc/codecs/tas675x.c
1330
abs(tas->vpredict_slot - tas->isense_slot) < 4)
sound/soc/codecs/tas675x.c
1335
if (tas->vpredict_slot >= 0)
sound/soc/codecs/tas675x.c
1338
else if (tas->isense_slot >= 0)
sound/soc/codecs/tas675x.c
1347
tas->gpio1_func != TAS675X_GPIO_SEL_SDOUT2 &&
sound/soc/codecs/tas675x.c
1348
tas->gpio2_func != TAS675X_GPIO_SEL_SDOUT2)
sound/soc/codecs/tas675x.c
136
static inline int __tas675x_select_book(struct tas675x_priv *tas, u8 book)
sound/soc/codecs/tas675x.c
1360
struct tas675x_priv *tas = snd_soc_component_get_drvdata(dai->component);
sound/soc/codecs/tas675x.c
1363
tas->slot_width = 0;
sound/soc/codecs/tas675x.c
1364
tas->tx_mask = 0;
sound/soc/codecs/tas675x.c
1369
tas->slot_width = slot_width;
sound/soc/codecs/tas675x.c
1370
tas->tx_mask = tx_mask;
sound/soc/codecs/tas675x.c
1377
struct tas675x_priv *tas = snd_soc_component_get_drvdata(component);
sound/soc/codecs/tas675x.c
138
struct i2c_client *client = to_i2c_client(tas->dev);
sound/soc/codecs/tas675x.c
1383
clear_bit(dai->id, &tas->active_capture_dais);
sound/soc/codecs/tas675x.c
1385
set_bit(dai->id, &tas->active_capture_dais);
sound/soc/codecs/tas675x.c
1395
clear_bit(dai->id, &tas->active_playback_dais);
sound/soc/codecs/tas675x.c
1397
set_bit(dai->id, &tas->active_playback_dais);
sound/soc/codecs/tas675x.c
1400
if (mute && !READ_ONCE(tas->active_playback_dais)) {
sound/soc/codecs/tas675x.c
1401
ret = tas675x_set_state_all(tas, TAS675X_STATE_SLEEP_BOTH);
sound/soc/codecs/tas675x.c
1402
regmap_read(tas->regmap, TAS675X_CLK_FAULT_LATCHED_REG, &discard);
sound/soc/codecs/tas675x.c
1406
return tas675x_set_state_all(tas,
sound/soc/codecs/tas675x.c
1407
READ_ONCE(tas->active_playback_dais) ?
sound/soc/codecs/tas675x.c
1467
static int tas675x_hw_enable(struct tas675x_priv *tas)
sound/soc/codecs/tas675x.c
1471
ret = regulator_bulk_enable(ARRAY_SIZE(tas->supplies), tas->supplies);
sound/soc/codecs/tas675x.c
1473
dev_err(tas->dev, "Failed to enable regulators: %d\n", ret);
sound/soc/codecs/tas675x.c
1477
if (!IS_ERR(tas->vbat)) {
sound/soc/codecs/tas675x.c
1478
ret = regulator_enable(tas->vbat);
sound/soc/codecs/tas675x.c
1480
dev_err(tas->dev, "Failed to enable vbat: %d\n", ret);
sound/soc/codecs/tas675x.c
1481
regulator_bulk_disable(ARRAY_SIZE(tas->supplies), tas->supplies);
sound/soc/codecs/tas675x.c
1486
if (tas->pd_gpio && tas->stby_gpio) {
sound/soc/codecs/tas675x.c
149
static int tas675x_dsp_mem_write(struct tas675x_priv *tas, u8 page, u8 reg, u32 val)
sound/soc/codecs/tas675x.c
1492
gpiod_set_value_cansleep(tas->pd_gpio, 0);
sound/soc/codecs/tas675x.c
1496
gpiod_set_value_cansleep(tas->stby_gpio, 0);
sound/soc/codecs/tas675x.c
1498
} else if (tas->pd_gpio) {
sound/soc/codecs/tas675x.c
1504
gpiod_set_value_cansleep(tas->pd_gpio, 0);
sound/soc/codecs/tas675x.c
151
struct i2c_client *client = to_i2c_client(tas->dev);
sound/soc/codecs/tas675x.c
1513
gpiod_set_value_cansleep(tas->stby_gpio, 0);
sound/soc/codecs/tas675x.c
1520
static void tas675x_hw_disable(struct tas675x_priv *tas)
sound/soc/codecs/tas675x.c
1522
if (tas->stby_gpio)
sound/soc/codecs/tas675x.c
1523
gpiod_set_value_cansleep(tas->stby_gpio, 1);
sound/soc/codecs/tas675x.c
1525
if (tas->pd_gpio)
sound/soc/codecs/tas675x.c
1526
gpiod_set_value_cansleep(tas->pd_gpio, 1);
sound/soc/codecs/tas675x.c
1534
if (!IS_ERR(tas->vbat))
sound/soc/codecs/tas675x.c
1535
regulator_disable(tas->vbat);
sound/soc/codecs/tas675x.c
1537
regulator_bulk_disable(ARRAY_SIZE(tas->supplies), tas->supplies);
sound/soc/codecs/tas675x.c
1544
static int tas675x_init_device(struct tas675x_priv *tas)
sound/soc/codecs/tas675x.c
1546
struct regmap *regmap = tas->regmap;
sound/soc/codecs/tas675x.c
1554
if (tas->fast_boot)
sound/soc/codecs/tas675x.c
1570
tas675x_set_state_all(tas, TAS675X_STATE_SLEEP_BOTH);
sound/soc/codecs/tas675x.c
1594
for (i = 0; i < ARRAY_SIZE(tas->dsp_params); i++) {
sound/soc/codecs/tas675x.c
1595
if (tas->dsp_params[i].val)
sound/soc/codecs/tas675x.c
1596
tas675x_dsp_mem_write(tas,
sound/soc/codecs/tas675x.c
1597
tas->dsp_params[i].page,
sound/soc/codecs/tas675x.c
1598
tas->dsp_params[i].reg,
sound/soc/codecs/tas675x.c
1599
tas->dsp_params[i].val);
sound/soc/codecs/tas675x.c
1621
if (tas->gpio1_func >= 0 || tas->gpio2_func >= 0) {
sound/soc/codecs/tas675x.c
1624
tas675x_config_gpio_pin(regmap, tas->gpio1_func,
sound/soc/codecs/tas675x.c
1627
tas675x_config_gpio_pin(regmap, tas->gpio2_func,
sound/soc/codecs/tas675x.c
1634
if (tas->fast_boot)
sound/soc/codecs/tas675x.c
165
mutex_lock(&tas->io_lock);
sound/soc/codecs/tas675x.c
1651
dev_err(tas->dev, "Init device failed: %d\n", ret);
sound/soc/codecs/tas675x.c
1655
static void tas675x_power_off(struct tas675x_priv *tas)
sound/soc/codecs/tas675x.c
1657
regcache_cache_only(tas->regmap, true);
sound/soc/codecs/tas675x.c
1658
regcache_mark_dirty(tas->regmap);
sound/soc/codecs/tas675x.c
1659
tas675x_hw_disable(tas);
sound/soc/codecs/tas675x.c
1662
static int tas675x_power_on(struct tas675x_priv *tas)
sound/soc/codecs/tas675x.c
1666
ret = tas675x_hw_enable(tas);
sound/soc/codecs/tas675x.c
167
ret = __tas675x_select_book(tas, TAS675X_BOOK_DSP);
sound/soc/codecs/tas675x.c
1670
regcache_cache_only(tas->regmap, false);
sound/soc/codecs/tas675x.c
1671
regcache_mark_dirty(tas->regmap);
sound/soc/codecs/tas675x.c
1673
ret = tas675x_init_device(tas);
sound/soc/codecs/tas675x.c
1677
ret = regcache_sync(tas->regmap);
sound/soc/codecs/tas675x.c
1679
dev_err(tas->dev, "Failed to sync regcache: %d\n", ret);
sound/soc/codecs/tas675x.c
1684
memset(tas->last_status, 0, sizeof(tas->last_status));
sound/soc/codecs/tas675x.c
1689
tas675x_power_off(tas);
sound/soc/codecs/tas675x.c
1695
struct tas675x_priv *tas = dev_get_drvdata(dev);
sound/soc/codecs/tas675x.c
1697
disable_delayed_work_sync(&tas->fault_check_work);
sound/soc/codecs/tas675x.c
1698
tas675x_set_state_all(tas, TAS675X_STATE_SLEEP_BOTH);
sound/soc/codecs/tas675x.c
1705
struct tas675x_priv *tas = dev_get_drvdata(dev);
sound/soc/codecs/tas675x.c
1707
tas675x_set_state_all(tas, TAS675X_STATE_SLEEP_BOTH);
sound/soc/codecs/tas675x.c
1710
enable_delayed_work(&tas->fault_check_work);
sound/soc/codecs/tas675x.c
1711
schedule_delayed_work(&tas->fault_check_work,
sound/soc/codecs/tas675x.c
1720
struct tas675x_priv *tas = dev_get_drvdata(dev);
sound/soc/codecs/tas675x.c
1730
tas675x_power_off(tas);
sound/soc/codecs/tas675x.c
1736
struct tas675x_priv *tas = dev_get_drvdata(dev);
sound/soc/codecs/tas675x.c
1739
ret = tas675x_power_on(tas);
sound/soc/codecs/tas675x.c
178
__tas675x_select_book(tas, TAS675X_BOOK_DEFAULT);
sound/soc/codecs/tas675x.c
179
mutex_unlock(&tas->io_lock);
sound/soc/codecs/tas675x.c
1804
static bool tas675x_check_faults(struct tas675x_priv *tas)
sound/soc/codecs/tas675x.c
1806
struct device *dev = tas->dev;
sound/soc/codecs/tas675x.c
1814
ret = regmap_read(tas->regmap, f->reg, ®);
sound/soc/codecs/tas675x.c
1828
!READ_ONCE(tas->active_playback_dais) &&
sound/soc/codecs/tas675x.c
1829
!READ_ONCE(tas->active_capture_dais))
sound/soc/codecs/tas675x.c
1834
reg != tas->last_status[i])) {
sound/soc/codecs/tas675x.c
184
static int tas675x_dsp_mem_read(struct tas675x_priv *tas, u8 page, u8 reg, u32 *val)
sound/soc/codecs/tas675x.c
1842
tas->last_status[i] = reg;
sound/soc/codecs/tas675x.c
1850
struct tas675x_priv *tas = container_of(work, struct tas675x_priv,
sound/soc/codecs/tas675x.c
1853
if (tas675x_check_faults(tas))
sound/soc/codecs/tas675x.c
1854
regmap_write(tas->regmap, TAS675X_RESET_REG, TAS675X_FAULT_CLEAR);
sound/soc/codecs/tas675x.c
1856
schedule_delayed_work(&tas->fault_check_work,
sound/soc/codecs/tas675x.c
186
struct i2c_client *client = to_i2c_client(tas->dev);
sound/soc/codecs/tas675x.c
1862
struct tas675x_priv *tas = data;
sound/soc/codecs/tas675x.c
1865
if (pm_runtime_resume_and_get(tas->dev) < 0)
sound/soc/codecs/tas675x.c
1868
if (tas675x_check_faults(tas)) {
sound/soc/codecs/tas675x.c
1869
regmap_write(tas->regmap, TAS675X_RESET_REG, TAS675X_FAULT_CLEAR);
sound/soc/codecs/tas675x.c
1873
pm_runtime_mark_last_busy(tas->dev);
sound/soc/codecs/tas675x.c
1874
pm_runtime_put_autosuspend(tas->dev);
sound/soc/codecs/tas675x.c
194
mutex_lock(&tas->io_lock);
sound/soc/codecs/tas675x.c
196
ret = __tas675x_select_book(tas, TAS675X_BOOK_DSP);
sound/soc/codecs/tas675x.c
2012
struct tas675x_priv *tas = lock_arg;
sound/soc/codecs/tas675x.c
2014
mutex_lock(&tas->io_lock);
sound/soc/codecs/tas675x.c
2019
struct tas675x_priv *tas = lock_arg;
sound/soc/codecs/tas675x.c
2021
mutex_unlock(&tas->io_lock);
sound/soc/codecs/tas675x.c
2040
struct tas675x_priv *tas;
sound/soc/codecs/tas675x.c
2044
tas = devm_kzalloc(&client->dev, sizeof(*tas), GFP_KERNEL);
sound/soc/codecs/tas675x.c
2045
if (!tas)
sound/soc/codecs/tas675x.c
2048
tas->dev = &client->dev;
sound/soc/codecs/tas675x.c
2049
i2c_set_clientdata(client, tas);
sound/soc/codecs/tas675x.c
2051
mutex_init(&tas->io_lock);
sound/soc/codecs/tas675x.c
2054
cfg.lock_arg = tas;
sound/soc/codecs/tas675x.c
2056
memcpy(tas->dsp_params, tas675x_dsp_defaults, sizeof(tas->dsp_params));
sound/soc/codecs/tas675x.c
2057
INIT_DELAYED_WORK(&tas->fault_check_work, tas675x_fault_check_work);
sound/soc/codecs/tas675x.c
2059
tas->regmap = devm_regmap_init_i2c(client, &cfg);
sound/soc/codecs/tas675x.c
2060
if (IS_ERR(tas->regmap))
sound/soc/codecs/tas675x.c
2061
return PTR_ERR(tas->regmap);
sound/soc/codecs/tas675x.c
2064
regcache_cache_only(tas->regmap, true);
sound/soc/codecs/tas675x.c
2066
tas->dev_type = (enum tas675x_type)(unsigned long)device_get_match_data(tas->dev);
sound/soc/codecs/tas675x.c
2067
tas->fast_boot = device_property_read_bool(tas->dev, "ti,fast-boot");
sound/soc/codecs/tas675x.c
2069
tas->audio_slot = -1;
sound/soc/codecs/tas675x.c
2070
tas->llp_slot = -1;
sound/soc/codecs/tas675x.c
2071
tas->vpredict_slot = -1;
sound/soc/codecs/tas675x.c
2072
tas->isense_slot = -1;
sound/soc/codecs/tas675x.c
2073
if (!device_property_read_u32(tas->dev, "ti,audio-slot-no", &val))
sound/soc/codecs/tas675x.c
2074
tas->audio_slot = val;
sound/soc/codecs/tas675x.c
2075
if (!device_property_read_u32(tas->dev, "ti,llp-slot-no", &val))
sound/soc/codecs/tas675x.c
2076
tas->llp_slot = val;
sound/soc/codecs/tas675x.c
2077
if (!device_property_read_u32(tas->dev, "ti,vpredict-slot-no", &val))
sound/soc/codecs/tas675x.c
2078
tas->vpredict_slot = val;
sound/soc/codecs/tas675x.c
2079
if (!device_property_read_u32(tas->dev, "ti,isense-slot-no", &val))
sound/soc/codecs/tas675x.c
2080
tas->isense_slot = val;
sound/soc/codecs/tas675x.c
2082
tas->gpio1_func = tas675x_gpio_func_parse(tas->dev, "ti,gpio1-function");
sound/soc/codecs/tas675x.c
2083
tas->gpio2_func = tas675x_gpio_func_parse(tas->dev, "ti,gpio2-function");
sound/soc/codecs/tas675x.c
2086
tas->supplies[i].supply = tas675x_supply_names[i];
sound/soc/codecs/tas675x.c
2088
ret = devm_regulator_bulk_get(tas->dev, ARRAY_SIZE(tas->supplies), tas->supplies);
sound/soc/codecs/tas675x.c
2090
return dev_err_probe(tas->dev, ret, "Failed to request supplies\n");
sound/soc/codecs/tas675x.c
2092
tas->vbat = devm_regulator_get_optional(tas->dev, "vbat");
sound/soc/codecs/tas675x.c
2093
if (IS_ERR(tas->vbat) && PTR_ERR(tas->vbat) != -ENODEV)
sound/soc/codecs/tas675x.c
2094
return dev_err_probe(tas->dev, PTR_ERR(tas->vbat),
sound/soc/codecs/tas675x.c
2097
tas->pd_gpio = devm_gpiod_get_optional(tas->dev, "powerdown", GPIOD_OUT_HIGH);
sound/soc/codecs/tas675x.c
2098
if (IS_ERR(tas->pd_gpio))
sound/soc/codecs/tas675x.c
2099
return dev_err_probe(tas->dev, PTR_ERR(tas->pd_gpio), "Failed powerdown-gpios\n");
sound/soc/codecs/tas675x.c
2101
tas->stby_gpio = devm_gpiod_get_optional(tas->dev, "standby", GPIOD_OUT_HIGH);
sound/soc/codecs/tas675x.c
2102
if (IS_ERR(tas->stby_gpio))
sound/soc/codecs/tas675x.c
2103
return dev_err_probe(tas->dev, PTR_ERR(tas->stby_gpio), "Failed standby-gpios\n");
sound/soc/codecs/tas675x.c
2105
if (!tas->pd_gpio && !tas->stby_gpio)
sound/soc/codecs/tas675x.c
2106
return dev_err_probe(tas->dev, -EINVAL,
sound/soc/codecs/tas675x.c
2109
ret = tas675x_power_on(tas);
sound/soc/codecs/tas675x.c
2114
ret = devm_request_threaded_irq(tas->dev, client->irq, NULL,
sound/soc/codecs/tas675x.c
2117
"tas675x-fault", tas);
sound/soc/codecs/tas675x.c
2119
tas675x_power_off(tas);
sound/soc/codecs/tas675x.c
2120
return dev_err_probe(tas->dev, ret, "Failed to request IRQ\n");
sound/soc/codecs/tas675x.c
2124
schedule_delayed_work(&tas->fault_check_work,
sound/soc/codecs/tas675x.c
2129
pm_runtime_set_autosuspend_delay(tas->dev, 2000);
sound/soc/codecs/tas675x.c
213
__tas675x_select_book(tas, TAS675X_BOOK_DEFAULT);
sound/soc/codecs/tas675x.c
2130
pm_runtime_use_autosuspend(tas->dev);
sound/soc/codecs/tas675x.c
2131
pm_runtime_set_active(tas->dev);
sound/soc/codecs/tas675x.c
2132
pm_runtime_mark_last_busy(tas->dev);
sound/soc/codecs/tas675x.c
2133
pm_runtime_enable(tas->dev);
sound/soc/codecs/tas675x.c
2135
ret = devm_snd_soc_register_component(tas->dev, &soc_codec_dev_tas675x,
sound/soc/codecs/tas675x.c
214
mutex_unlock(&tas->io_lock);
sound/soc/codecs/tas675x.c
2143
pm_runtime_force_suspend(tas->dev);
sound/soc/codecs/tas675x.c
2144
pm_runtime_disable(tas->dev);
sound/soc/codecs/tas675x.c
2145
tas675x_power_off(tas);
sound/soc/codecs/tas675x.c
2151
struct tas675x_priv *tas = dev_get_drvdata(&client->dev);
sound/soc/codecs/tas675x.c
2153
disable_delayed_work_sync(&tas->fault_check_work);
sound/soc/codecs/tas675x.c
2159
tas675x_power_off(tas);
sound/soc/codecs/tas675x.c
324
struct tas675x_priv *tas = snd_soc_component_get_drvdata(comp);
sound/soc/codecs/tas675x.c
330
ret = tas675x_dsp_mem_write(tas, t->page, t->reg, val);
sound/soc/codecs/tas675x.c
336
for (i = 0; i < ARRAY_SIZE(tas->dsp_params); i++) {
sound/soc/codecs/tas675x.c
337
if (tas->dsp_params[i].page == t->page &&
sound/soc/codecs/tas675x.c
338
tas->dsp_params[i].reg == t->reg) {
sound/soc/codecs/tas675x.c
339
tas->dsp_params[i].val = val;
sound/soc/codecs/tas675x.c
353
struct tas675x_priv *tas = snd_soc_component_get_drvdata(comp);
sound/soc/codecs/tas675x.c
359
ret = tas675x_dsp_mem_read(tas, t->page, t->reg, &val);
sound/soc/codecs/tas675x.c
379
struct tas675x_priv *tas = snd_soc_component_get_drvdata(comp);
sound/soc/codecs/tas675x.c
389
ret = pm_runtime_resume_and_get(tas->dev);
sound/soc/codecs/tas675x.c
397
regmap_update_bits(tas->regmap, TAS675X_DC_LDG_CTRL_REG,
sound/soc/codecs/tas675x.c
400
regmap_write(tas->regmap, TAS675X_RESET_REG, TAS675X_FAULT_CLEAR);
sound/soc/codecs/tas675x.c
403
ret = regmap_read_poll_timeout(tas->regmap, TAS675X_STATE_REPORT_CH1_CH2_REG,
sound/soc/codecs/tas675x.c
408
ret |= regmap_read_poll_timeout(tas->regmap, TAS675X_STATE_REPORT_CH3_CH4_REG,
sound/soc/codecs/tas675x.c
414
dev_err(tas->dev,
sound/soc/codecs/tas675x.c
422
ret = tas675x_set_state_all(tas, TAS675X_STATE_HIZ_BOTH);
sound/soc/codecs/tas675x.c
427
ret = tas675x_set_state_all(tas, TAS675X_STATE_LOAD_DIAG_BOTH);
sound/soc/codecs/tas675x.c
432
ret = regmap_read_poll_timeout(tas->regmap, TAS675X_STATE_REPORT_CH1_CH2_REG,
sound/soc/codecs/tas675x.c
436
ret |= regmap_read_poll_timeout(tas->regmap, TAS675X_STATE_REPORT_CH3_CH4_REG,
sound/soc/codecs/tas675x.c
441
dev_err(tas->dev,
sound/soc/codecs/tas675x.c
449
ret = regmap_update_bits(tas->regmap, TAS675X_DC_LDG_CTRL_REG,
sound/soc/codecs/tas675x.c
455
dev_dbg(tas->dev, "DC LDG: Started\n");
sound/soc/codecs/tas675x.c
458
ret = regmap_read_poll_timeout(tas->regmap, TAS675X_STATE_REPORT_CH1_CH2_REG,
sound/soc/codecs/tas675x.c
462
ret |= regmap_read_poll_timeout(tas->regmap, TAS675X_STATE_REPORT_CH3_CH4_REG,
sound/soc/codecs/tas675x.c
467
dev_err(tas->dev,
sound/soc/codecs/tas675x.c
474
dev_dbg(tas->dev, "DC LDG: Completed successfully (CH1/2=0x%02x, CH3/4=0x%02x)\n",
sound/soc/codecs/tas675x.c
478
tas675x_set_state_all(tas, TAS675X_STATE_HIZ_BOTH);
sound/soc/codecs/tas675x.c
481
regmap_update_bits(tas->regmap, TAS675X_DC_LDG_CTRL_REG,
sound/soc/codecs/tas675x.c
485
pm_runtime_mark_last_busy(tas->dev);
sound/soc/codecs/tas675x.c
486
pm_runtime_put_autosuspend(tas->dev);
sound/soc/codecs/tas675x.c
495
struct tas675x_priv *tas = snd_soc_component_get_drvdata(comp);
sound/soc/codecs/tas675x.c
505
ret = pm_runtime_resume_and_get(tas->dev);
sound/soc/codecs/tas675x.c
510
ret = tas675x_set_state_all(tas, TAS675X_STATE_SLEEP_BOTH);
sound/soc/codecs/tas675x.c
512
dev_err(tas->dev, "AC LDG: Failed to set SLEEP state: %d\n", ret);
sound/soc/codecs/tas675x.c
517
ret = regmap_write(tas->regmap, TAS675X_AC_LDG_CTRL_REG, 0x0F);
sound/soc/codecs/tas675x.c
519
dev_err(tas->dev, "AC LDG: Failed to start: %d\n", ret);
sound/soc/codecs/tas675x.c
523
dev_dbg(tas->dev, "AC LDG: Started\n");
sound/soc/codecs/tas675x.c
526
ret = regmap_read_poll_timeout(tas->regmap, TAS675X_STATE_REPORT_CH1_CH2_REG,
sound/soc/codecs/tas675x.c
531
dev_err(tas->dev,
sound/soc/codecs/tas675x.c
535
regmap_write(tas->regmap, TAS675X_AC_LDG_CTRL_REG, 0x00);
sound/soc/codecs/tas675x.c
539
ret = regmap_read_poll_timeout(tas->regmap, TAS675X_STATE_REPORT_CH3_CH4_REG,
sound/soc/codecs/tas675x.c
544
dev_err(tas->dev,
sound/soc/codecs/tas675x.c
548
regmap_write(tas->regmap, TAS675X_AC_LDG_CTRL_REG, 0x00);
sound/soc/codecs/tas675x.c
552
dev_dbg(tas->dev, "AC LDG: Completed successfully (CH1/2=0x%02x, CH3/4=0x%02x)\n",
sound/soc/codecs/tas675x.c
554
regmap_write(tas->regmap, TAS675X_AC_LDG_CTRL_REG, 0x00);
sound/soc/codecs/tas675x.c
557
pm_runtime_mark_last_busy(tas->dev);
sound/soc/codecs/tas675x.c
558
pm_runtime_put_autosuspend(tas->dev);
sound/soc/codecs/tas675x.c
577
struct tas675x_priv *tas = snd_soc_component_get_drvdata(comp);
sound/soc/codecs/tas675x.c
582
ret = regmap_bulk_read(tas->regmap, msb_reg, buf, 2);
sound/soc/codecs/tas675x.c
605
struct tas675x_priv *tas = snd_soc_component_get_drvdata(comp);
sound/soc/codecs/tas675x.c
610
ret = regmap_read(tas->regmap, TAS675X_DC_LDG_DCR_MSB_REG, &msb);
sound/soc/codecs/tas675x.c
614
ret = regmap_read(tas->regmap, lsb_reg, &lsb);
tools/testing/selftests/futex/functional/futex_numa.c
164
struct thread_args *tas[512], *cas[512];
tools/testing/selftests/futex/functional/futex_numa.c
233
tas[t] = args;
tools/testing/selftests/futex/functional/futex_numa.c
241
struct thread_args *args = tas[t];