On 10/2/23 11:47, Vladimir Sementsov-Ogievskiy wrote:
On 10.02.23 00:28, Philippe Mathieu-Daudé wrote:
On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote:
For PCIe and SHPC hotplug it's important to track led indicators,
especially the power led. Add an event that helps.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
---
  qapi/qdev.json       | 62 ++++++++++++++++++++++++++++++++++++++++++++
  include/hw/pci/pci.h | 15 +++++++++++
  hw/pci/pci.c         | 33 +++++++++++++++++++++++
  hw/pci/pcie.c        | 49 ++++++++++++++++++++++++++++++++++
  hw/pci/shpc.c        | 42 ++++++++++++++++++++++++++++++
  5 files changed, 201 insertions(+)

diff --git a/qapi/qdev.json b/qapi/qdev.json
index 2708fb4e99..40dc34f091 100644
--- a/qapi/qdev.json
+++ b/qapi/qdev.json
@@ -158,3 +158,65 @@
  ##
  { 'event': 'DEVICE_UNPLUG_GUEST_ERROR',
    'data': { '*device': 'str', 'path': 'str' } }
+
+##
+# @HotplugLedState:
+#
+# Since: 8.0
+##
+{ 'enum': 'HotplugLedState',
+  'data': [ 'on', 'blink', 'off' ] }

Could this be more helpful as generic state in "hw/misc/led.h"?

Hmm. LEDState ? Doesn't look similar..

Name 'LedActivity' so we can reuse in LEDState?

  { 'enum': 'LedActivity',
    'data': [ 'on', 'blink', 'off' ] }

Reply via email to