diff options
author | Amit Kucheria <amit.kucheria@linaro.org> | 2019-03-20 18:47:55 +0530 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2019-05-14 06:59:19 -0700 |
commit | 1b6e3e517fadcfbbe0f88eb676ebffafc20fd49c (patch) | |
tree | c6e43fd07dd6b746922852dbba61e3029808e010 /drivers/thermal/qcom/tsens-common.c | |
parent | 66ad8a100953dc1433c3ead8c473746d60c05693 (diff) |
drivers: thermal: tsens: Introduce IP-specific max_sensor count
The IP can support 'm' sensors while the platform can enable 'n' sensors
of the 'm' where n <= m.
Track maximum sensors supported by the IP so that we can correctly track
what subset of the sensors are supported on the platform.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/qcom/tsens-common.c')
-rw-r--r-- | drivers/thermal/qcom/tsens-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index c76f8cfb25a2..5607c5cc635c 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -198,7 +198,7 @@ int __init init_common(struct tsens_priv *priv) goto err_put_device; } /* now alloc regmap_fields in tm_map */ - for (i = 0, j = LAST_TEMP_0; i < priv->num_sensors; i++, j++) { + for (i = 0, j = LAST_TEMP_0; i < priv->feat->max_sensors; i++, j++) { priv->rf[j] = devm_regmap_field_alloc(dev, priv->tm_map, priv->fields[j]); if (IS_ERR(priv->rf[j])) { @@ -206,7 +206,7 @@ int __init init_common(struct tsens_priv *priv) goto err_put_device; } } - for (i = 0, j = VALID_0; i < priv->num_sensors; i++, j++) { + for (i = 0, j = VALID_0; i < priv->feat->max_sensors; i++, j++) { priv->rf[j] = devm_regmap_field_alloc(dev, priv->tm_map, priv->fields[j]); if (IS_ERR(priv->rf[j])) { |