]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Revert "drivers: thermal: tsens: Add new operation to check if a sensor is enabled"
authorEduardo Valentin <edubezval@gmail.com>
Wed, 29 May 2019 01:04:17 +0000 (18:04 -0700)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 29 May 2019 02:30:33 +0000 (19:30 -0700)
This reverts commit 3e6a8fb3308419129c7a52de6eb42feef5a919a0.

Cc: Andy Gross <agross@kernel.org>
Cc: David Brown <david.brown@linaro.org>
Cc: Amit Kucheria <amit.kucheria@linaro.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Suggested-by: Amit Kucheria <amit.kucheria@linaro.org>
Reported-by: Andy Gross <andygro@gmail.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/qcom/tsens-common.c
drivers/thermal/qcom/tsens-v0_1.c
drivers/thermal/qcom/tsens-v2.c
drivers/thermal/qcom/tsens.c
drivers/thermal/qcom/tsens.h

index 928e8e81ba6970cd20e710df70f7080a0a4ead3c..528df8801254339cc31474580bead438653cb99a 100644 (file)
@@ -64,20 +64,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1,
        }
 }
 
-bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id)
-{
-       u32 val;
-       int ret;
-
-       if ((hw_id > (priv->num_sensors - 1)) || (hw_id < 0))
-               return -EINVAL;
-       ret = regmap_field_read(priv->rf[SENSOR_EN], &val);
-       if (ret)
-               return ret;
-
-       return val & (1 << hw_id);
-}
-
 static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s)
 {
        int degc, num, den;
index a319283c223f270181600f8f16581b38fcffce4d..6f26fadf4c27918606e7b93f1be557c98b89ec7d 100644 (file)
@@ -334,7 +334,6 @@ static const struct reg_field tsens_v0_1_regfields[MAX_REGFIELDS] = {
        /* CTRL_OFFSET */
        [TSENS_EN]     = REG_FIELD(SROT_CTRL_OFF, 0,  0),
        [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1,  1),
-       [SENSOR_EN]    = REG_FIELD(SROT_CTRL_OFF, 3, 13),
 
        /* ----- TM ------ */
        /* INTERRUPT ENABLE */
index 1099069f2aa3efe87e0ab5cea51a8aa9a66b1079..0a4f2b8fcab6cf840804cfa804b73d24e66a3458 100644 (file)
@@ -44,7 +44,6 @@ static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = {
        /* CTRL_OFF */
        [TSENS_EN]     = REG_FIELD(SROT_CTRL_OFF,    0,  0),
        [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF,    1,  1),
-       [SENSOR_EN]    = REG_FIELD(SROT_CTRL_OFF,    3, 18),
 
        /* ----- TM ------ */
        /* INTERRUPT ENABLE */
index 36b0b52db524cb78114b912b7e6d0b8514844592..0627d8615c307f7497854d32fe4a9741ec2b2419 100644 (file)
@@ -85,11 +85,6 @@ static int tsens_register(struct tsens_priv *priv)
        struct thermal_zone_device *tzd;
 
        for (i = 0;  i < priv->num_sensors; i++) {
-               if (!is_sensor_enabled(priv, priv->sensor[i].hw_id)) {
-                       dev_err(priv->dev, "sensor %d: disabled\n",
-                               priv->sensor[i].hw_id);
-                       continue;
-               }
                priv->sensor[i].priv = priv;
                priv->sensor[i].id = i;
                tzd = devm_thermal_zone_of_sensor_register(priv->dev, i,
index eefe3844fb4ef4e0c2391a22e39afd9c5a499ef9..2fd94997245bfd6f8aed5d3a4adced8a8a02b24b 100644 (file)
@@ -315,7 +315,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *pt1, u32 *pt2, u32 mo
 int init_common(struct tsens_priv *priv);
 int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp);
 int get_temp_common(struct tsens_priv *priv, int i, int *temp);
-bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id);
 
 /* TSENS target */
 extern const struct tsens_plat_data data_8960;