From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AECAB47A0C0 for ; Wed, 15 Jul 2026 15:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784128255; cv=none; b=d6ayAUAnr+XdjySN1Inne/N+tY4qTgodFxfJVPvcYj1xPTIsHah1fOdOi2Qa4+1brnYmczjyVZBDLgzZAeDXMJG2GsTPmnt33izwi6ICpARjGCuZT91zB22VYY2Fi5vhy6wOymwaWtqKNv21VSBeLfFfjA7H1cBoXMPDZ2xIKpc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784128255; c=relaxed/simple; bh=cUtM9nCXCjAw/x4a+bjTLJgqufLVfuAa653qViepFAQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eWWfJbSvdVz+5UAxoVhUNYgu8frTriOphz76InU9BYRbbSevy3efsl7P/Xgc7vLX3WyR66E8YPvQ83Eossv3lzNobZ9HQrFYj9wcCT4R/FQZJIOByElZTC1v35vNHYWAQE12aYnP8gPOlwl6izSawQpbxDXIjcVCmohVqA0mK/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=O1HKQw9f; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="O1HKQw9f" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2cedda2ce6fso23370255ad.1 for ; Wed, 15 Jul 2026 08:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1784128253; x=1784733053; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=0f1V+XLP/pNL55h1xnCAtGPJkQJwQhVW+vGDr0a9svY=; b=O1HKQw9fEgpdfYOoz8qtNNfuoqq3VjHjMVlXTBIiJpbDpxJc/yrdlbr0zIph+DZvFw RVnzX4o26YKYYCg6lYyEAfFUXGiApYSLbnIj+qlojX8iNsB4BkLC+CMLgT3KF8N2pdfa C7+EAMkF8ogIZuSz+QG65wPG2MTRQ5DTrsqCZzWfle5Z+hXoflzA5UwphE+2UThjQOpd OBbdWpM+lmH4JAX54XmoSNi5aQJcDhJZfZhL+P2izgdWnlV7xsBzFZpDrtNL+mM2LB2M MjCudTCPm56wKAOnvRsw36sJb4K9E1nGFWcgdQ4U7GpQN3dBlorHH/BnFnpSm2ukapat TOlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784128253; x=1784733053; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=0f1V+XLP/pNL55h1xnCAtGPJkQJwQhVW+vGDr0a9svY=; b=FFfchDPrzi1It5SNxKzNOL4FdeiaCGQfeS0Aa0vNEaSNmNPkGQXyQpWu4Xwu+GBdII qrVaohX/PXaQN9qeH1uXic1hpZ3LR4BOdz1qly1rjbeVxJnv7WX/OthmI6+4ONFI83N4 ++lf4JYeFr9O1YmYQE9ajf2Et75Tvumo3QaixVYSg8I5bNAsiJdwOTE50MAn3+6F3dxw iLlwByCvB+lJWxHwvDZeWzOKwGQbI2SHZGoyZQEYmrsPskszoSSnAE6EgI/1SxNkCdQt gKh8bO06PsmpBWWj3Ho+Mn3unT4m+yB3PxE8YYxRxso373A7blodXgqA0p9xN/helmea Yruw== X-Forwarded-Encrypted: i=1; AHgh+RpfltTczf2+jlKKzr5wuUFVpysDB5ALYtbNJTRjFAsRx9fwyUVtp/LGUAS0mcK5Xp44qiZsXLMByLt15GE=@vger.kernel.org X-Gm-Message-State: AOJu0YwOQUMO1e+YCzj6716q5Xb9SUmAM0uixYKvr4h/qQIbe9GaMVcd vziU1ynz5wNKNpcd7su8Xa1pq+fjip19IrIlt2tfPFPWblqjlQCjnx+51Gv9LKxmpn4= X-Gm-Gg: AfdE7clAjXfdnc9NGmotP4/Z0HBhffMx0XRnjVwvQT1hdx3yB6t8WNnzq9JHjYfpqz/ HxH5wfrh4cFG5xMLl00VQNyXhCgJ5Ql5Lc8Hg3xCAbLqWT4eeqg+Ps0Iz9EAqXKwGhdvFB85XV2 PI8C/Phf1G+dVyEyH7SJ5JRtV0aBI4iMmAiBAXk80fMoZCRTpbpY7rDdr06KJQs81LW3EP0Bzst gzfi7uP/dpHZ2MDh44C6uSwPVWKrxkxGEIauX4rHgjEEES8LvmtmOEyw/4URDH6eYZiHrocyzAC 9KS5Gy8bmaj0Ql5gk+N6/FK+EasCY6WLPww7oBGrwKE6c3edAxjX4tvBUf5gere2A8Yjzr8H3JF qOkH2orJM+v1vjYaRqTtNQqckque80+56pT6JBhCITxlm/RtJcAwipif2MJeFPwXhCB91fy9r0P nR/c3KQ3rFiI/GFpN6pO0hInGvhbs= X-Received: by 2002:a17:903:1a2e:b0:2cc:eec6:558 with SMTP id d9443c01a7336-2cef14ad047mr75726665ad.39.1784128252771; Wed, 15 Jul 2026 08:10:52 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:4f38:9a5e:fd18:7a9b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cf0fdb3a0asm4417715ad.0.2026.07.15.08.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2026 08:10:52 -0700 (PDT) Date: Wed, 15 Jul 2026 09:10:49 -0600 From: Mathieu Poirier To: "Shenwei Wang (OSS)" Cc: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Frank Li , Sascha Hauer , Shuah Khan , "linux-gpio@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Pengutronix Kernel Team , Fabio Estevam , Shenwei Wang , Peng Fan , "devicetree@vger.kernel.org" , "linux-remoteproc@vger.kernel.org" , "imx@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx , Arnaud POULIQUEN , "b-padhi@ti.com" , Andrew Lunn Subject: Re: [PATCH v14 1/5] docs: driver-api: gpio: rpmsg gpio driver over rpmsg bus Message-ID: References: <20260625155432.815185-1-shenwei.wang@oss.nxp.com> <20260625155432.815185-2-shenwei.wang@oss.nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jul 14, 2026 at 07:04:08PM +0000, Shenwei Wang (OSS) wrote: > > > > -----Original Message----- > > From: Mathieu Poirier > > Sent: Monday, July 13, 2026 12:17 PM > > To: Shenwei Wang (OSS) > > Cc: Linus Walleij ; Bartosz Golaszewski ; > > Jonathan Corbet ; Rob Herring ; Krzysztof > > Kozlowski ; Conor Dooley ; Bjorn > > Andersson ; Frank Li ; Sascha Hauer > > ; Shuah Khan ; linux- > > gpio@vger.kernel.org; linux-doc@vger.kernel.org; linux-kernel@vger.kernel.org; > > Pengutronix Kernel Team ; Fabio Estevam > > ; Shenwei Wang ; Peng Fan > > ; devicetree@vger.kernel.org; linux- > > remoteproc@vger.kernel.org; imx@lists.linux.dev; linux-arm- > > kernel@lists.infradead.org; dl-linux-imx ; Arnaud > > POULIQUEN ; b-padhi@ti.com; Andrew Lunn > > > > Subject: Re: [PATCH v14 1/5] docs: driver-api: gpio: rpmsg gpio driver over rpmsg > > bus > > > > > + > > > +The RPMSG message consists of a 8-byte packet with the following layout: > > > + > > > +.. code-block:: none > > > +.. code-block:: none > > > + > > > + +------+------+--------+ > > > + | 0x00 | 0x01 | 0x02 | > > > + | 2 | line | trigger| > > > + +------+------+--------+ > > > > 2 things here: > > > > 1) You did not include messages that mask and unmask interrupts at the driver > > side. > > > > 2) We are carrying virtio-gpio messages on top of RPMSG and as such, this whole > > protocol should be about thar: > > > > +------+------+--------+-------- > > | 0x00 | payload | > > | Q | | > > +------+------+--------+-------- > > > > Q = 0 requestq > > Q = 1 eventq > > > > The "payload" part is simply the format of the messages as found in the virtio- > > gpio specification. From there, the only thing left to mention is which messages > > are not supported, i.e get line names. > > > > > + > > > +- **line**: The GPIO line (pin) index of the port. > > > + > > > +- **trigger**: Optional parameter to indicate the trigger event type. > > > > Not part of the spec - remove. > > > > The two fields above are required for rpmsg-gpio, but not for virtio-gpio. I agree that the line is required but not the trigger. The driver (using the same terminology as the specification) knows what trigger the pin has been configured for. Adding the trigger information to the interrupt notification is redundant. > > In the rpmsg-gpio case, interrupt detection and handling occur on the remote processor. The > interrupt information (such as the GPIO line and trigger type) must therefore be sent to Linux > through this notification message. > > In contrast, for virtio-gpio, interrupt handling is performed on the local processor. Since Linux already > has all the necessary interrupt context, the information is not needed. > > Shenwei > > > Given the refactoring work that is still needed, I will not look at the > > implementation. > > > > Thanks, > > Mathieu > > > > > + > > > diff --git a/Documentation/driver-api/gpio/index.rst > > > b/Documentation/driver-api/gpio/index.rst > > > index bee58f709b9a..e5eb1f82f01f 100644 > > > --- a/Documentation/driver-api/gpio/index.rst > > > +++ b/Documentation/driver-api/gpio/index.rst > > > @@ -16,6 +16,7 @@ Contents: > > > drivers-on-gpio > > > bt8xxgpio > > > pca953x > > > + gpio-rpmsg > > > > > > Core > > > ==== > > > -- > > > 2.43.0 > > >