* Przemyslaw Marczak <p.marczak@samsung.com>
*/
+#define LOG_CATEGORY UCLASS_PMIC
+
#include <common.h>
#include <fdtdec.h>
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
const uint8_t *buff, int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- pr_err("write error to device: %p register: %#x!\n", dev, reg);
+ log_err("write error to device: %p register: %#x!\n", dev, reg);
return -EIO;
}
uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- pr_err("read error from device: %p register: %#x!\n", dev, reg);
+ log_err("read error from device: %p register: %#x!\n", dev, reg);
return -EIO;
}
static int sandbox_pmic_bind(struct udevice *dev)
{
if (!pmic_bind_children(dev, dev_ofnode(dev), pmic_children_info))
- pr_err("%s:%d PMIC: %s - no child found!", __func__, __LINE__,
- dev->name);
+ log_err("PMIC: %s - no child found!\n", dev->name);
/* Always return success for this device - allows for PMIC I/O */
return 0;