diff mbox series

[v3,3/9] hw/i2c: pmbus: add PEC unsupported warning

Message ID 20220302015053.1984165-4-titusr@google.com (mailing list archive)
State New, archived
Headers show
Series This patch series contains updates to PMBus in QEMU along with some PMBus device models for Renesas regulators. I have also added myself to MAINTAINERS as this code is in use daily, where I am responsible for it. | expand

Commit Message

Titus Rwantare March 2, 2022, 1:50 a.m. UTC
Signed-off-by: Titus Rwantare <titusr@google.com>
---
 hw/i2c/pmbus_device.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Philippe Mathieu-Daudé March 5, 2022, 12:01 a.m. UTC | #1
On 2/3/22 02:50, Titus Rwantare wrote:
> Signed-off-by: Titus Rwantare <titusr@google.com>
> ---
>   hw/i2c/pmbus_device.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c
> index 93c746bab3..6eeb0731d7 100644
> --- a/hw/i2c/pmbus_device.c
> +++ b/hw/i2c/pmbus_device.c
> @@ -307,6 +307,11 @@ static uint8_t pmbus_receive_byte(SMBusDevice *smd)
>   
>       case PMBUS_CAPABILITY:
>           pmbus_send8(pmdev, pmdev->capability);
> +        if (pmdev->capability & BIT(7)) {
> +            qemu_log_mask(LOG_GUEST_ERROR,

That would be LOG_UNIMP?

> +                          "%s: PEC is enabled but not yet supported.\n",
> +                          __func__);
> +        }
>           break;
>   
>       case PMBUS_VOUT_MODE:                 /* R/W byte */
Titus Rwantare March 7, 2022, 7:31 p.m. UTC | #2
Yes, fixed.

On Fri, 4 Mar 2022 at 16:02, Philippe Mathieu-Daudé
<philippe.mathieu.daude@gmail.com> wrote:
>
> On 2/3/22 02:50, Titus Rwantare wrote:
> > Signed-off-by: Titus Rwantare <titusr@google.com>
> > ---
> >   hw/i2c/pmbus_device.c | 5 +++++
> >   1 file changed, 5 insertions(+)
> >
> > diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c
> > index 93c746bab3..6eeb0731d7 100644
> > --- a/hw/i2c/pmbus_device.c
> > +++ b/hw/i2c/pmbus_device.c
> > @@ -307,6 +307,11 @@ static uint8_t pmbus_receive_byte(SMBusDevice *smd)
> >
> >       case PMBUS_CAPABILITY:
> >           pmbus_send8(pmdev, pmdev->capability);
> > +        if (pmdev->capability & BIT(7)) {
> > +            qemu_log_mask(LOG_GUEST_ERROR,
>
> That would be LOG_UNIMP?
>
> > +                          "%s: PEC is enabled but not yet supported.\n",
> > +                          __func__);
> > +        }
> >           break;
> >
> >       case PMBUS_VOUT_MODE:                 /* R/W byte */
>
diff mbox series

Patch

diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c
index 93c746bab3..6eeb0731d7 100644
--- a/hw/i2c/pmbus_device.c
+++ b/hw/i2c/pmbus_device.c
@@ -307,6 +307,11 @@  static uint8_t pmbus_receive_byte(SMBusDevice *smd)
 
     case PMBUS_CAPABILITY:
         pmbus_send8(pmdev, pmdev->capability);
+        if (pmdev->capability & BIT(7)) {
+            qemu_log_mask(LOG_GUEST_ERROR,
+                          "%s: PEC is enabled but not yet supported.\n",
+                          __func__);
+        }
         break;
 
     case PMBUS_VOUT_MODE:                 /* R/W byte */