misc/pca9552: Add qom set and get
commita90d8f84674da3afaaa15fca7a47901fac5f47b5
authorJoel Stanley <joel@jms.id.au>
Thu, 30 Jan 2020 16:02:02 +0000 (30 16:02 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 30 Jan 2020 16:02:02 +0000 (30 16:02 +0000)
tree3540e0f0f6e675edf8d7920b0ce19dd0942c5dd3
parent1a15311a12fa6a5c865e7f779e6e1b2557440626
misc/pca9552: Add qom set and get

Following the pattern of the work recently done with the ASPEED GPIO
model, this adds support for inspecting and modifying the PCA9552 LEDs
from the monitor.

 (qemu) qom-set  /machine/unattached/device[17] led0 on
 (qemu) qom-set  /machine/unattached/device[17] led0 off
 (qemu) qom-set  /machine/unattached/device[17] led0 pwm0
 (qemu) qom-set  /machine/unattached/device[17] led0 pwm1

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20200114103433.30534-6-clg@kaod.org
[clg: - removed the "qom-get" examples from the commit log
      - merged memory leak fixes from Joel ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/misc/pca9552.c