Lines Matching refs:dev
9 struct mt792x_dev *dev = data; in mt7921_reg_set() local
11 mt792x_mutex_acquire(dev); in mt7921_reg_set()
12 mt76_wr(dev, dev->mt76.debugfs_reg, val); in mt7921_reg_set()
13 mt792x_mutex_release(dev); in mt7921_reg_set()
21 struct mt792x_dev *dev = data; in mt7921_reg_get() local
23 mt792x_mutex_acquire(dev); in mt7921_reg_get()
24 *val = mt76_rr(dev, dev->mt76.debugfs_reg); in mt7921_reg_get()
25 mt792x_mutex_release(dev); in mt7921_reg_get()
35 struct mt792x_dev *dev = data; in mt7921_fw_debug_set() local
37 mt792x_mutex_acquire(dev); in mt7921_fw_debug_set()
39 dev->fw_debug = (u8)val; in mt7921_fw_debug_set()
40 mt7921_mcu_fw_log_2_host(dev, dev->fw_debug); in mt7921_fw_debug_set()
42 mt792x_mutex_release(dev); in mt7921_fw_debug_set()
50 struct mt792x_dev *dev = data; in mt7921_fw_debug_get() local
52 *val = dev->fw_debug; in mt7921_fw_debug_get()
93 struct mt792x_dev *dev = dev_get_drvdata(s->private); in mt7921_txpwr() local
97 mt792x_mutex_acquire(dev); in mt7921_txpwr()
98 ret = mt7921_get_txpwr_info(dev, &txpwr); in mt7921_txpwr()
99 mt792x_mutex_release(dev); in mt7921_txpwr()
145 struct mt792x_dev *dev = data; in mt7921_pm_set() local
146 struct mt76_connac_pm *pm = &dev->pm; in mt7921_pm_set()
148 if (mt76_is_usb(&dev->mt76)) in mt7921_pm_set()
151 mutex_lock(&dev->mt76.mutex); in mt7921_pm_set()
164 mt76_connac_pm_wake(&dev->mphy, pm); in mt7921_pm_set()
167 mt7921_set_runtime_pm(dev); in mt7921_pm_set()
168 mt76_connac_power_save_sched(&dev->mphy, pm); in mt7921_pm_set()
170 mutex_unlock(&dev->mt76.mutex); in mt7921_pm_set()
178 struct mt792x_dev *dev = data; in mt7921_pm_get() local
180 *val = dev->pm.enable_user; in mt7921_pm_get()
190 struct mt792x_dev *dev = data; in mt7921_deep_sleep_set() local
191 struct mt76_connac_pm *pm = &dev->pm; in mt7921_deep_sleep_set()
192 bool monitor = !!(dev->mphy.hw->conf.flags & IEEE80211_CONF_MONITOR); in mt7921_deep_sleep_set()
195 if (mt76_is_usb(&dev->mt76)) in mt7921_deep_sleep_set()
198 mt792x_mutex_acquire(dev); in mt7921_deep_sleep_set()
204 mt76_connac_mcu_set_deep_sleep(&dev->mt76, pm->ds_enable); in mt7921_deep_sleep_set()
206 mt792x_mutex_release(dev); in mt7921_deep_sleep_set()
214 struct mt792x_dev *dev = data; in mt7921_deep_sleep_get() local
216 *val = dev->pm.ds_enable_user; in mt7921_deep_sleep_get()
229 struct mt792x_dev *dev = data; in mt7921_chip_reset() local
235 mt792x_reset(&dev->mt76); in mt7921_chip_reset()
239 mt792x_mutex_acquire(dev); in mt7921_chip_reset()
240 ret = mt76_connac_mcu_chip_config(&dev->mt76); in mt7921_chip_reset()
241 mt792x_mutex_release(dev); in mt7921_chip_reset()
253 struct mt792x_dev *dev = dev_get_drvdata(s->private); in mt7921s_sched_quota_read() local
254 struct mt76_sdio *sdio = &dev->mt76.sdio; in mt7921s_sched_quota_read()
264 int mt7921_init_debugfs(struct mt792x_dev *dev) in mt7921_init_debugfs() argument
268 dir = mt76_register_debugfs_fops(&dev->mphy, &fops_regval); in mt7921_init_debugfs()
272 if (mt76_is_mmio(&dev->mt76)) in mt7921_init_debugfs()
273 debugfs_create_devm_seqfile(dev->mt76.dev, "xmit-queues", in mt7921_init_debugfs()
276 debugfs_create_devm_seqfile(dev->mt76.dev, "xmit-queues", in mt7921_init_debugfs()
279 debugfs_create_devm_seqfile(dev->mt76.dev, "acq", dir, in mt7921_init_debugfs()
281 debugfs_create_devm_seqfile(dev->mt76.dev, "txpower_sku", dir, in mt7921_init_debugfs()
283 debugfs_create_file("tx_stats", 0400, dir, dev, &mt792x_tx_stats_fops); in mt7921_init_debugfs()
284 debugfs_create_file("fw_debug", 0600, dir, dev, &fops_fw_debug); in mt7921_init_debugfs()
285 debugfs_create_file("runtime-pm", 0600, dir, dev, &fops_pm); in mt7921_init_debugfs()
286 debugfs_create_file("idle-timeout", 0600, dir, dev, in mt7921_init_debugfs()
288 debugfs_create_file("chip_reset", 0600, dir, dev, &fops_reset); in mt7921_init_debugfs()
289 debugfs_create_devm_seqfile(dev->mt76.dev, "runtime_pm_stats", dir, in mt7921_init_debugfs()
291 debugfs_create_file("deep-sleep", 0600, dir, dev, &fops_ds); in mt7921_init_debugfs()
292 if (mt76_is_sdio(&dev->mt76)) in mt7921_init_debugfs()
293 debugfs_create_devm_seqfile(dev->mt76.dev, "sched-quota", dir, in mt7921_init_debugfs()