From nobody Fri Apr 4 06:07:08 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1742388849; cv=none; d=zohomail.com; s=zohoarc; b=aDta4x8uFwwznSqD+Wt6Cs8A+gMwVuIVwknw6qunVWlreHGadwuQi3dYvGa63z20n7/CaLWlWO+rvB4+6jd7dzzRGgSvonLxrCJ5ZCIKEyoG+oMAdS9j4QblR6vv85l3CmfLR4KuWqaSs+XHOPMQsSLBDBx8xITr8lgAtG4SYGg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742388849; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=vHzYjWhZ79fYrijwtuLOl4fk33vNs7A9LL9/qd/JJcQ=; b=ZT/oKpuYUyTkiTJIreUlsij5FNwR0esQHsBGJpirhpaOvznuHi4j4nmS6DrzDmqJjs5hhcTvfr2mSxCEebk5GMELhtFSp+qlWoFvNHzPiBnBo5l0Cct+zqI4B1a/q0SNTMt5n43g34zExOifAGf4zPYvzumDHgK6HXblth4F3wY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742388849463940.0596907096137; Wed, 19 Mar 2025 05:54:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tusrg-0000RY-Cl; Wed, 19 Mar 2025 08:49:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuoJT-0006Fy-K8; Wed, 19 Mar 2025 03:58:07 -0400 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuoJQ-0003dg-Cp; Wed, 19 Mar 2025 03:58:07 -0400 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 9A09561146; Wed, 19 Mar 2025 07:57:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 773F8C4CEEA; Wed, 19 Mar 2025 07:57:54 +0000 (UTC) Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A718C35FFF; Wed, 19 Mar 2025 07:57:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742371074; bh=mE2MaBr2QtIINHy+w5jhliGc0m4u+0PDxW2SPqeU2j4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=oRFa/G3t3tcD6yuqUbS0yEv9KX3oSsd2Jr5IFd/ilSqjmvis0qWHHC0ycb1gRGHPW 61o7UUqgJT2OkhhBwhW543+AYnDwzqkH61jcWPSZVoILzpyj9D9kRR/MyccrIX0YWY PIM7c0S8ZI/ywYtaYB8X1UirqcZrnPHRiFqlq6HJ/BgP2K5Db2yV318bh4s+SSKB4p yh5ySBQtoo90ugPtBVw7yiF0HGrcr/JqPaxRa6aZOH/r3EQASFNro++Keaa2YL829M 0Vv+kbmdqgIApBm+aBG+EfdagvziFjiIaVWBLTtIvQC0ggC0U6t9AhaWhWOD+G8puZ WTyxOrWNG8D5g== From: Nikita Shubin via B4 Relay Date: Wed, 19 Mar 2025 10:57:51 +0300 Subject: [PATCH PoC 1/7] QAPI: gpio JSON MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250319-gpiodev-v1-1-76da4e5800a1@yadro.com> References: <20250319-gpiodev-v1-0-76da4e5800a1@yadro.com> In-Reply-To: <20250319-gpiodev-v1-0-76da4e5800a1@yadro.com> To: qemu-devel@nongnu.org Cc: Linus Walleij , Bartosz Golaszewski , "Enrico Weigelt, metux IT consult" , Viresh Kumar , Eric Blake , Markus Armbruster , Michael Roth , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Andrew Jeffery , Joel Stanley , qemu-arm@nongnu.org, Nikita Shubin , Nikita Shubin , Nikita Shubin X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1742371072; l=2476; i=n.shubin@yadro.com; s=20230718; h=from:subject:message-id; bh=yL5seaoNiRVlQ6Vi3YlxRJ5NFJn0Q9alBbQrrB7t0Sw=; b=YB9LbqclbLblyvFQXTTPw/d9jF1oOaso31QxGYcWBQPr1gC5v09w3qjV7m9K+tTJgMICur3vS HLPawi1W6dXBIfx7TEeM9Pftlkni22KryLNBv10MIdhlql2w9loRq7J X-Developer-Key: i=n.shubin@yadro.com; a=ed25519; pk=vqf5YIUJ7BJv3EJFaNNxWZgGuMgDH6rwufTLflwU9ac= X-Endpoint-Received: by B4 Relay for n.shubin@yadro.com/20230718 with auth_id=161 X-Original-From: Nikita Shubin Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2600:3c04:e001:324:0:1991:8:25; envelope-from=devnull+n.shubin.yadro.com@kernel.org; helo=tor.source.kernel.org X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.332, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 19 Mar 2025 08:49:30 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: n.shubin@yadro.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1742388851139019100 From: Nikita Shubin Signed-off-by: Nikita Shubin --- qapi/gpio.json | 68 +++++++++++++++++++++++++++++++++++++++++++++++= ++++ qapi/meson.build | 1 + qapi/qapi-schema.json | 1 + 3 files changed, 70 insertions(+) diff --git a/qapi/gpio.json b/qapi/gpio.json new file mode 100644 index 0000000000000000000000000000000000000000..1c2b7af36813ff52cbb3a44e64a= 2e5a5d8658d62 --- /dev/null +++ b/qapi/gpio.json @@ -0,0 +1,68 @@ +# -*- Mode: Python -*- +# vim: filetype=3Dpython +# + +## +# =3D 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 eadde4db307f0c54a7a1f2471a063c78346810cc..13d255adb8e6d823356fe0ecae0= b585688320f9d 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -35,6 +35,7 @@ qapi_all_modules =3D [ 'dump', 'ebpf', 'error', + 'gpio', 'introspect', 'job', 'machine-common', diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index 2877aff73d0caff9d4ed681de0690c24a268cecd..03cfa1ed4a0438d00a6151d5616= 7ec929467f15d 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' } --=20 2.45.2