Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4284448pxb; Mon, 4 Oct 2021 22:52:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5FmHqM1sOaW5zLYsUPwXTlRzfNkZwJ9AhtRV0LRJ5CW38K+w2+od7OqEJpB8HWSrG9eby X-Received: by 2002:a17:906:c214:: with SMTP id d20mr22716103ejz.83.1633413166352; Mon, 04 Oct 2021 22:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633413166; cv=none; d=google.com; s=arc-20160816; b=OOXUBp/004bWYnkYZI7KUUBCAGEsjUaY7TGl976Kdb15dOE7ByMDKIcOu087rz+UN2 77zn9gIV/rU0q6fB1PGu7BX1fJs8ISaqe1G64hH8hZvJDE7jMzW2Yp57Iwgq+XkT3NYF t17ghG9U5v/K0Lusp/3IGdu+wTt3rmwNW0+i9EsXyera+5UjKBZxNHssFl8vtvJXshiT kG1utoZpEkc8DeyGEPNUxCJ5OibDj43OGcYkQH2vVe/swMIlGbjWRQtzv720QD3hUZhZ p5GhB7KKrNIuHQe5ebTN/RXxqTsDMCLGTunjY++J5HFxPsTKioDbWaRnQCbngRo/lMS5 q/HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=4NeMuZezzbqxNlXi1LQWclIxq6eDR6pm/+jHI0J3aK8=; b=rnVDTGTj+qJjDYkjZR+OH8yeYQOfXObZnKDBiC0r3wO5Pku8GwDYtuOqq1InZ7WPeB W0iIrsoion0auJrpj3JHb4Rc6918K6EXgEXzl2pDt1eecPSkf6YkP++n4BXgVRLFVBvB 5v1OUr+7urgsDzLtVkPZYl+v+d/lqchSj5rBdAIQTKzp7zMVe1vqfIDeJgC6OPeUwt5J pGj2rdAwRqacNbDqf3DJO0ekQW10tumpD5jtumKWptXZ8m0HuaK3NlU+sBCz8RivDORc 0uQAgRGZbSVRTUCvJDjUXdJlsPlRg07sezCoS1AYWHNHIbmKJjcXLlJf6U7SOQ/Ac30H 1v1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S4xmUCWS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 m4si20823421eja.677.2021.10.04.22.52.22; Mon, 04 Oct 2021 22:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=S4xmUCWS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S230403AbhJEFwr (ORCPT + 99 others); Tue, 5 Oct 2021 01:52:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbhJEFwo (ORCPT ); Tue, 5 Oct 2021 01:52:44 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53E73C06174E for ; Mon, 4 Oct 2021 22:50:54 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id d13-20020a17090ad3cd00b0019e746f7bd4so1145494pjw.0 for ; Mon, 04 Oct 2021 22:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4NeMuZezzbqxNlXi1LQWclIxq6eDR6pm/+jHI0J3aK8=; b=S4xmUCWSrgXLjCPnoSiwsI+cxVNnf61RlJdSSJRG4uUK5Fmt7nNkR4VtIycRv4we/8 DnC2PZX7rqJo6MW/+1Ri+eIAab8E1cCRQ9BR6/apHgI8rN4gUgL4Joz/d5DMqPQ+1rcL Fz7U9pn36SzARq/Jf6Ei1V4o38Giw6cIjoZhwcQLevcE/8Q5Id8LpaFN4NTXNYVbwBcu 5m14tmrdglqtOjN7jCcGtHod88o7xzlUjHB17pxT4l/mcqgPsg2ue8R0BzPm2+P8mReJ bSa+M9d3DzRQOthZT6+FGhhxLaoiLhZUk1+NwdMjY3HbBaRXpEr4epJElREUQsGktIU8 Bm0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4NeMuZezzbqxNlXi1LQWclIxq6eDR6pm/+jHI0J3aK8=; b=t1scruCG41uIhd0+6Wn2BBqr/YmqhNFnp8xW6O63wIwtJO1c8nFKfJFq64gIIcCd6x JGf8Ni82l8B7qVmZlfFPC4LLXco+9mAte8obRSMAVlvAJKVOMOzjzZ7qZlp9RU1wsk/Z XZ7g3ZsjB7OyeRYBBeYfVnFdR++MVi9rNsS/eXxMIz57OXe8rWXnkAyRZTIEohwZvZPp pG55Mx/xWYRKtI90dR6IZD37Z+Ts2s24REC9+U2/ehjKgrNBOiU8LehsHWZtS8tNWq8c Xo7l95Bzxa3WFJTlrQsNjQO7a4q5S/GZ9cBUFkwglE8TX1P+zYKIBzxcVR1a604Ypw4V VK3g== X-Gm-Message-State: AOAM530BB5sLe8AxhDR5hCjq5ipuP+pY04jomcxGA4CVcUumMgwBH2Bz t4kgMbQjYod/+oQ1QJ1CFo3vGQ== X-Received: by 2002:a17:90a:b382:: with SMTP id e2mr1562944pjr.119.1633413053613; Mon, 04 Oct 2021 22:50:53 -0700 (PDT) Received: from localhost ([122.171.247.18]) by smtp.gmail.com with ESMTPSA id s10sm673204pjn.38.2021.10.04.22.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 22:50:52 -0700 (PDT) Date: Tue, 5 Oct 2021 11:20:50 +0530 From: Viresh Kumar To: Geert Uytterhoeven Cc: Linus Walleij , Bartosz Golaszewski , Enrico@rox.of.borg, Weigelt@rox.of.borg, metux IT consult , Andy Shevchenko , Arnd Bergmann , linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, stratos-dev@op-lists.linaro.org Subject: Re: [PATCH] gpio: aggregator: Add interrupt support Message-ID: <20211005055050.ggimidaqis5tfxav@vireshk-i7> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04-10-21, 14:44, Geert Uytterhoeven wrote: > Currently the GPIO Aggregator does not support interrupts. This means > that kernel drivers going from a GPIO to an IRQ using gpiod_to_irq(), > and userspace applications using line events do not work. > > Add interrupt support by providing a gpio_chip.to_irq() callback, which > just calls into the parent GPIO controller. > > Note that this does not implement full interrupt controller (irq_chip) > support, so using e.g. gpio-keys with "interrupts" instead of "gpios" > still does not work. Hi Geert, Thanks for looking into this. I am not sure of the difference it makes with and without full irq-chip, but lemme explain the use case that we are concerned about with virtio. Eventually the interrupt should be visible to userspace, with something like libgpiod. Which can then send the information over virtio to the guest. Will the interrupts be visible in userspace with your patch ? -- viresh