[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Purpose of QOM properties registered at realize time?

From: Peter Maydell
Subject: Re: Purpose of QOM properties registered at realize time?
Date: Wed, 7 Oct 2020 16:58:46 +0100

On Wed, 7 Oct 2020 at 16:51, Eduardo Habkost <ehabkost@redhat.com> wrote:
> Right now, I only want to know if the QOM property is part of a
> supported stable external interface.  For the properties
> registered at realize time, the answer seems to be "no".

I don't think that's inherently the case. But most QOM
properties are not going to be part of an external
interface (and definitely those for devices which are
not user-creatable are not), so the chances are good
that any particular QOM property is not external.

> Now, how do I locate the code that depends on those QOM
> properties to work?  When the property name is visible in the
> code, I can grep for the property name.  But I don't know how to
> find users of the GPIOs exposed by qdev_pass_gpios().

GPIOs are wired up with the APIs documented in
hw/qdev-core.h: typically qdev_get_gpio_in() to get
an anonymous GPIO input, qdev_get_gpio_in_named()
for a named GPIO line, similarly qdev_connect_gpio_out()
and qdev_connect_gpio_out_named() for oubound GPIO lines.
Most GPIOs are anonymous because that's the older set
of APIs (and sometimes it's still the simplest). To find
which code is wiring up the GPIOs from a particular
device you're better off searching for the device name,
because different devices can use the same name for a
set of GPIO lines (and lots of devices have anonymous
GPIO lines).

The GPIOs exposed by qdev_pass_gpios() are no different
from those exposed when the device directly creates
its own GPIOs.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]