Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4317411pxb; Mon, 4 Oct 2021 23:55:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/rxjNMeNItfBhMnG61Yee7WyFq/rWdcX4b7ZJbesqM/EQ09vQpcEiF4AwBiE4jxIamYco X-Received: by 2002:a17:907:75c1:: with SMTP id jl1mr22351683ejc.288.1633416903599; Mon, 04 Oct 2021 23:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633416903; cv=none; d=google.com; s=arc-20160816; b=he6hRIm67qTuaecKZTQCGjyNE2AUWl7dQd2Gk7lvz08H2p54uFDYut9txaiQceIOzo 7y1aSbM4zcYywh4YRrSqZlGU/3fqIAD3GBkI0wJO2QYnyUBei+sItF6CrN2se8Wc3Fia m2DLVRKBSRJ45zPUCUIXNOi0xei3sbsBvFMSHPtqoLEVUjnVcANd48Fht/BXuqHVYJCU ZJzPni3pjrR8UKAxtTKyEB+D4hOpa0IMIqKyNxjpqbzuejs6Yw6EDnSNSOq8UiRmceZo SO4UP+wsmjzGTMWFw3HdfDx4TIsHM9Y6HUBnJxXRKkiSCerKF76Tr9PuS7I8eUqbuB2+ 3odg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=n5rvDJLT46KKVmj57QzEkEkQwVXnYVpO8DvlptVRyCA=; b=O9xKch2+l4u5ghrlBVTwBT8x9rr00nSXKdyCOIUoiWHRFV1kjwwrGkddWcdTcGIqoK THR+tpXAdTVkDPHNWQ94jz31QI+MKaxAGh3AwAPobsGHc2h76BX2x5rMNDX0+MW6YRyG tF0S+sURxZiaADn//q1u5M76QIFJw6ZKXT+j00mdW5VUDpNS4EyOlV99wgmISz+TpxtK +ratqr15Y6jLGbPxTmxZXIVHPZlj1B4hkKUPDTeiPV6qvZ0gMufIsATuIXBznHucGfC1 fwdyXUwRmQXP6rhMQirDf5OykIcaa1PkHWSApewwIyCyXAC16Z/ZWYfscMWY4qwPzQql N0rg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rs13si17289951ejc.220.2021.10.04.23.54.39; Mon, 04 Oct 2021 23:55:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232238AbhJEGzB (ORCPT + 99 others); Tue, 5 Oct 2021 02:55:01 -0400 Received: from mail-ua1-f49.google.com ([209.85.222.49]:38415 "EHLO mail-ua1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbhJEGzB (ORCPT ); Tue, 5 Oct 2021 02:55:01 -0400 Received: by mail-ua1-f49.google.com with SMTP id y3so8732578uar.5; Mon, 04 Oct 2021 23:53:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=n5rvDJLT46KKVmj57QzEkEkQwVXnYVpO8DvlptVRyCA=; b=jWK5x5OKncZn065eh5icxcgmS3DgqPjzAeVrwZIpAj/N4g1mirSuJ2X3fm4EkhyVhX jfxxUi2rhaOX3YWcU3S/7Dexp5afwOmY3JDiUossOWhWTn4li9UTVY7Dnq94CUTNoiH0 RhCfsHh78Nt72pN4BTDVd4H/Uv2YRemTZrfPgCZtPPbGnvkCkuzZycU/xgbFv9pLri6a 2XH47lYpKHyTcqMndY0FJyXTj4GFwp+9q1Q71JPcbOK2yADmMQQQpRHv8CCOkC9RR7la zJYPnUXiplo+gl3+OdbgaqYL+eyH58D/8lq6nnZ/n3MDxNA38earfWNfBPo4mMwW9cSY SUJw== X-Gm-Message-State: AOAM5306A68tqOW+hJjz9TkNgItIrb+/5DHJL0mWS78nxIcdStGUAEQz DCc2gvJo+AIRXB9A29au/jU06aEHcHCIdlNEwdo= X-Received: by 2002:ab0:16d4:: with SMTP id g20mr10581513uaf.114.1633416790751; Mon, 04 Oct 2021 23:53:10 -0700 (PDT) MIME-Version: 1.0 References: <20211005055050.ggimidaqis5tfxav@vireshk-i7> In-Reply-To: <20211005055050.ggimidaqis5tfxav@vireshk-i7> From: Geert Uytterhoeven Date: Tue, 5 Oct 2021 08:52:59 +0200 Message-ID: Subject: Re: [PATCH] gpio: aggregator: Add interrupt support To: Viresh Kumar Cc: Linus Walleij , Bartosz Golaszewski , Enrico@rox.of.borg, Weigelt@rox.of.borg, metux IT consult , Andy Shevchenko , Arnd Bergmann , "open list:GPIO SUBSYSTEM" , Linux-Renesas , Linux Kernel Mailing List , virtualization@lists.linux-foundation.org, stratos-dev@op-lists.linaro.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Viresh, On Tue, Oct 5, 2021 at 7:50 AM Viresh Kumar wrote: > 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. > > 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. Exactly, that was what I had in mind, too. > Will the interrupts be visible in userspace with your patch ? Yes they are. Before, gpiomon (test app from libgpiod) didn't work, now it does. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds