summaryrefslogtreecommitdiff
path: root/drivers/power/pmic
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/pmic')
-rw-r--r--drivers/power/pmic/as3722.c12
-rw-r--r--drivers/power/pmic/as3722_gpio.c10
-rw-r--r--drivers/power/pmic/i2c_pmic_emul.c6
-rw-r--r--drivers/power/pmic/lp873x.c4
-rw-r--r--drivers/power/pmic/lp87565.c4
-rw-r--r--drivers/power/pmic/max77686.c4
-rw-r--r--drivers/power/pmic/max8997.c4
-rw-r--r--drivers/power/pmic/max8998.c4
-rw-r--r--drivers/power/pmic/palmas.c4
-rw-r--r--drivers/power/pmic/pfuze100.c4
-rw-r--r--drivers/power/pmic/s2mps11.c4
-rw-r--r--drivers/power/pmic/s5m8767.c4
-rw-r--r--drivers/power/pmic/sandbox.c6
-rw-r--r--drivers/power/pmic/tps65090.c4
14 files changed, 37 insertions, 37 deletions
diff --git a/drivers/power/pmic/as3722.c b/drivers/power/pmic/as3722.c
index 4efe8ee183..3b0427e0b9 100644
--- a/drivers/power/pmic/as3722.c
+++ b/drivers/power/pmic/as3722.c
@@ -46,14 +46,14 @@ static int as3722_read_id(struct udevice *dev, uint *idp, uint *revisionp)
ret = pmic_reg_read(dev, AS3722_ASIC_ID1);
if (ret < 0) {
- error("failed to read ID1 register: %d", ret);
+ pr_err("failed to read ID1 register: %d", ret);
return ret;
}
*idp = ret;
ret = pmic_reg_read(dev, AS3722_ASIC_ID2);
if (ret < 0) {
- error("failed to read ID2 register: %d", ret);
+ pr_err("failed to read ID2 register: %d", ret);
return ret;
}
*revisionp = ret;
@@ -71,7 +71,7 @@ int as3722_sd_set_voltage(struct udevice *dev, unsigned int sd, u8 value)
ret = pmic_reg_write(dev, AS3722_SD_VOLTAGE(sd), value);
if (ret < 0) {
- error("failed to write SD%u voltage register: %d", sd, ret);
+ pr_err("failed to write SD%u voltage register: %d", sd, ret);
return ret;
}
@@ -87,7 +87,7 @@ int as3722_ldo_set_voltage(struct udevice *dev, unsigned int ldo, u8 value)
ret = pmic_reg_write(dev, AS3722_LDO_VOLTAGE(ldo), value);
if (ret < 0) {
- error("failed to write LDO%u voltage register: %d", ldo,
+ pr_err("failed to write LDO%u voltage register: %d", ldo,
ret);
return ret;
}
@@ -102,12 +102,12 @@ static int as3722_probe(struct udevice *dev)
ret = as3722_read_id(dev, &id, &revision);
if (ret < 0) {
- error("failed to read ID: %d", ret);
+ pr_err("failed to read ID: %d", ret);
return ret;
}
if (id != AS3722_DEVICE_ID) {
- error("unknown device");
+ pr_err("unknown device");
return -ENOENT;
}
diff --git a/drivers/power/pmic/as3722_gpio.c b/drivers/power/pmic/as3722_gpio.c
index d0b681ca4a..5cf4cb6b51 100644
--- a/drivers/power/pmic/as3722_gpio.c
+++ b/drivers/power/pmic/as3722_gpio.c
@@ -26,7 +26,7 @@ int as3722_gpio_configure(struct udevice *pmic, unsigned int gpio,
err = pmic_reg_write(pmic, AS3722_GPIO_CONTROL(gpio), value);
if (err) {
- error("failed to configure GPIO#%u: %d", gpio, err);
+ pr_err("failed to configure GPIO#%u: %d", gpio, err);
return err;
}
@@ -46,7 +46,7 @@ static int as3722_gpio_set_value(struct udevice *dev, unsigned int gpio,
err = pmic_reg_read(pmic, AS3722_GPIO_SIGNAL_OUT);
if (err < 0) {
- error("failed to read GPIO signal out register: %d", err);
+ pr_err("failed to read GPIO signal out register: %d", err);
return err;
}
value = err;
@@ -61,7 +61,7 @@ static int as3722_gpio_set_value(struct udevice *dev, unsigned int gpio,
err = pmic_reg_write(pmic, AS3722_GPIO_SIGNAL_OUT, value);
if (err) {
- error("failed to set GPIO#%u %s: %d", gpio, l, err);
+ pr_err("failed to set GPIO#%u %s: %d", gpio, l, err);
return err;
}
@@ -84,13 +84,13 @@ int as3722_gpio_direction_output(struct udevice *dev, unsigned int gpio,
err = pmic_reg_write(pmic, AS3722_GPIO_CONTROL(gpio), value);
if (err) {
- error("failed to configure GPIO#%u as output: %d", gpio, err);
+ pr_err("failed to configure GPIO#%u as output: %d", gpio, err);
return err;
}
err = as3722_gpio_set_value(pmic, gpio, value);
if (err < 0) {
- error("failed to set GPIO#%u high: %d", gpio, err);
+ pr_err("failed to set GPIO#%u high: %d", gpio, err);
return err;
}
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index 2d35d09d45..38a2a04f17 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -31,7 +31,7 @@ static int sandbox_i2c_pmic_read_data(struct udevice *emul, uchar chip,
struct sandbox_i2c_pmic_plat_data *plat = dev_get_platdata(emul);
if (plat->rw_reg + len > SANDBOX_PMIC_REG_COUNT) {
- error("Request exceeds PMIC register range! Max register: %#x",
+ pr_err("Request exceeds PMIC register range! Max register: %#x",
SANDBOX_PMIC_REG_COUNT);
return -EFAULT;
}
@@ -68,7 +68,7 @@ static int sandbox_i2c_pmic_write_data(struct udevice *emul, uchar chip,
len--;
if (plat->rw_reg + len > SANDBOX_PMIC_REG_COUNT) {
- error("Request exceeds PMIC register range! Max register: %#x",
+ pr_err("Request exceeds PMIC register range! Max register: %#x",
SANDBOX_PMIC_REG_COUNT);
}
@@ -111,7 +111,7 @@ static int sandbox_i2c_pmic_ofdata_to_platdata(struct udevice *emul)
SANDBOX_PMIC_REG_COUNT);
if (!reg_defaults) {
- error("Property \"reg-defaults\" not found for device: %s!",
+ pr_err("Property \"reg-defaults\" not found for device: %s!",
emul->name);
return -EINVAL;
}
diff --git a/drivers/power/pmic/lp873x.c b/drivers/power/pmic/lp873x.c
index f505468313..95c2b7e8c7 100644
--- a/drivers/power/pmic/lp873x.c
+++ b/drivers/power/pmic/lp873x.c
@@ -27,7 +27,7 @@ static int lp873x_write(struct udevice *dev, uint reg, const uint8_t *buff,
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return -EIO;
}
@@ -37,7 +37,7 @@ static int lp873x_write(struct udevice *dev, uint reg, const uint8_t *buff,
static int lp873x_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return -EIO;
}
diff --git a/drivers/power/pmic/lp87565.c b/drivers/power/pmic/lp87565.c
index 782a46c4cc..506769e362 100644
--- a/drivers/power/pmic/lp87565.c
+++ b/drivers/power/pmic/lp87565.c
@@ -29,7 +29,7 @@ static int lp87565_write(struct udevice *dev, uint reg, const uint8_t *buff,
ret = dm_i2c_write(dev, reg, buff, len);
if (ret)
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return ret;
}
@@ -40,7 +40,7 @@ static int lp87565_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
ret = dm_i2c_read(dev, reg, buff, len);
if (ret)
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return ret;
}
diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
index ceca9f96a7..b3ed84992f 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -31,7 +31,7 @@ static int max77686_write(struct udevice *dev, uint reg, const uint8_t *buff,
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return -EIO;
}
@@ -41,7 +41,7 @@ static int max77686_write(struct udevice *dev, uint reg, const uint8_t *buff,
static int max77686_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return -EIO;
}
diff --git a/drivers/power/pmic/max8997.c b/drivers/power/pmic/max8997.c
index f749d7debf..5ebeb8a316 100644
--- a/drivers/power/pmic/max8997.c
+++ b/drivers/power/pmic/max8997.c
@@ -26,7 +26,7 @@ static int max8997_write(struct udevice *dev, uint reg, const uint8_t *buff,
ret = dm_i2c_write(dev, reg, buff, len);
if (ret)
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return ret;
}
@@ -37,7 +37,7 @@ static int max8997_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
ret = dm_i2c_read(dev, reg, buff, len);
if (ret)
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return ret;
}
diff --git a/drivers/power/pmic/max8998.c b/drivers/power/pmic/max8998.c
index 7c4773c7b3..a7e04699e8 100644
--- a/drivers/power/pmic/max8998.c
+++ b/drivers/power/pmic/max8998.c
@@ -26,7 +26,7 @@ static int max8998_write(struct udevice *dev, uint reg, const uint8_t *buff,
ret = dm_i2c_write(dev, reg, buff, len);
if (ret)
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return ret;
}
@@ -37,7 +37,7 @@ static int max8998_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
ret = dm_i2c_read(dev, reg, buff, len);
if (ret)
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return ret;
}
diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c
index 804c0d13a0..1e1ecb382e 100644
--- a/drivers/power/pmic/palmas.c
+++ b/drivers/power/pmic/palmas.c
@@ -27,7 +27,7 @@ static int palmas_write(struct udevice *dev, uint reg, const uint8_t *buff,
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return -EIO;
}
@@ -37,7 +37,7 @@ static int palmas_write(struct udevice *dev, uint reg, const uint8_t *buff,
static int palmas_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return -EIO;
}
diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index 5f361c7696..a06cbc07d4 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -33,7 +33,7 @@ static int pfuze100_write(struct udevice *dev, uint reg, const uint8_t *buff,
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return -EIO;
}
@@ -43,7 +43,7 @@ static int pfuze100_write(struct udevice *dev, uint reg, const uint8_t *buff,
static int pfuze100_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return -EIO;
}
diff --git a/drivers/power/pmic/s2mps11.c b/drivers/power/pmic/s2mps11.c
index 9d83059c40..522105e5ff 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -27,7 +27,7 @@ static int s2mps11_write(struct udevice *dev, uint reg, const uint8_t *buff,
ret = dm_i2c_write(dev, reg, buff, len);
if (ret)
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return ret;
}
@@ -38,7 +38,7 @@ static int s2mps11_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
ret = dm_i2c_read(dev, reg, buff, len);
if (ret)
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return ret;
}
diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c
index f8ae5ea2db..3812e240ab 100644
--- a/drivers/power/pmic/s5m8767.c
+++ b/drivers/power/pmic/s5m8767.c
@@ -30,7 +30,7 @@ static int s5m8767_write(struct udevice *dev, uint reg, const uint8_t *buff,
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return -EIO;
}
@@ -40,7 +40,7 @@ static int s5m8767_write(struct udevice *dev, uint reg, const uint8_t *buff,
static int s5m8767_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return -EIO;
}
diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c
index 6763303c66..e8d6faca16 100644
--- a/drivers/power/pmic/sandbox.c
+++ b/drivers/power/pmic/sandbox.c
@@ -31,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)) {
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return -EIO;
}
@@ -42,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)) {
- error("read error from device: %p register: %#x!", dev, reg);
+ pr_err("read error from device: %p register: %#x!", dev, reg);
return -EIO;
}
@@ -52,7 +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))
- error("%s:%d PMIC: %s - no child found!", __func__, __LINE__,
+ pr_err("%s:%d PMIC: %s - no child found!", __func__, __LINE__,
dev->name);
/* Always return success for this device - allows for PMIC I/O */
diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c
index 4565e3b54c..ee5358bced 100644
--- a/drivers/power/pmic/tps65090.c
+++ b/drivers/power/pmic/tps65090.c
@@ -29,7 +29,7 @@ static int tps65090_write(struct udevice *dev, uint reg, const uint8_t *buff,
int len)
{
if (dm_i2c_write(dev, reg, buff, len)) {
- error("write error to device: %p register: %#x!", dev, reg);
+ pr_err("write error to device: %p register: %#x!", dev, reg);
return -EIO;
}
@@ -42,7 +42,7 @@ static int tps65090_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
ret = dm_i2c_read(dev, reg, buff, len);
if (ret) {
- error("read error %d from device: %p register: %#x!", ret, dev,
+ pr_err("read error %d from device: %p register: %#x!", ret, dev,
reg);
return -EIO;
}