diff mbox series

[v2,2/5] pmic: pfuze100: Change error message level to debug

Message ID 20200417122713.30574-2-festevam@gmail.com
State Accepted
Commit 417ea635dce2837e2273fa8684ee9750e67eb0ad
Headers show
Series [v2,1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 | expand

Commit Message

Fabio Estevam April 17, 2020, 12:27 p.m. UTC
In some cases U-Boot runs the same binary on different board versions.

In wandboard, for example, there are versions with the PFUZE100 PMIC
populated and others without it.

When the PMIC is not present, it is not really useful to get PMIC error,
so change the error message level to debug instead.

Signed-off-by: Fabio Estevam <festevam at gmail.com>
---
Changes since v1:
- Reworded the commit log for clarity

 drivers/power/pmic/pfuze100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heiko Schocher April 17, 2020, 2:51 p.m. UTC | #1
Hello Fabio,

Am 17.04.2020 um 14:27 schrieb Fabio Estevam:
> In some cases U-Boot runs the same binary on different board versions.
> 
> In wandboard, for example, there are versions with the PFUZE100 PMIC
> populated and others without it.
> 
> When the PMIC is not present, it is not really useful to get PMIC error,
> so change the error message level to debug instead.
> 
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> ---
> Changes since v1:
> - Reworded the commit log for clarity
> 
>   drivers/power/pmic/pfuze100.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Heiko Schocher <hs at denx.de>

Thanks!

bye,
Heiko
> 
> diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
> index 6cf5f35f0f..db630f3ad0 100644
> --- a/drivers/power/pmic/pfuze100.c
> +++ b/drivers/power/pmic/pfuze100.c
> @@ -41,7 +41,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)) {
> -		pr_err("read error from device: %p register: %#x!\n", dev, reg);
> +		debug("read error from device: %p register: %#x!\n", dev, reg);
>   		return -EIO;
>   	}
>   
>
Stefano Babic April 19, 2020, 9:08 a.m. UTC | #2
> In some cases U-Boot runs the same binary on different board versions.
> In wandboard, for example, there are versions with the PFUZE100 PMIC
> populated and others without it.
> When the PMIC is not present, it is not really useful to get PMIC error,
> so change the error message level to debug instead.
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> Tested-by: Heiko Schocher <hs at denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index 6cf5f35f0f..db630f3ad0 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -41,7 +41,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)) {
-		pr_err("read error from device: %p register: %#x!\n", dev, reg);
+		debug("read error from device: %p register: %#x!\n", dev, reg);
 		return -EIO;
 	}