Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6803746imu; Mon, 3 Dec 2018 03:09:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/V5Fdny+FrP6GjLXxAoamvrcZoCSNrG2xRqgtiUoUzLK+QCBGUX2pK97F5gmRmGYIoaONnt X-Received: by 2002:a63:d450:: with SMTP id i16mr12684887pgj.246.1543835347603; Mon, 03 Dec 2018 03:09:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543835347; cv=none; d=google.com; s=arc-20160816; b=QKVMuY+RJtx+/z77orPmsb921g7bn+5BkBJVJ06bRxIJJilzEzY2+LF76yGHG3T4r4 4yQ2tebVpQBPxAqJy8y8N4wKAVINxG/0BZ17JV6OjGK/e7euQj1aTkOEDrwsT6tnkDei OBzGH9FyXXj77vKrlas37wCiLQwEUGlNbzyjJcm+nWwN8Vqg8ZisS7jp8js/aNd5V4ZE I2EYFLqu9Zvxwt04KB1x/ugqdsxV5uth24PDo5tFroNOou+7M5KmCdzB03taRHMZOsGw +6hzwLvl5uW6Ebv+eNL1RaGtlTtEHqlpjeTQRlaXrOGsX51KQi6ueQpBSywT379zaBA/ 1bjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ccFHKpWxOFKLWF2Uq4aFIbjmqF6NSpoifbH+ecIsRcA=; b=ExAwPvx/0lxwqEkNgjheOXNj89GAdvlveaJUuoq606YNMFZ9De6KZXuN8jPsCRWpcs yrbCvMYLkzurlLKt6UkeGQ+dxOpULUYKdf1aYHclE8Jl/UHKC9Nebmti2vmzHlnhFpIQ UXFeupqe+aFGUblOW9MrPUVRYivs/bD8/P7bz1W08Ap6yC5cAix+aOs4smTLCXzJmYxJ VeJtNZJ+TUWsAi9nus7dwwMYUhK7tjW7hkPT1juNPIo6cp00t7OqsU+jr/Fz2BJQfSWz F/rN16DBQBPTV2W2e58Vsb0gIbdE0Rj2K8ATScge5Ft9czuUKpz/xsdkOV+COJ8Jmyuu SwPg== ARC-Authentication-Results: i=1; mx.google.com; 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 n12si12363042pgb.563.2018.12.03.03.08.51; Mon, 03 Dec 2018 03:09: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; 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 S1726343AbeLCLHb (ORCPT + 99 others); Mon, 3 Dec 2018 06:07:31 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:41645 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbeLCLHb (ORCPT ); Mon, 3 Dec 2018 06:07:31 -0500 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gTm3z-0001DP-0h; Mon, 03 Dec 2018 12:06:55 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1gTm3y-0005dq-IX; Mon, 03 Dec 2018 12:06:54 +0100 Date: Mon, 3 Dec 2018 12:06:54 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Bartosz Golaszewski Cc: Thomas Gleixner , Linus Walleij , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski Subject: Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge() Message-ID: <20181203110654.53o3prw3qu3u2uyf@pengutronix.de> References: <20181121191509.ia2vcklvx4q2rh56@pengutronix.de> <20181125211854.idnqxz4pco3r7ydr@pengutronix.de> <20181202215613.jcfrxwl4taiqgsql@pengutronix.de> <20181203104923.gcb2bcsaoczjcjhk@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 03, 2018 at 11:57:26AM +0100, Bartosz Golaszewski wrote: > pon., 3 gru 2018 o 11:49 Uwe Kleine-König > napisał(a): > > > > On Mon, Dec 03, 2018 at 11:23:38AM +0100, Bartosz Golaszewski wrote: > > > niedz., 2 gru 2018 o 23:20 Bartosz Golaszewski napisał(a): > > > > > > > > niedz., 2 gru 2018 o 22:56 Uwe Kleine-König > > > > napisał(a): > > > > > > > > > > Hello, > > > > > > > > > > On Thu, Nov 29, 2018 at 07:14:45PM +0100, Bartosz Golaszewski wrote: > > > > > > We're getting too much into details of how to handle simulated > > > > > > interrupts and we can continue discussing it, but meanwhile I'd like > > > > > > to address a different thing: > > > > > > > > > > > > Thomas, Linus: after commit fa38869b0161 ("gpiolib: Don't support irq > > > > > > sharing for userspace") some libgpiod tests are failing because we can > > > > > > no longer depend on reading the value of a dummy GPIO after detecting > > > > > > an interrupt to know the edge of the interrupt. While these interrupts > > > > > > are triggered from debugfs and debugfs is not required to maintain > > > > > > compatibility, I thing having a working test suite for the GPIO > > > > > > subsystem and uAPI is worth applying these two patches and also the > > > > > > previous one[1]. > > > > > > > > > > > > Can we have them applied for 4.20 or are there any objections? > > > > > > > > > > Just for the record: I objected the patch, Bartosz agrees to discuss > > > > > further and but because this is too much detail the patch should now be > > > > > applied anyhow to fix the test suite of an external project. This seems > > > > > wrong to me. > > > > > > > > > > > > > Just to look at it from a different perspective: we have a project > > > > whose tests rely on a behavior that was changed by Uwe's patch. While > > > > the patch is fine, we need to find a correct way of testing the GPIO > > > > user API. This may take a long time. In order to not break the tests > > > > of an external project in 4.20 I propose to patch the interrupt > > > > simulator (a component only used for testing) for now and to revisit > > > > it later without time pressure. > > > > > > > > Best regards, > > > > Bartosz > > > > > > In fact after re-reading this conversation I'm still not sure what > > > your objection is exactly. You're proposing a solution that may well > > > be nicely engineered but it's specific to your gpio-simulator. > > > Meanwhile I'm trying to provide a more generalized API for more > > > testing modules to use. > > > > I think you're generalizing something that won't find any user apart > > from your mockup driver. So I'd say the generalisation is wrong and the > > added code could better live in the mockup driver directly. > > > > 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 more > 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. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |