From: Nikita Shubin Date: Fri, 10 Jan 2025 08:44:47 +0000 (+0300) Subject: QAPI: gpio JSON X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c968c8c91075f257146149689b7cdca63b704389;p=qemu.git QAPI: gpio JSON Signed-off-by: Nikita Shubin --- diff --git a/qapi/gpio.json b/qapi/gpio.json new file mode 100644 index 0000000000..1c2b7af368 --- /dev/null +++ b/qapi/gpio.json @@ -0,0 +1,68 @@ +# -*- Mode: Python -*- +# vim: filetype=python +# + +## +# = Gpio devices +## + +## +# @GpiodevInfo: +# +# Information about a gpio device. +# +# @label: the label of the gpio device +# +# Since: 9.2 +## +{ 'struct': 'GpiodevInfo', + 'data': { 'label': 'str' } } + +## +# @GpiodevBackendKind: +# +# @chardev: chardevs +# +# Since: 9.2 +## +{ 'enum': 'GpiodevBackendKind', + 'data': [ 'chardev' ] } + +## +# @GpiodevChardev: +# +# Configuration info for chardev gpiodevs. +# +# @chardev: chardev id +# +# @size: buffer size, default is 65536 +# +# Since: 9.2 +## + { 'struct': 'GpiodevChardev', + 'data': { 'chardev': 'str', + '*size': 'int' } } + +## +# @GpiodevChardevWrapper: +# +# @data: Configuration info for chardev gpiodevs +# +# Since: 9.2 +## +{ 'struct': 'GpiodevChardevWrapper', + 'data': { 'data': 'GpiodevChardev' } } + +## +# @GpiodevBackend: +# +# Configuration info for the new chardev backend. +# +# @type: backend type +# +# Since: 9.2 +## +{ 'union': 'GpiodevBackend', + 'base': { 'type': 'GpiodevBackendKind' }, + 'discriminator': 'type', + 'data': { 'chardev': 'GpiodevChardevWrapper' } } \ No newline at end of file diff --git a/qapi/meson.build b/qapi/meson.build index eadde4db30..13d255adb8 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -35,6 +35,7 @@ qapi_all_modules = [ 'dump', 'ebpf', 'error', + 'gpio', 'introspect', 'job', 'machine-common', diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index 2877aff73d..03cfa1ed4a 100644 --- a/qapi/qapi-schema.json +++ b/qapi/qapi-schema.json @@ -52,6 +52,7 @@ { 'include': 'block-export.json' } { 'include': 'char.json' } { 'include': 'dump.json' } +{ 'include': 'gpio.json' } { 'include': 'net.json' } { 'include': 'ebpf.json' } { 'include': 'rocker.json' }