Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9421146imu; Wed, 5 Dec 2018 04:40:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/VW8Ry8oJ1YT9hFGo7VOs61Ka8MPuoLi9inuNgdxqVuiggTuam3Y738kTtX+UofIrdUK2Nt X-Received: by 2002:a62:33c1:: with SMTP id z184mr24012257pfz.104.1544013607624; Wed, 05 Dec 2018 04:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544013607; cv=none; d=google.com; s=arc-20160816; b=Vb9qoFBNgHcl7b/TIsryC7/Y8Z/PoMfHML++PrNIG4OEEDEdw37wRqeZFdOXzMEtDn PLaj7aO1QRLQ+BJmSi4ob7ThZJUT0YKua0YDB/BCf4Kr4dQ6ACq/V801iRCCrx1HGhXz UmmRBG3j7MqmtAhbPvyEfGt52fUdBD349Ttd0Z4TA9legfY/k8oov8e0oZBdghKSn0Qx XdvAaqJIeXxPaTjsXlesBUcyAVWzXVRb6ajZ7rRedpsyYUsgmcQu4uovqUQY8QBnuAkn aI7GyLsyWWHTjH8R/kY93RFyClQUKnUP9ByopSr7NmQzUKy37bBMgexcn1qxHHM5T3xI BdTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=phPfRycTObsJs4Pyer1OXmh5+Pv4MU+ILsITuYlluEU=; b=OjI8VIvIIYmfwVwi1zI1B44cpguP/zgbBpvPeWj2lb4PgySWH0kcwxzX6jg/2rh2gY ugthydkwmAnjRo4HcPgQZBPkc2F9lkW4P8D4SiH0IbgPgGbkNKu8Yx7E9xrEOO2TNE0K y16Xu0hgnP4YbHJ2gT+LRWV+Nc8YInL1ocQ/zXeyzq64PBNIYvEfZ8MWByMoDEOuUPdT Rr0u9pfC1SawYvobZuqJGAJZhpyHHLH0euMln9cAW4ezkqoO2k0RfXtQBCFLixHtrW8+ tsQJhrucKAvvrv1CPUFQRvEM+4GKlKbC6OuKr+hZ96JCtnon2XuoZoUbyDYebBOxw1Nh iLnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=ILAPHdJr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si17243448pgb.298.2018.12.05.04.39.52; Wed, 05 Dec 2018 04:40:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=ILAPHdJr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727826AbeLEMiY (ORCPT + 99 others); Wed, 5 Dec 2018 07:38:24 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:39021 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727780AbeLEMiX (ORCPT ); Wed, 5 Dec 2018 07:38:23 -0500 Received: by mail-oi1-f193.google.com with SMTP id i6so17352858oia.6 for ; Wed, 05 Dec 2018 04:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=phPfRycTObsJs4Pyer1OXmh5+Pv4MU+ILsITuYlluEU=; b=ILAPHdJrbX/troygIsAgLPL/Cbhracu6LLXVT1sxzwQmi1VlVbL/pJcqZxIIDPvK/C 0RU6LitXqr1idfTc5ihqW+ChO811invc2/pdWW+Sq4XNs+bOBRlRU9qX/NA8g2nl1P+x ROzIxEk1jHeEJqxyXVk8ljXgf2V0UhkNAOLx7diVLtJNDIvruZfSvnkWePAGOJIC7gq/ /OI4ABIrSBTCi/zdKCXrZPerPmB8giVUdCsk8dwbIKxjO/7US0Q0GVW9SmRqkm7PUNll b5pnsQVR5EOgZr4h8p7wgL5ychKTonhmKaAZ5jdaQuvNu3sYuWU6ht8IAlAL8r0TIeP7 rXlw== 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:content-transfer-encoding; bh=phPfRycTObsJs4Pyer1OXmh5+Pv4MU+ILsITuYlluEU=; b=nIkcDYNJL3O/gevY/iV3ZV2NK9vyc4iZFoH25Mgzdi4r8B/UZYuu/dwWC0WrQ9cA2+ EAlVq3PczoQYvDTNfHEvABFWiF6NoA0YdIRaEOsChuUdJJ0Ycj2BhrH4lVeMydZoRgkQ dbNFERXIjk4Stq7rjOb0joH7a11kulUuq0OZdMI5G93T8EfAMBL9BAaOylm2rqqxJZLP 8Zc3waxz1qRTFE7IXDHHCtZfTbx/ibh6ctkCoKj31uEO1+YgeIvW+r58EszgW3hzzlpR AJvzSYkyqydzQVpqnfgshJyQhg9CiXdA0XavsUabSZ1UYtYSzjRetQ3aO/rS/m4vmxC2 dI4A== X-Gm-Message-State: AA+aEWbaiWRvL8WoDUEdTf/jCWjtybs4vpMpa84J4lW0y6Y1UFiLLydn pqQij8/t5KOKXJQtkbRPrKB9Ba7dxO1y1NHExqvFAg== X-Received: by 2002:aca:3856:: with SMTP id f83mr10068507oia.147.1544013502658; Wed, 05 Dec 2018 04:38:22 -0800 (PST) MIME-Version: 1.0 References: <20181121191509.ia2vcklvx4q2rh56@pengutronix.de> <20181125211854.idnqxz4pco3r7ydr@pengutronix.de> <20181202215613.jcfrxwl4taiqgsql@pengutronix.de> <20181203104923.gcb2bcsaoczjcjhk@pengutronix.de> <20181203110654.53o3prw3qu3u2uyf@pengutronix.de> In-Reply-To: From: Bartosz Golaszewski Date: Wed, 5 Dec 2018 13:38:11 +0100 Message-ID: Subject: Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge() To: Linus Walleij , Marc Zyngier Cc: u.kleine-koenig@pengutronix.de, Bartosz Golaszewski , Thomas Gleixner , LKML , linux-gpio Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =C5=9Br., 5 gru 2018 o 13:20 Linus Walleij napis= a=C5=82(a): > > On Mon, Dec 3, 2018 at 12:06 PM Uwe Kleine-K=C3=B6nig > wrote: > > On Mon, Dec 03, 2018 at 11:57:26AM +0100, Bartosz Golaszewski wrote: > > > > It used to live in the gpio-mockup driver and I generalized it > > > precisely because there was another driver - iio evgen - which was > > > doing basically the same thing. While I don't know if there'll be mor= e > > > users (I'd guess it would be useful for testing purposes of other > > > subsystems) having the same functionality implemented once is better > > > than twice. > > > > The iio testing driver only needs the trigger and relies on an irq that > > then calls the registerd handler. The iio driver doesn't need to tune > > the edge sensitivity though and if your mockup driver just only calls > > the fire routine if the configured sensitivity justifies that, > > everything should work as expected. > > Simulating edges in the generic IRQ simulator codes seems > generally useful to me, even if there is just one user now. > > Certainly for any kind of IRQ testing, it could be interesting to > throw several low-to-high and high-to-low transitions > on a driver and see how it reacts. > > But it is up to the irqchip maintainers to state whether they > agree. > All that would be great, but at this point I just want to fix broken tests in user-space. After that we can think about how to improve/approach simulating interrupts all we want. Marc: is my explanation for using an int instead of bool for irq_sim_fire_edge() fine? Can Linus pick this up for fixes? Bart