mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 03:15:00 +00:00
power: regulator: replace some debug() by dev_dbg()
Replace some debug() by dev_dbg() when dev variable is available/valid. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
f96e513318
commit
ccddb0abec
1 changed files with 6 additions and 7 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
|
#include <dm/device_compat.h>
|
||||||
#include <dm/uclass-internal.h>
|
#include <dm/uclass-internal.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <power/pmic.h>
|
#include <power/pmic.h>
|
||||||
|
@ -43,8 +44,7 @@ static void regulator_set_value_ramp_delay(struct udevice *dev, int old_uV,
|
||||||
{
|
{
|
||||||
int delay = DIV_ROUND_UP(abs(new_uV - old_uV), ramp_delay);
|
int delay = DIV_ROUND_UP(abs(new_uV - old_uV), ramp_delay);
|
||||||
|
|
||||||
debug("regulator %s: delay %u us (%d uV -> %d uV)\n", dev->name, delay,
|
dev_dbg(dev, "delay %u us (%d uV -> %d uV)\n", delay, old_uV, new_uV);
|
||||||
old_uV, new_uV);
|
|
||||||
|
|
||||||
udelay(delay);
|
udelay(delay);
|
||||||
}
|
}
|
||||||
|
@ -263,7 +263,7 @@ int regulator_get_by_platname(const char *plat_name, struct udevice **devp)
|
||||||
for (ret = uclass_find_first_device(UCLASS_REGULATOR, &dev); dev;
|
for (ret = uclass_find_first_device(UCLASS_REGULATOR, &dev); dev;
|
||||||
ret = uclass_find_next_device(&dev)) {
|
ret = uclass_find_next_device(&dev)) {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
debug("regulator %s, ret=%d\n", dev->name, ret);
|
dev_dbg(dev, "ret=%d\n", ret);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,16 +439,15 @@ static int regulator_post_bind(struct udevice *dev)
|
||||||
/* Regulator's mandatory constraint */
|
/* Regulator's mandatory constraint */
|
||||||
uc_pdata->name = dev_read_string(dev, property);
|
uc_pdata->name = dev_read_string(dev, property);
|
||||||
if (!uc_pdata->name) {
|
if (!uc_pdata->name) {
|
||||||
debug("%s: dev '%s' has no property '%s'\n",
|
dev_dbg(dev, "has no property '%s'\n", property);
|
||||||
__func__, dev->name, property);
|
|
||||||
uc_pdata->name = dev_read_name(dev);
|
uc_pdata->name = dev_read_name(dev);
|
||||||
if (!uc_pdata->name)
|
if (!uc_pdata->name)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!regulator_name_is_unique(dev, uc_pdata->name)) {
|
if (!regulator_name_is_unique(dev, uc_pdata->name)) {
|
||||||
debug("'%s' of dev: '%s', has nonunique value: '%s\n",
|
dev_dbg(dev, "'%s' has nonunique value: '%s\n",
|
||||||
property, dev->name, uc_pdata->name);
|
property, uc_pdata->name);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue