Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp601032lqb; Wed, 29 May 2024 05:38:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVT8tHqnVwHKXTVAn0+o4kLaunXWqjk2Y7ndbnE84rt7oPLTnMZBn40cT8x9/7lYjiHETD88R7jIBw7Z5oexXlLZlKq1mibVZTyptyH+A== X-Google-Smtp-Source: AGHT+IFt1AxDOaHeuI3xpTBjq4A1LQwVD7cE/aR2I7EdFhNKHb3uAWAjTaJX5R8KUQEikLOGIHnL X-Received: by 2002:a05:6870:b50b:b0:24c:bbdd:cdfd with SMTP id 586e51a60fabf-24cbbddee74mr14780271fac.53.1716986292703; Wed, 29 May 2024 05:38:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716986292; cv=pass; d=google.com; s=arc-20160816; b=q7AyA7C029UHAEJW4yxgPLthITBJA4nhQkCPr0dITytJqaKlA7p7CGP6fzjQoo68QA IuxgYT5SeQhbKq7uaVRjpKotdV3vjhDTHZuYPl/ggIbPJeVKO5u+9hT90rj7Yr89DxI1 Y34BHdgiR8aSLPtj+/DHNHZ4Zm/QYYgzeEL/scayzE2X5N5ENsgsV2MIW2GNpaE2zK6o GIGOMOj9GVKC37cBZ0WSnHXhk/YskBy6UG0zThlKwAPfhxFDZU5CC1MIQpr6H57rof2j 3ouMEW4lgkWADpkBvVMb32vphKUzvCu8kp488dUoGvsVJ6jO5iV7OwZqNVwsxNzUsBfb YPzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1K1m3c2TAHIh9xs1DYiPRGxAfBUiEiuL8RJFxcDCKqo=; fh=RDTCzXGxQCeObgsL86rYr81fUzqjx6BI/LOJy7tFFzM=; b=R5dXH3TGTieRJVQpuLdmFl8gmQ0dcac+9hhWV8KQmnWNSYGNGeVRQL/9X51Yk9lpT2 vVq0iXMxGIlx9EjwB//ts03Wg21YSo9XN1qIdx+vMqLQ54jWTPXoJDksX6M08KiOrpAf PMwbplfOimVzkmRW+YcUfiOrYVXjtiXtsDvs7xoxFFscAlwRC800Bm48NLvJto1eZKp+ JB5x4PiYP7nub2gd7/WrLrHBck+SsnJr+p9o7hVWIwoIcxrRiBjfhV9ee/10yzgk6rKK Era1DrU0+DE1cZ/cqrP1LyownS2SMoBGgF59tJIbIy8uQ7r2oktelDfN8uArsFl9BG4A X6Zw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=fNJL9Pby; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-194097-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194097-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68229937238si10213287a12.639.2024.05.29.05.38.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 05:38:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194097-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=fNJL9Pby; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-194097-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194097-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 501FA28275C for ; Wed, 29 May 2024 12:38:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88F4C181B9B; Wed, 29 May 2024 12:37:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="fNJL9Pby" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32556181312; Wed, 29 May 2024 12:37:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716986276; cv=none; b=ZWhjWHCGlydodZkfbiUlmX2NE5hN/ruaVgT2176L/Xbr3Ltok68lfenoyxUci8Eq3zkwFug2GJksftsaRDDWf15VHtQzTWgGif2Z5PfTlmaKzVemEBFz+GTzKaAt+7l8kXjkDBnyIzEuuoO/2gU+Otxirr9+hhOAXdhdtAGmxg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716986276; c=relaxed/simple; bh=gU0p3Z6EN1jQ387TofAg5vU76es6ShzPxfqv4kSnJRg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kDZZ6FH33IlsrrzRB+VsBpU7uRlq/RA4fhk4BMQXc0N/Q8O1lg8KfCdHDb0kV1MVgg1gmSm4vUx7Y+W+QMl0X7uIW/kp+X1uuzEnxS7U0l+xoLtUQhQxy+QW4m89CV05rnZ1ZtkxyjWzZgpTepMn72v7Vr6qujg6QRg6apURk/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=fNJL9Pby; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=1K1m3c2TAHIh9xs1DYiPRGxAfBUiEiuL8RJFxcDCKqo=; b=fNJL9Pbyo6kERlU0JqaOmJxNfL Y9TdUYDgY/hxomR52pncSS27eFGTxwOfjhpYVG+a8fA2zt67v/eOCa+/KHww0mIH9AxNxD1AbDtJ0 StXcAwZA/9KmznnkEpjaPye5GOvzD+Z7b97rDxt/iEyvyNWWmKEHIqRJ3Y8xVlumardc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sCIYv-00GFn5-W0; Wed, 29 May 2024 14:37:49 +0200 Date: Wed, 29 May 2024 14:37:49 +0200 From: Andrew Lunn To: Matthias Schiffer Cc: Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Gregor Herburger , linux@ew.tq-group.com Subject: Re: [PATCH 8/8] gpio: tqmx86: fix broken IRQ_TYPE_EDGE_BOTH interrupt type Message-ID: <9f8107e1-4a80-4f20-8862-f85aed578cc6@lunn.ch> References: <2c265b6bcfcde7d2327b94c4f6e3ad6d4f1e2de7.1716967982.git.matthias.schiffer@ew.tq-group.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c265b6bcfcde7d2327b94c4f6e3ad6d4f1e2de7.1716967982.git.matthias.schiffer@ew.tq-group.com> On Wed, May 29, 2024 at 09:45:20AM +0200, Matthias Schiffer wrote: > The TQMx86 GPIO controller only supports falling and rising edge > triggers, but not both. Fix this by implementing a software both-edge > mode that toggles the edge type after every interrupt. Do you have a real use case for this, one that will handle lost interrupts because it cannot swap edge quick enough? I personally would not do this, because it is dangerous, it gives the impression the device can do both, when in fact it cannot reliably. For me, the correct fix is to return EOPNOTSUPP or EINVAL for BOTH. Andrew