#include <errno.h>
#include <dm.h>
#include <log.h>
+#include <dm/device_compat.h>
#include <dm/uclass-internal.h>
#include <linux/delay.h>
#include <power/pmic.h>
{
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,
- old_uV, new_uV);
+ dev_dbg(dev, "delay %u us (%d uV -> %d uV)\n", delay, old_uV, new_uV);
udelay(delay);
}
for (ret = uclass_find_first_device(UCLASS_REGULATOR, &dev); dev;
ret = uclass_find_next_device(&dev)) {
if (ret) {
- debug("regulator %s, ret=%d\n", dev->name, ret);
+ dev_dbg(dev, "ret=%d\n", ret);
continue;
}
/* Regulator's mandatory constraint */
uc_pdata->name = dev_read_string(dev, property);
if (!uc_pdata->name) {
- debug("%s: dev '%s' has no property '%s'\n",
- __func__, dev->name, property);
+ dev_dbg(dev, "has no property '%s'\n", property);
uc_pdata->name = dev_read_name(dev);
if (!uc_pdata->name)
return -EINVAL;
}
if (!regulator_name_is_unique(dev, uc_pdata->name)) {
- debug("'%s' of dev: '%s', has nonunique value: '%s\n",
- property, dev->name, uc_pdata->name);
+ dev_dbg(dev, "'%s' has nonunique value: '%s\n",
+ property, uc_pdata->name);
return -EINVAL;
}