gpu: nvgpu: Debugfs for Volt

Changes:
1. Reading operating voltage and minimum voltage of chip.
2. Added nvgpu_volt_init_debugfs for creating the debugfs interface.
3. Command for reading current voltage:
   cat /sys/kernel/debug/gpu_pci/volt/current_voltage
4. Command for reading minimum voltage:
   cat /sys/kernel/debug/gpu_pci/volt/minimum_voltage

Jira NVGPU-1731

Change-Id: I76d42fc376235f37c44d259398bd6f125a90413b
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1986403
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
rmylavarapu
2019-01-03 09:19:51 +05:30
committed by mobile promotions
parent 9467646a87
commit d174860854
6 changed files with 129 additions and 2 deletions

View File

@@ -233,6 +233,14 @@ int nvgpu_finalize_poweron_linux(struct nvgpu_os_linux *l)
}
}
if (l->ops.volt.init_debugfs) {
err = l->ops.volt.init_debugfs(g);
if (err) {
nvgpu_err(g, "failed to init linux volt debugfs");
return err;
}
}
err = nvgpu_pmgr_init_debugfs_linux(l);
if (err) {
nvgpu_err(g, "failed to init linux pmgr debugfs");