is there a kernel mode API?

i have to modify an existing (customised) kernel module and need to read the GPU temperature; apart from userland NVML library would anybody know if there is an API that could be used from kernel module?