summaryrefslogtreecommitdiff
path: root/drivers/hwmon/scmi-hwmon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/scmi-hwmon.c')
-rw-r--r--drivers/hwmon/scmi-hwmon.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hwmon/scmi-hwmon.c b/drivers/hwmon/scmi-hwmon.c
index 364199b332c0..eec223d174c0 100644
--- a/drivers/hwmon/scmi-hwmon.c
+++ b/drivers/hwmon/scmi-hwmon.c
@@ -240,6 +240,8 @@ static int scmi_hwmon_probe(struct scmi_device *sdev)
const struct hwmon_channel_info **ptr_scmi_ci;
const struct scmi_handle *handle = sdev->handle;
struct scmi_protocol_handle *ph;
+ u32 sensor_config = FIELD_PREP(SCMI_SENS_CFG_SENSOR_ENABLED_MASK,
+ SCMI_SENS_CFG_SENSOR_ENABLE);
if (!handle)
return -ENODEV;
@@ -339,6 +341,13 @@ static int scmi_hwmon_probe(struct scmi_device *sdev)
if (!sensor)
continue;
+ ret = sensor_ops->config_set(ph, i, sensor_config);
+ if (ret) {
+ dev_err(dev, "Error enabling sensor %s. err=%d\n",
+ sensor->name, ret);
+ continue;
+ }
+
/*
* Warn on any misconfiguration related to thermal zones but
* bail out of probing only on memory errors.