@@ -17,6 +17,7 @@
#include "migration/vmstate.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
+#include "trace.h"
#define PCA9552_LED_ON 0x0
#define PCA9552_LED_OFF 0x1
@@ -45,9 +46,15 @@ static void pca9552_update_pin_input(PCA9552State *s)
switch (config) {
case PCA9552_LED_ON:
s->regs[input_reg] |= 1 << input_shift;
+ if (input_shift < s->nr_leds) {
+ trace_pca9552_led_set(input_shift, true);
+ }
break;
case PCA9552_LED_OFF:
s->regs[input_reg] &= ~(1 << input_shift);
+ if (input_shift < s->nr_leds) {
+ trace_pca9552_led_set(input_shift, false);
+ }
break;
case PCA9552_LED_PWM0:
case PCA9552_LED_PWM1:
@@ -206,3 +206,6 @@ via1_rtc_cmd_pram_sect_write(int sector, int offset, int addr, int value) "secto
# grlib_ahb_apb_pnp.c
grlib_ahb_pnp_read(uint64_t addr, uint32_t value) "AHB PnP read addr:0x%03"PRIx64" data:0x%08x"
grlib_apb_pnp_read(uint64_t addr, uint32_t value) "APB PnP read addr:0x%03"PRIx64" data:0x%08x"
+
+# pca9552.c
+pca9552_led_set(unsigned id, bool state) "LED#%d state:%u"
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/misc/pca9552.c | 7 +++++++ hw/misc/trace-events | 3 +++ 2 files changed, 10 insertions(+)