drm/i915/hwmon: expose package temperature
Add hwmon support for temp1_input attribute, which will expose package
temperature in millidegree Celsius. With this in place we can monitor
package temperature using lm-sensors tool.
$ sensors
i915-pci-0300
Adapter: PCI adapter
in0: 990.00 mV
fan1: 1260 RPM
temp1: +45.0°C
power1: N/A (max = 35.00 W)
energy1: 12.62 kJ
v2: Use switch case (Anshuman)
v3: Comment adjustment (Riana)
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11276
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240910105242.3357276-1-raag.jadav@intel.com