[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] hw/sensor: add Intersil ISL69260 device model
From: |
Titus Rwantare |
Subject: |
Re: [PATCH 3/5] hw/sensor: add Intersil ISL69260 device model |
Date: |
Thu, 27 Jan 2022 12:54:20 -0800 |
On Thu, 27 Jan 2022 at 11:39, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Thu, 6 Jan 2022 at 23:19, Titus Rwantare <titusr@google.com> wrote:
> >
> > +static uint8_t isl_pmbus_read_byte(PMBusDevice *pmdev)
> > +{
> > + qemu_log_mask(LOG_GUEST_ERROR,
> > + "%s: reading from unsupported register: 0x%02x\n",
> > + __func__, pmdev->code);
> > + return 0xFF;
> > +}
> > +
> > +static int isl_pmbus_write_data(PMBusDevice *pmdev, const uint8_t *buf,
> > + uint8_t len)
> > +{
> > + qemu_log_mask(LOG_GUEST_ERROR,
> > + "%s: write to unsupported register: 0x%02x\n",
> > + __func__, pmdev->code);
> > + return 0xFF;
> > +}
>
> This device appears to have no implemented guest visible
> interface at all, and yet it has a lot of object properties.
> What's going on here ?
>
> thanks
> -- PMM
This device relies on read_byte and write_data implemented in
pmbus_device.c. Those generic implementations fall through to the
device specific implementations for registers not in the standard.
This qemu model happens not to include additional registers. However,
I must change these to LOG_UNIMP which is more appropriate to what's
going on.
Thanks,
Titus