hwmon: Cleanup kmesg when probing for VADC

Add useful info to kmesg when probing

Change-Id: If90475f259eb4922807a31ff7503d2b3036c24e6
This commit is contained in:
syphyr 2019-08-13 02:19:11 +02:00
parent 2fa4fae62b
commit 240b5593e7
2 changed files with 9 additions and 2 deletions

View File

@ -2227,7 +2227,10 @@ static int qpnp_vadc_get_temp(struct thermal_zone_device *thermal,
rc = qpnp_vadc_read(vadc,
vadc_therm->vadc_channel, &result);
if (rc) {
if (rc == -EPROBE_DEFER) {
pr_info("Probing VADC\n");
return rc;
} else if (rc) {
pr_err("VADC read error with %d\n", rc);
return rc;
}

View File

@ -329,7 +329,11 @@ static int sec_therm_probe(struct platform_device *pdev)
if (IS_ERR(info->vadc_dev)) {
ret = PTR_ERR(info->vadc_dev);
pr_err("%s: ret(%d)\n", __func__, ret);
if (ret == -EPROBE_DEFER)
pr_info("%s: Probing VADC\n", __func__);
else
pr_err("%s: ret(%d)\n", __func__, ret);
if (ret != -EPROBE_DEFER)
pr_err("vadc property missing\n");
else