[PATCH 0/2] scpi-sensors: Fix SCP sensor readings scale
Carlo Caione
carlo at caione.org
Thu Mar 2 04:14:58 PST 2017
From: Carlo Caione <carlo at endlessm.com>
The implementation details for SCPI seems to suggest that the sensor
readings must be reported by SCP using a well defined scale
(millidegree Celsius for temperature, millivolts for voltage,
milliamperes for current, microwatts for power and microjoules for
energy).
This is also important for the interaction with other subsystems: for
example both the thermal sub-system and the hwmon sysfs interface expect
the temperature expressed in millidegree Celsius.
Unfortunately since this behaviour is dependent on the firmware
implementation there are cases where the sensor readings are reported
using a different scale. For example in the Amlogic SoCs the
temperature is reported in degree and not millidegree Celsius.
In this patchset we introduce a new DT property `scpi,sensors-scale` that is
used by the scpi-hwmon driver to convert the sensor readings to the expected
scale.
Carlo Caione (2):
Documentation: bindings: Introduce scpi,sensors-scale
hwmon: (scpi) Fix the scale of SCP sensor readings
Documentation/devicetree/bindings/arm/arm,scpi.txt | 18 ++++++++++++++++
drivers/hwmon/scpi-hwmon.c | 25 ++++++++++++++++++++++
2 files changed, 43 insertions(+)
--
2.12.0
More information about the linux-amlogic
mailing list