From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC5A3C2BB48 for ; Tue, 8 Dec 2020 09:39:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 802BE23A82 for ; Tue, 8 Dec 2020 09:39:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728996AbgLHJju (ORCPT ); Tue, 8 Dec 2020 04:39:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727831AbgLHJju (ORCPT ); Tue, 8 Dec 2020 04:39:50 -0500 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17F91C061257 for ; Tue, 8 Dec 2020 01:38:56 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id f11so6479684ljn.2 for ; Tue, 08 Dec 2020 01:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Df6CqLv6JOagx1Y8po8wBRxgE1D965nfEA75Zeqy5oU=; b=hiBfGGso9wRtqNNhBBDBX1PZJI4bsFd8GYtW1arlG6wQ4COUeIZUEbdlyvCERMJMNo G3mKLQX6l8yLU9kEnfD7DSvjlpMv/k/voYdOTNP7XWZPPJ/qSQk8mxqGTTh8jNzexWF+ IM8Az+l2VS7WmMT17YcIg6P/3wHd3R+VH1SSg9INsPTtt3qSUiUthy5zd7hakcqWkB+O qSfwe3vWou5ZGLP9SOQvoHKDMgFZGQ1O3JUjz3sj++5TS4p8K381xHRqUXYIzwKWdgKO FQZL/lFJPkZkG5N/3mq019RC7s6wgK9FMFx6XuoeVpbfGEDxYEjwM070MoklamNKuEIX cY5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Df6CqLv6JOagx1Y8po8wBRxgE1D965nfEA75Zeqy5oU=; b=EVr+9f3IE00zUplvJ/L30879bkiKqmU7aQ2DpUpvrIoQB2tSfBAwLdYUo3QqTjDp4n M31VdqZUpoAWYoPxLW+IGYZS6WvDKBZ3wzFaAAywYCw6LJwqkdRlwfFtudlr4IQUwjEM Rx+uXP1UE/FYXxKqtyP9Fm00uhElbNJ3KMPjfv4615u/Tbi3cvntSXzf30g4OfvwQ1ti ZTObr12cC8TvBODQMvB6yen1amwTX2A6Npic9x0DU7EKzcvDyLGiH2RPhfcFt6xOLS4i wroifbZRV2yWHF5eshVEcd9ZiZ2QnWGjEOrMSGVg9okg+mAkZFEgvo4KDDDjJLrpvpnO mkDg== X-Gm-Message-State: AOAM530EuhV+P64NypQi0qKWvwS1xyTorh0z1Anl2eFeOIiSDowKf52P h5MwiinL67Afu08ass9YKmr/Gw+ACON+nPvfk674ZQ== X-Google-Smtp-Source: ABdhPJxQWX+drL6yggghfNbiTL59lvfCIOzavoQ1GoTxnH37PaUwIwrN8fyjAkWeHJ5nGm3eQq7eo4VvW5wksxdLa68= X-Received: by 2002:a2e:910f:: with SMTP id m15mr10801861ljg.467.1607420334616; Tue, 08 Dec 2020 01:38:54 -0800 (PST) MIME-Version: 1.0 References: <20201203191135.21576-1-info@metux.net> <20201203191135.21576-2-info@metux.net> <0080d492-2f07-d1c6-d18c-73d4204a5d40@metux.net> In-Reply-To: <0080d492-2f07-d1c6-d18c-73d4204a5d40@metux.net> From: Linus Walleij Date: Tue, 8 Dec 2020 10:38:43 +0100 Message-ID: Subject: Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver To: "Enrico Weigelt, metux IT consult" , Bartosz Golaszewski Cc: "Enrico Weigelt, metux IT consult" , "linux-kernel@vger.kernel.org" , Jonathan Corbet , "Michael S. Tsirkin" , Jason Wang , Linux Doc Mailing List , "open list:GPIO SUBSYSTEM" , virtualization@lists.linux-foundation.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Sat, Dec 5, 2020 at 9:15 PM Enrico Weigelt, metux IT consult wrote: > The virtio-gpio device/host can raise a signal on line state change. > Kinda IRQ, but not actually running through real IRQs, instead by a > message running though queue. (hmm, kida MSI ? :o). > > I've tried allocating an IRQ range and calling generic_handle_irq(), > but then I'm getting unhanled IRQ trap. This is Bartosz territory, but the gpio-mockup.c driver will insert IRQs into the system, he went and added really core stuff into kernel/irq to make this happen. Notice that in Kconfig it does: select IRQ_SIM Then this is used: include/linux/irq_sim.h This is intended for simulating IRQs and both GPIO and IIO use it. I think this inserts IRQs from debugfs and I have no idea how flexible that is. If it is suitable for what you want to do I don't know but it's virtio so... Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0944C4361B for ; Tue, 8 Dec 2020 09:39:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 693D123A52 for ; Tue, 8 Dec 2020 09:39:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 693D123A52 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1OvmIf4tjQ17tqnPI/vmMFsM5e9XIs+qGqaK65p+qDs=; b=s483B8ehZDWtd2wNl2S3RxOfj CoCNAeI7WDSyUG0WnlXwhXsMyE3jmeGvmSi7p3TyVY8b/E2xQBkbzwgLw2cflmLOhtsK8tspmtbqo YbzflrekJ6yshGGXbtGCxgVDr9ENn2gEymySNlHejzOZ7cieT2kOL2emv2954W6xwutZnVFgqapTt H+YSSk9d00AAXMZJkuqYwrxD78+uYgrVgiJyWmAiQiBtYmaAqdPSlGb2c8fkvl98Bhl30972OGnU4 fKCxxllq9i/6E5ioisL/Ctfg7gpMUz/uSr7KXV+B/rqHaqICh6lMbEA/IUyTTOKm+4jzO5bytIhe2 q7zOajMwA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmZSW-0002mq-EN; Tue, 08 Dec 2020 09:39:00 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmZST-0002mB-9M for linux-riscv@lists.infradead.org; Tue, 08 Dec 2020 09:38:58 +0000 Received: by mail-lj1-x241.google.com with SMTP id a1so17019681ljq.3 for ; Tue, 08 Dec 2020 01:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Df6CqLv6JOagx1Y8po8wBRxgE1D965nfEA75Zeqy5oU=; b=hiBfGGso9wRtqNNhBBDBX1PZJI4bsFd8GYtW1arlG6wQ4COUeIZUEbdlyvCERMJMNo G3mKLQX6l8yLU9kEnfD7DSvjlpMv/k/voYdOTNP7XWZPPJ/qSQk8mxqGTTh8jNzexWF+ IM8Az+l2VS7WmMT17YcIg6P/3wHd3R+VH1SSg9INsPTtt3qSUiUthy5zd7hakcqWkB+O qSfwe3vWou5ZGLP9SOQvoHKDMgFZGQ1O3JUjz3sj++5TS4p8K381xHRqUXYIzwKWdgKO FQZL/lFJPkZkG5N/3mq019RC7s6wgK9FMFx6XuoeVpbfGEDxYEjwM070MoklamNKuEIX cY5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Df6CqLv6JOagx1Y8po8wBRxgE1D965nfEA75Zeqy5oU=; b=KYuWFQXJFP+GWdwTJUgkyWu7z+FJ5T3kjUjY9K2GXKJEMfHvyBK/kAj/CA+ChdBXz2 0uE6rFpUIo/vupGunGQ3jUCSO//TyuQRZcHbRtKQbcc/lRMtJgw3KMtGMPmgH1T8nt1Q AdvNPMa8UPmzy3ZT0yt7UP76HiAs2AD3SpVrmKFLYSJ/NUSsmXyvY+nQsVOd1zrmbCSf mdQarrSgal5WhKrb4Se3oVHB9KDZoTGfMBvy5Ddg3r+48nF0giGBLfalmSBoN8A/WAYO EphLfAliW6xm2GsEh1gDY1NWlLuDP1+ojDd4ueQHAw0pMT59YU/zPFNIK0HavytvQiql TSBg== X-Gm-Message-State: AOAM533WPogsWabf7PKqZwIajbRo30nyzH/LbuTYnW1M+O1yBeweMR0E ncQg1k+QKI/MYhNwOx6QkpnCM3hAW1lytHN65b5RDQ== X-Google-Smtp-Source: ABdhPJxQWX+drL6yggghfNbiTL59lvfCIOzavoQ1GoTxnH37PaUwIwrN8fyjAkWeHJ5nGm3eQq7eo4VvW5wksxdLa68= X-Received: by 2002:a2e:910f:: with SMTP id m15mr10801861ljg.467.1607420334616; Tue, 08 Dec 2020 01:38:54 -0800 (PST) MIME-Version: 1.0 References: <20201203191135.21576-1-info@metux.net> <20201203191135.21576-2-info@metux.net> <0080d492-2f07-d1c6-d18c-73d4204a5d40@metux.net> In-Reply-To: <0080d492-2f07-d1c6-d18c-73d4204a5d40@metux.net> From: Linus Walleij Date: Tue, 8 Dec 2020 10:38:43 +0100 Message-ID: Subject: Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver To: "Enrico Weigelt, metux IT consult" , Bartosz Golaszewski X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201208_043857_686514_10D434EC X-CRM114-Status: GOOD ( 10.36 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathan Corbet , "Michael S. Tsirkin" , Jason Wang , Linux Doc Mailing List , "linux-kernel@vger.kernel.org" , virtualization@lists.linux-foundation.org, "open list:GPIO SUBSYSTEM" , linux-riscv@lists.infradead.org, "Enrico Weigelt, metux IT consult" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Sat, Dec 5, 2020 at 9:15 PM Enrico Weigelt, metux IT consult wrote: > The virtio-gpio device/host can raise a signal on line state change. > Kinda IRQ, but not actually running through real IRQs, instead by a > message running though queue. (hmm, kida MSI ? :o). > > I've tried allocating an IRQ range and calling generic_handle_irq(), > but then I'm getting unhanled IRQ trap. This is Bartosz territory, but the gpio-mockup.c driver will insert IRQs into the system, he went and added really core stuff into kernel/irq to make this happen. Notice that in Kconfig it does: select IRQ_SIM Then this is used: include/linux/irq_sim.h This is intended for simulating IRQs and both GPIO and IIO use it. I think this inserts IRQs from debugfs and I have no idea how flexible that is. If it is suitable for what you want to do I don't know but it's virtio so... Yours, Linus Walleij _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4A3CC4361B for ; Tue, 8 Dec 2020 09:39:00 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 404AE23A52 for ; Tue, 8 Dec 2020 09:39:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 404AE23A52 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D73A386C14; Tue, 8 Dec 2020 09:38:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EW2OMJ7J4sOx; Tue, 8 Dec 2020 09:38:59 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 3029886978; Tue, 8 Dec 2020 09:38:59 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2378BC0FA7; Tue, 8 Dec 2020 09:38:59 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 66F25C013B for ; Tue, 8 Dec 2020 09:38:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 60EDB20401 for ; Tue, 8 Dec 2020 09:38:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g0nvisJsZ29M for ; Tue, 8 Dec 2020 09:38:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by silver.osuosl.org (Postfix) with ESMTPS id A39E2203B9 for ; Tue, 8 Dec 2020 09:38:56 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id q8so18297685ljc.12 for ; Tue, 08 Dec 2020 01:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Df6CqLv6JOagx1Y8po8wBRxgE1D965nfEA75Zeqy5oU=; b=hiBfGGso9wRtqNNhBBDBX1PZJI4bsFd8GYtW1arlG6wQ4COUeIZUEbdlyvCERMJMNo G3mKLQX6l8yLU9kEnfD7DSvjlpMv/k/voYdOTNP7XWZPPJ/qSQk8mxqGTTh8jNzexWF+ IM8Az+l2VS7WmMT17YcIg6P/3wHd3R+VH1SSg9INsPTtt3qSUiUthy5zd7hakcqWkB+O qSfwe3vWou5ZGLP9SOQvoHKDMgFZGQ1O3JUjz3sj++5TS4p8K381xHRqUXYIzwKWdgKO FQZL/lFJPkZkG5N/3mq019RC7s6wgK9FMFx6XuoeVpbfGEDxYEjwM070MoklamNKuEIX cY5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Df6CqLv6JOagx1Y8po8wBRxgE1D965nfEA75Zeqy5oU=; b=RXe/c3enpJ6M99zBWvQTXzz/D3wMRPs+UPvjt1bjWdSNayaytMm4yVism2pX7syhfy snfusouzl2dwtA+UbvcQSO/RhFvKfJWx4iYbgJIFPWQ+Shp6bfhwQVL8xhugk1XDABxC 3Mp8kFT/BwTaDPqoh0tKl4hqz0bxlBzeNWUau+KNwaGnimr2D/TmkDaB/aWIdt27Y+g2 8BFK8zbaJ1nRhg/N7EiHRHMZn0BL02Ax8QsWUVIm6NMm0vV3WC4XxtPBg06x4GEonXY7 01RXqiNILsOwKLdAwOwD6O06Q08Y1A7kGwpHKkTtNms4i/3MQ4Ki6n+zO4MaHh7VYpmc Kgew== X-Gm-Message-State: AOAM532Jq9lfzmvSrggffavYQrchs6KjbPzct/0rNlPPbaQeoILchEIW KZkl+2bDgsBts2NX58ESFs1l8tmFoDBBLDU5husuSA== X-Google-Smtp-Source: ABdhPJxQWX+drL6yggghfNbiTL59lvfCIOzavoQ1GoTxnH37PaUwIwrN8fyjAkWeHJ5nGm3eQq7eo4VvW5wksxdLa68= X-Received: by 2002:a2e:910f:: with SMTP id m15mr10801861ljg.467.1607420334616; Tue, 08 Dec 2020 01:38:54 -0800 (PST) MIME-Version: 1.0 References: <20201203191135.21576-1-info@metux.net> <20201203191135.21576-2-info@metux.net> <0080d492-2f07-d1c6-d18c-73d4204a5d40@metux.net> In-Reply-To: <0080d492-2f07-d1c6-d18c-73d4204a5d40@metux.net> From: Linus Walleij Date: Tue, 8 Dec 2020 10:38:43 +0100 Message-ID: Subject: Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver To: "Enrico Weigelt, metux IT consult" , Bartosz Golaszewski Cc: Jonathan Corbet , "Michael S. Tsirkin" , Linux Doc Mailing List , "linux-kernel@vger.kernel.org" , virtualization@lists.linux-foundation.org, "open list:GPIO SUBSYSTEM" , linux-riscv@lists.infradead.org, "Enrico Weigelt, metux IT consult" X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Sat, Dec 5, 2020 at 9:15 PM Enrico Weigelt, metux IT consult wrote: > The virtio-gpio device/host can raise a signal on line state change. > Kinda IRQ, but not actually running through real IRQs, instead by a > message running though queue. (hmm, kida MSI ? :o). > > I've tried allocating an IRQ range and calling generic_handle_irq(), > but then I'm getting unhanled IRQ trap. This is Bartosz territory, but the gpio-mockup.c driver will insert IRQs into the system, he went and added really core stuff into kernel/irq to make this happen. Notice that in Kconfig it does: select IRQ_SIM Then this is used: include/linux/irq_sim.h This is intended for simulating IRQs and both GPIO and IIO use it. I think this inserts IRQs from debugfs and I have no idea how flexible that is. If it is suitable for what you want to do I don't know but it's virtio so... Yours, Linus Walleij _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization