Lines Matching defs:mhi_cntrl
17 struct mhi_controller *mhi_cntrl = m->private;
21 to_mhi_pm_state_str(mhi_cntrl->pm_state),
22 mhi_is_active(mhi_cntrl) ? "Active" : "Inactive",
23 TO_MHI_STATE_STR(mhi_cntrl->dev_state),
24 TO_MHI_EXEC_STR(mhi_cntrl->ee),
25 mhi_cntrl->wake_set ? "true" : "false");
28 seq_printf(m, "M0: %u M2: %u M3: %u", mhi_cntrl->M0, mhi_cntrl->M2,
29 mhi_cntrl->M3);
32 atomic_read(&mhi_cntrl->dev_wake),
33 atomic_read(&mhi_cntrl->pending_pkts));
40 struct mhi_controller *mhi_cntrl = m->private;
45 if (!mhi_is_active(mhi_cntrl)) {
50 er_ctxt = mhi_cntrl->mhi_ctxt->er_ctxt;
51 mhi_event = mhi_cntrl->mhi_event;
52 for (i = 0; i < mhi_cntrl->total_ev_rings;
83 struct mhi_controller *mhi_cntrl = m->private;
88 if (!mhi_is_active(mhi_cntrl)) {
93 mhi_chan = mhi_cntrl->mhi_chan;
94 chan_ctxt = mhi_cntrl->mhi_ctxt->chan_ctxt;
95 for (i = 0; i < mhi_cntrl->max_chan; i++, chan_ctxt++, mhi_chan++) {
155 struct mhi_controller *mhi_cntrl = m->private;
157 if (!mhi_is_active(mhi_cntrl)) {
162 device_for_each_child(mhi_cntrl->cntrl_dev, m, mhi_device_info_show);
169 struct mhi_controller *mhi_cntrl = m->private;
174 void __iomem *mhi_base = mhi_cntrl->regs;
175 void __iomem *bhi_base = mhi_cntrl->bhi;
176 void __iomem *bhie_base = mhi_cntrl->bhie;
177 void __iomem *wake_db = mhi_cntrl->wake_db;
202 if (!MHI_REG_ACCESS_VALID(mhi_cntrl->pm_state))
206 to_mhi_pm_state_str(mhi_cntrl->pm_state),
207 TO_MHI_STATE_STR(mhi_cntrl->dev_state),
208 TO_MHI_EXEC_STR(mhi_cntrl->ee));
210 state = mhi_get_mhi_state(mhi_cntrl);
211 ee = mhi_get_exec_env(mhi_cntrl);
218 ret = mhi_read_reg(mhi_cntrl, regs[i].base, regs[i].offset,
231 struct mhi_controller *mhi_cntrl = m->private;
232 struct mhi_device *mhi_dev = mhi_cntrl->mhi_dev;
234 if (!mhi_is_active(mhi_cntrl)) {
251 struct mhi_controller *mhi_cntrl = m->private;
252 struct mhi_device *mhi_dev = mhi_cntrl->mhi_dev;
271 struct mhi_controller *mhi_cntrl = m->private;
273 seq_printf(m, "%u ms\n", mhi_cntrl->timeout_ms);
283 struct mhi_controller *mhi_cntrl = m->private;
289 mhi_cntrl->timeout_ms = timeout_ms;
375 void mhi_create_debugfs(struct mhi_controller *mhi_cntrl)
377 mhi_cntrl->debugfs_dentry =
378 debugfs_create_dir(dev_name(mhi_cntrl->cntrl_dev),
381 debugfs_create_file("states", 0444, mhi_cntrl->debugfs_dentry,
382 mhi_cntrl, &debugfs_states_fops);
383 debugfs_create_file("events", 0444, mhi_cntrl->debugfs_dentry,
384 mhi_cntrl, &debugfs_events_fops);
385 debugfs_create_file("channels", 0444, mhi_cntrl->debugfs_dentry,
386 mhi_cntrl, &debugfs_channels_fops);
387 debugfs_create_file("devices", 0444, mhi_cntrl->debugfs_dentry,
388 mhi_cntrl, &debugfs_devices_fops);
389 debugfs_create_file("regdump", 0444, mhi_cntrl->debugfs_dentry,
390 mhi_cntrl, &debugfs_regdump_fops);
391 debugfs_create_file("device_wake", 0644, mhi_cntrl->debugfs_dentry,
392 mhi_cntrl, &debugfs_device_wake_fops);
393 debugfs_create_file("timeout_ms", 0644, mhi_cntrl->debugfs_dentry,
394 mhi_cntrl, &debugfs_timeout_ms_fops);
397 void mhi_destroy_debugfs(struct mhi_controller *mhi_cntrl)
399 debugfs_remove_recursive(mhi_cntrl->debugfs_dentry);
400 mhi_cntrl->debugfs_dentry = NULL;