From patchwork Thu Jun 10 12:09:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 457849 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp408317jae; Thu, 10 Jun 2021 05:10:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz74k8xrx9IxdSJuh1HLrhr12k2Y5yk0HhKjejcSlRUWda4CWqT4Q1HdVjUHAKcMdiw6iBm X-Received: by 2002:a17:906:f88b:: with SMTP id lg11mr3956810ejb.99.1623327035025; Thu, 10 Jun 2021 05:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623327035; cv=none; d=google.com; s=arc-20160816; b=Oal/amh2z1qG5mZskexuYMo008DDJAuXBicLIgVfXYkL04fPVSZYgvs3gi7L2AWMFW 3KCmIEce6gSbiw3y8mxfsPo3ibhW5FSH3t6DMrydZwFwDAY2+UOx0KlK3FAi8cAXur7a O2zw/SLd8qR6PmFBHpvUf/xNgh6YtXyG1gHbQiwiTkuyY+xCtL8hM2D0rSXqpVYjBsKu siRZt+qOH2IbdX4zGUx6CblzzGLwyM5CcobiSgrqp9IxGandTbtULzcbJjJxNszoFFVc MmQEHWcAmdcAb9Sg80tqJDRETcHQeTl73DyyVvowpY5fuACs3kuAuTW3qKp88MeAYhVl YEZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=b8nZP+Gapaq0m2CiyXSp+UoYpv4V40nbqCx5vZWy2So=; b=vdv33AcBpm4fxTbmn0C1dbaPGEhmfmQGMpuy8C1eQo3KDS5100Kqa5FMKJuLInzFmA zUBMBgwM8ME1yZEWsJmFwNGS8UBzeTG3vcnRtoz93ifPdCJnLY8JeWkYgkDyghaxYQA5 9CBWgpaNZHFatGyo/OYt5qmC8WWTQaT82W5ORxoNdgw2cHEkHmAvV9gLB9d6mSE2qjBQ 2DtAjMyPf0QqHKU+gIOEPzZ/hG5vbY97IZWxsSKz1GpdELCsRNtHc7PHu6A/ENlBLlC3 L9BZdB4j7Ij3ZiRPD2g2Rh4rahB1dcYga0BjsNb0f5dDLm3BDS3ZuF4jfEfB3WZRBzcH K0Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qNpHGLbz; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si2268548eju.491.2021.06.10.05.10.34; Thu, 10 Jun 2021 05:10:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qNpHGLbz; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbhFJMM3 (ORCPT + 3 others); Thu, 10 Jun 2021 08:12:29 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:41499 "EHLO mail-pf1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbhFJMM3 (ORCPT ); Thu, 10 Jun 2021 08:12:29 -0400 Received: by mail-pf1-f181.google.com with SMTP id x73so1439390pfc.8 for ; Thu, 10 Jun 2021 05:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=b8nZP+Gapaq0m2CiyXSp+UoYpv4V40nbqCx5vZWy2So=; b=qNpHGLbzx8OhyV03T1XQBAEOd4lRjyRCU0fJwWQZM9z8cmhPoAFi+GDxkHRMRhazLH R0nsMAtnYe96LshwmR/TMRPVGoU8ytMBoxbmB53R8tZYrcmwEFY8HlHAn44TpYb0pzTh qmB77sFVrdZyAyBI4G19njPnorLQYKYdmRF092cSd0Ei7zqUxCPk/1jsa5KnX0YhIvk1 SzFP1/gawTAr5K0/RmkjYDxzJD37wlU3JNFPy+LzxoihOhSyx3ZJ+C93QrVboF34Xv0n Li/GbaMZV6qI7CbrdPL5RJ9aq7yt+bgyv+rUCOxswMYCURW7p2jiiOGrkgPqjecyRGWA 0TTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=b8nZP+Gapaq0m2CiyXSp+UoYpv4V40nbqCx5vZWy2So=; b=LJi80220b1FW2fLuPWrIHJE54X/zPo/13Eyue634qIErzdQ3C51hQH1D4ZQCyaniT1 tT2gA3EpzCMMN97Tz9tscreze4rAx4I/YhNv9QlitpDNRPDBWqIxZt1WkV4WZT4kQaBK Qpyn4KbNpT8oOlFF/mmHKMzb+/487HB/4II74nQm3mu9cLdPxdPm6syUz02R3GVlba6Q gnEe+DiGS1h2f62Y7FrcNqQLvQL+dmHr+2a1mAxYSkW/cSjw6a3GEdlt7XsFFrgchk+t r3x4JUz7oopsyA35xuC6RwGUvqKhu83cGBnLX0eMnpg3qSxkLoWTUvczxxWz+HcMARcS 4y5Q== X-Gm-Message-State: AOAM532zCDLIuzLMz0DGH+wh7TZi/ki3xvlKwEo/VT6/qlp6Ao7OwadL I69JVFnNYYkqr2DPRDRFfFAvAg== X-Received: by 2002:a62:ab16:0:b029:2ed:8599:7df8 with SMTP id p22-20020a62ab160000b02902ed85997df8mr2772433pff.31.1623326957801; Thu, 10 Jun 2021 05:09:17 -0700 (PDT) Received: from localhost ([136.185.169.128]) by smtp.gmail.com with ESMTPSA id v67sm2423802pfb.193.2021.06.10.05.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 05:09:17 -0700 (PDT) From: Viresh Kumar To: Bartosz Golaszewski , Linus Walleij , "Enrico Weigelt, metux IT consult" , Jason Wang , "Michael S. Tsirkin" , Viresh Kumar Cc: Viresh Kumar , Vincent Guittot , Bill Mills , =?utf-8?q?Alex_Benn=C3=A9e?= , stratos-dev@op-lists.linaro.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Hajnoczi , "Stefano Garzarella --cc virtualization @ lists . linux-foundation . org" , virtualization@lists.linux-foundation.org Subject: [PATCH V3 0/3] gpio: Add virtio based driver Date: Thu, 10 Jun 2021 17:39:05 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hello, This adds a virtio based GPIO driver based on the proposed specification [1]. The first two versions [2] were sent by Enrico earlier and here is a newer version. I have retained the authorship of the work done by Enrico (1st patch) to make sure we don't loose his credits. I have tested all basic operations of the patchset (with Qemu guest) with the libgpiod utility. I have also tested the handling of interrupts on the guest side. All works as expected. I will now be working towards a Rust based hypervisor agnostic backend to provide a generic solution for that. This should be merged only after the specifications are merged, I will keep everyone posted for the same. I am not adding a version history here as a lot of changes have been made, from protocol to code and this really needs a full review from scratch. -- Viresh [1] https://lists.oasis-open.org/archives/virtio-comment/202106/msg00022.html [2] https://lore.kernel.org/linux-gpio/20201203191135.21576-2-info@metux.net/ Enrico Weigelt, metux IT consult (1): gpio: Add virtio-gpio driver Viresh Kumar (2): gpio: virtio: Add IRQ support MAINTAINERS: Add entry for Virtio-gpio MAINTAINERS | 7 + drivers/gpio/Kconfig | 9 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-virtio.c | 566 +++++++++++++++++++++++++++++++ include/uapi/linux/virtio_gpio.h | 56 +++ include/uapi/linux/virtio_ids.h | 1 + 6 files changed, 640 insertions(+) create mode 100644 drivers/gpio/gpio-virtio.c create mode 100644 include/uapi/linux/virtio_gpio.h -- 2.31.1.272.g89b43f80a514