From: Simon Glass Date: Wed, 7 Sep 2022 02:26:54 +0000 (-0600) Subject: sandbox: power: Update PMIC driver to use log X-Git-Tag: v2025.01-rc5-pxa1908~1263^2^2~39 X-Git-Url: http://git.dujemihanovic.xyz/img/login.html?a=commitdiff_plain;h=96d0c4514fdf3ec46c7fba718d4c8c84f51c6574;p=u-boot.git sandbox: power: Update PMIC driver to use log Use the log functions instead of pr_...() so we can avoid using __func__. Signed-off-by: Simon Glass Reviewed-by: Jaehoon Chung --- diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c index d7870915de..acfeae2df9 100644 --- a/drivers/power/pmic/sandbox.c +++ b/drivers/power/pmic/sandbox.c @@ -4,11 +4,14 @@ * Przemyslaw Marczak */ +#define LOG_CATEGORY UCLASS_PMIC + #include #include #include #include #include +#include #include #include #include @@ -28,7 +31,7 @@ static int sandbox_pmic_write(struct udevice *dev, uint reg, 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; } @@ -39,7 +42,7 @@ static int sandbox_pmic_read(struct udevice *dev, uint reg, 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; } @@ -49,8 +52,7 @@ static int sandbox_pmic_read(struct udevice *dev, uint reg, 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;