Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1129510pxf; Fri, 12 Mar 2021 02:39:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzrOcxeOCUaq+7WQqPAQnJ1RmKr/BwFRUDYE6KAQ8uEEmntx1rwzI1xxdMarZqOXvLPmTG X-Received: by 2002:aa7:c941:: with SMTP id h1mr13323437edt.85.1615545598580; Fri, 12 Mar 2021 02:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615545598; cv=none; d=google.com; s=arc-20160816; b=gqlFkigmErSNApqtDwrKSRYQl+fJwMmfabortO6sIWOFSlCq/SHdWvzI2CEayuSoBF F86+X0AtDoabfUhSr1eZYdXuinKIVgBAyBjUNYqJhOjlZnthJDLkOJ2mRpdawp60xcpI dlPWaORl0hNq3JNp6gzK0hbCdG/C6ezlAo4Bv/CDQx8FATVf1lhnULXH9o9dIxucB47G zSm/2/npyc0e0BVwzeTpSSjuo3ie+he0ANjVXKIeSzo2BFhmoa3CmCGawO+w5LoPoltB YMHSEplXpVsnOGNy0djJ6qprMzPHnIDME+4ApsSY6QCHcFGFsYtwbLsCVMXLZVF1Tq15 H/fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=o9kZZ4ShtUBySG8kNNKPjt7UxcAfmn40nTCWrz8Qxyg=; b=jxo1B5Nkb+UvUu1vr76nLVPXoRtdBbufJZLRbBZJDIR9l5/vdanW72ZvErHLLrivVo moJC6T8qt+7E26QwLY/Dnv51B87YyWryfEFb3CI7OiZJjXWDNeYDmxFOGG99rcZnrQfQ SuoE46lyenHeR5aSxWQjaHGad2G3CBEeZxiPbn9xL1o6LJGe1UAKmDn59HKR3tItgVGs 3WyIi0kfxgoDcBr73sZiM8ej7wFMLsJ1Hyh0EG1taxUTfJxMwvV7r7l6AxKTylCTgUAe Hf5PLoWA9BnRLps7zwWH+YLQZBa92ka0lj2EJfBl+Kjde9Siwp101LUUyxuWHDZzCZYM yGUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@0x0f.com header.s=google header.b=Oxd+RJVT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h26si3776997edq.453.2021.03.12.02.39.36; Fri, 12 Mar 2021 02:39:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@0x0f.com header.s=google header.b=Oxd+RJVT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233569AbhCLKgX (ORCPT + 99 others); Fri, 12 Mar 2021 05:36:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233255AbhCLKfu (ORCPT ); Fri, 12 Mar 2021 05:35:50 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD36AC061574 for ; Fri, 12 Mar 2021 02:35:49 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id g24so3358798qts.6 for ; Fri, 12 Mar 2021 02:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o9kZZ4ShtUBySG8kNNKPjt7UxcAfmn40nTCWrz8Qxyg=; b=Oxd+RJVTsSb0oiRRHZ8zf1GhpuY5tc4w9FZ9OwFxcp/02OWPNqeNkgWozSLXFIhtju KMeBauUuHhUuV23KKmHNa7OqcPA7mZq3AOpNlENixqy9OP5tKgfiLHecldmdIDDF/t61 tkz57N8a53AXpEngmCCThh1X9XB06/K9dXJ6M= 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=o9kZZ4ShtUBySG8kNNKPjt7UxcAfmn40nTCWrz8Qxyg=; b=qv2HpzuW5g6ZQIglE70h8sTXbVq0rnR3ng3LfBapKjTzT4d8mF7Rsse0VV+manFsLW VPKS45CzWGjClhTX2n/2oW+MfUWerA+5iflcg5dZlc0QxZKTr7BIwn9/LEUWfedknL7m pfaM4Bxoz0YQ09SGPquBlPoeQ0PoVkDk0/eHAAMb+jvSikZUdGExc4nSvD+EPStz9wm4 klHlaHOsrfdGZo43VcBbwIDJmU/pQlMqReoomGN7Wh3WhrK3AJRvWPtsoXtLL2LZ6Aa9 cBp83NJNERm1/3+DAdypxPBukVgpM1CJmEM22oPP+YKZcw7omARp9LQG97gTAB/kUKRa SuEQ== X-Gm-Message-State: AOAM531K8JTqjw994adly7X27hLNsDOWmUjaFZl9tRmlWnYgKUw78zeY eIcIGTrIOzgWc0Ccz+b+DrXI7xmDjBxejXF4ukO0ig== X-Received: by 2002:aed:2981:: with SMTP id o1mr10859464qtd.386.1615545348968; Fri, 12 Mar 2021 02:35:48 -0800 (PST) MIME-Version: 1.0 References: <20210311161140.32678-1-mark-pk.tsai@mediatek.com> In-Reply-To: <20210311161140.32678-1-mark-pk.tsai@mediatek.com> From: Daniel Palmer Date: Fri, 12 Mar 2021 19:35:38 +0900 Message-ID: Subject: Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration To: Mark-PK Tsai Cc: Daniel Palmer , linux-arm-kernel , Linux Kernel Mailing List , linux-mediatek@lists.infradead.org, Matthias Brugger , Marc Zyngier , Thomas Gleixner , =?UTF-8?B?WUogQ2hpYW5nICjmsZ/oi7HmnbAp?= Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 12 Mar 2021 at 01:11, Mark-PK Tsai wrote: > Why irq could accept either? As the irq intc has no way to clear it's triggered state (no eoi) it must just pass the signal through instead of latching it? Otherwise it would latch once and never again right? That's what I really didn't understand. If it just passes the signal through and maybe inverts it then the GIC can use edge or level I think. > So maybe we don't need to do extra work to check the type for an fiq or irq controller? I think without the eoi callback for the fiq it would only ever fire once. I don't think doing the same eoi callback for the irq intc hurts anything but it wouldn't do anything either from what I can tell. > And I will update the patch as following: I think maybe Marc or someone else that knows better than I do should comment on what needs to happen. My input is just that the fiq controller seems to trigger on an edge, holds it's signal to the GIC high until eoi happens and then only triggers again on an edge. I guess it doesn't matter if it's an edge or level if that's how it works but you'd only get one interrupt out of it per edge even if configured as a level interrupt. The main thing I didn't want was filtering out edge interrupts entirely as that breaks using edge interrupts with gpios i.e. using gpiomon. With the changes to set the polarity it can now detect rising or falling edge gpio events. :) Thanks, Daniel