Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1540217rdb; Thu, 7 Dec 2023 01:57:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXTTPgU4jxIb1duGXXSAcXQmBEQeJgbPsMuy5by1YgEn45Bv7FsCZ8en4SywkuXEp08toy X-Received: by 2002:a17:90b:4f47:b0:285:b940:b292 with SMTP id pj7-20020a17090b4f4700b00285b940b292mr2343252pjb.7.1701943019979; Thu, 07 Dec 2023 01:56:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701943019; cv=none; d=google.com; s=arc-20160816; b=GsjYl/zdvtYl7q7PUJqL/iMhW1UnUzwb5Ttdri+410k9QHCP2ynWsjP4SNhS7qFO+F jeMxedd0QbvTZR4MIg0anMO/sbL93Nz7ljNUhavS2uN/mdLS/vQKOclYAcrltMoQ3DRT h5Y9qKV8weIAMMZb8LazePryznvzXCo6HBsYDSst+rjkPNg9FyxyynAgfJxlsmYNo6h5 GKj6RI3yXXkMmjQ9pFt74aXv21YE7ryeAX6+FG+9woo3H8mF7spBmIyS5GQEozTAfi8k SJ9+z1DZv7fdCuPYj9KeiHbuMwXLu7XPGqqNDcJRED6Kx8t7rPwQjwYhVwM2EBZ8mKZf DBJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TJnq125j0YdWG47h8sgeSrpDhVFiAnTytxHlskk2EhY=; fh=8aKXbGdz4UhIvAmqqy78Qkt7MVC2Qm0YLGjmCAecuwg=; b=RW73M5XTyD1SqWqKn0HKd+CXGXn6gD8RmyQZ8YDJDtXf2WiP6EjYYy0PsRgdEKjxsM 0YYMDqhEnTBfGs5VswTf6xsMOL4sHkExqT3peAgwXxzHHjH67X2XnEo6PjBZDmtRXLSR G8lC6eXFS3fDsXB9ehRQYgHvjfWLD06yb1bP1ACgw2hzlEYsA5ysg4h+3bMq40b5t7Fk LMpNBkHTwQZa93onjfXZtBHAnUFShyfVNKWVKqtYhPHafxjEybD/k5W+2IEuxjEj2yGb q1iCbiCAIz/yE1p5Z50CL6ruFNx51DEQLAlFJfmPmh3AQ3Fk3xRSSeXYmHNvFS00Dq7i tUtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5msvbpt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id cl21-20020a17090af69500b00286e9d394d0si808599pjb.23.2023.12.07.01.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 01:56:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5msvbpt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9B6F58205FFF; Thu, 7 Dec 2023 01:56:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232375AbjLGJ4g (ORCPT + 99 others); Thu, 7 Dec 2023 04:56:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232366AbjLGJ4e (ORCPT ); Thu, 7 Dec 2023 04:56:34 -0500 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFD9711F for ; Thu, 7 Dec 2023 01:56:40 -0800 (PST) Received: by mail-yb1-xb34.google.com with SMTP id 3f1490d57ef6-db544987c79so772674276.2 for ; Thu, 07 Dec 2023 01:56:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701943000; x=1702547800; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TJnq125j0YdWG47h8sgeSrpDhVFiAnTytxHlskk2EhY=; b=h5msvbptgCQw59PMItu4yKSNeB4votNJq7/JDvy69ZqNTpHpJTQHD7l8RKotTO+ML6 lDus2hDTgya5dA7ZbfrEqeqVGRjlisWxJo5SLae4w65DyZxi/nROl49SKZHBIFQ1GSoD dOJTi/cIWKqvkcdNrvPh2WIgs0VehNfmYvtynPDAs5w1sWTOrnJJ9FFzpBxlC28PgKas 6d6FvnW0UxYojjB4KxCvHUStWrrOsZS9vCVWU7Nzq/rp2KFYU+Z7MKt9d/cpngqcbCKi nQw6O3GDqUSv2ma1NZYUuH1FG9PfqUYHfim8+KkuNL9JVa18WmS54uRZE4Sjxv6SoN9l yvVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701943000; x=1702547800; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TJnq125j0YdWG47h8sgeSrpDhVFiAnTytxHlskk2EhY=; b=gT9c0SFfXBgUXgkOSEXYbeNcZ2B4imujGM2NvffUvC+7MrFT4ygUvdPUJQIicOXwhR FIt/PVksPj38TOrl3v5ceMG6AKy5xtKpZNuv680bFrsT6+3/djLf6pFs8igaryKKiyZF xohtD53VEtyrp9U+Obm48ntusu4FFUI+zCQ6LOxStIIzhV7Fb8MByBn8x5z78ot/ZGhq TUusrl1QyFenNV5avh8a/qxkNjhqizX4je/BsTk3kwChV2hnTmt+eJGxlyehaGhxnqsY kF6UOnB7UsizoUR4XGyaXnIX+XEP9XVIcSoogDjwi2teWhOPtMPlaM+HaphkGXun9R7O zM8A== X-Gm-Message-State: AOJu0YyWi6x4+pIhuvLDxKLDkqrBFpCZO2Mk0oxQXpPIhqoq0hgRYGP0 wEZkoIi67mlYimXg7umyfRQp5GyFRmy+zI83Xqjncw== X-Received: by 2002:a25:190a:0:b0:da3:76d3:e4fb with SMTP id 10-20020a25190a000000b00da376d3e4fbmr1627701ybz.26.1701942999893; Thu, 07 Dec 2023 01:56:39 -0800 (PST) MIME-Version: 1.0 References: <20231204203357.2897008-1-ben.wolsieffer@hefring.com> <20231204203357.2897008-3-ben.wolsieffer@hefring.com> In-Reply-To: <20231204203357.2897008-3-ben.wolsieffer@hefring.com> From: Linus Walleij Date: Thu, 7 Dec 2023 10:56:50 +0100 Message-ID: Subject: Re: [PATCH 2/2] pinctrl: stm32: fix GPIO level interrupts To: Ben Wolsieffer Cc: linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Thomas Gleixner , Maxime Coquelin , Alexandre Torgue Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 07 Dec 2023 01:56:57 -0800 (PST) On Mon, Dec 4, 2023 at 9:35=E2=80=AFPM Ben Wolsieffer wrote: > The STM32 doesn't support GPIO level interrupts in hardware, so the > driver tries to emulate them using edge interrupts, by retriggering the > interrupt if necessary based on the pin state after the handler > finishes. > > Currently, this functionality does not work because the irqchip uses > handle_edge_irq(), which doesn't run the irq_eoi() or irq_unmask() > callbacks after handling the interrupt. This patch fixes this by using > handle_level_irq() for level interrupts, which causes irq_unmask() to be > called to retrigger the interrupt. > > Signed-off-by: Ben Wolsieffer Reviewed-by: Linus Walleij Marc Z can apply all the patches to the irq tree once he's happy with the solution. Yours, Linus Walleij