Message ID | 1541410354-19090-3-git-send-email-wni@nvidia.com |
---|---|
State | Deferred |
Headers | show |
Series | Fixes for Tegra soctherm | expand |
On Mon, Nov 05, 2018 at 05:32:32PM +0800, Wei Ni wrote: > Convert warnings to info as not all platforms may > have all the thresholds and sensors enabled. > > Signed-off-by: Wei Ni <wni@nvidia.com> > --- > drivers/thermal/tegra/soctherm.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) This seems overly generalized to me. Shouldn't we be checking in a more fine-grained way for the absence of thresholds and/or sensors? Otherwise, how are going to make the difference between the sensor not being enabled or the device tree just missing the information? Thierry
On 8/11/2018 8:47 PM, Thierry Reding wrote: > On Mon, Nov 05, 2018 at 05:32:32PM +0800, Wei Ni wrote: >> Convert warnings to info as not all platforms may >> have all the thresholds and sensors enabled. >> >> Signed-off-by: Wei Ni <wni@nvidia.com> >> --- >> drivers/thermal/tegra/soctherm.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) > > This seems overly generalized to me. Shouldn't we be checking in a more > fine-grained way for the absence of thresholds and/or sensors? > > Otherwise, how are going to make the difference between the sensor not > being enabled or the device tree just missing the information? > The sensor being enabled or not is controlled by device tree, if the dts have the corresponding nodes, then the sensors should be enabled. And the thresholds for sensor are not necessary, so I think we just need to print out them. BTW, in my patch 1/4, I should print out the sensor name if the sensor not enabled and register failed. Will update it. > Thierry >
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index b708300303ff..39a8bda07ac4 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -550,7 +550,7 @@ static int tegra_soctherm_set_hwtrips(struct device *dev, ret = tz->ops->get_crit_temp(tz, &temperature); if (ret) { - dev_warn(dev, "thermtrip: %s: missing critical temperature\n", + dev_info(dev, "thermtrip: %s: missing critical temperature\n", sg->name); goto set_throttle; } @@ -569,7 +569,7 @@ static int tegra_soctherm_set_hwtrips(struct device *dev, set_throttle: ret = get_hot_temp(tz, &trip, &temperature); if (ret) { - dev_warn(dev, "throttrip: %s: missing hot temperature\n", + dev_info(dev, "throttrip: %s: missing hot temperature\n", sg->name); return 0; } @@ -600,7 +600,7 @@ static int tegra_soctherm_set_hwtrips(struct device *dev, } if (i == THROTTLE_SIZE) - dev_warn(dev, "throttrip: %s: missing throttle cdev\n", + dev_info(dev, "throttrip: %s: missing throttle cdev\n", sg->name); return 0;
Convert warnings to info as not all platforms may have all the thresholds and sensors enabled. Signed-off-by: Wei Ni <wni@nvidia.com> --- drivers/thermal/tegra/soctherm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)