Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp132835pxf; Wed, 10 Mar 2021 02:20:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzujGXu4o1dutvCEkkXXzkzJAkUxHT1ySrpbmlJeqdHobkq9FRGmcZMmfWe/Q+di57Bn5zH X-Received: by 2002:a17:907:971a:: with SMTP id jg26mr2911990ejc.317.1615371645575; Wed, 10 Mar 2021 02:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615371645; cv=none; d=google.com; s=arc-20160816; b=McX1nGLsPkeD+WG3lFtHX2UdhxZeKpZ05oFRV7UoRvprCM0ma+ILt1gfpYuirChhvP D0LVAc6lq2nznjARsdZp9cEoMS1a9iDD13XFpegk9xcbMDSmy3f7HrZReC0W9oZYQhpV xDPxCU9Lt3recbyyuKZEXl9aDSJBT4ktqTfFIbIW/W1m2vmrgUueuINRpG2OEpLEqmi4 sFeGaCRcmt7H0UcZHbhJj1vApgs5WfN3O99YibGX9b9sELHIO1SjFjas4Nfb+nKf89jm GVPyXbELPsLCHVTLcZ8yzhK125vaFRByXBTzqzUd2mKd9/OoNYx53lWa1tx1KWt0AxGu Ddaw== 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=edRCQjcETTP/TwhrCwOF/p03cqo8+OKWF6FKVjUQ7d4=; b=ozE4TnSy9m6a6gdTYlqYucqJYMxr3indW9qZJgSm4vVF6QSzK0aHB49Gg0SdeoHUPm J17FUwp+OMpqCXSlzsfg1OJDZzQiYR9VG/iRA7Mm9Efsl0SWaHecZZAfiqgynvYMhG+E 4rs4nFyEQJ/zyagPcARbS3Ahaoz9WUSU8/10OXZRDDIgi9speYrZQ+mpy18MSWz1iOuZ VFBD+LcE/cJwRn3BNHJkI9UC8pXVy2ML728NLDbhgUXr80MiYHNkUXsCLdz4tJP8U/jW eSZ9xFFQcBWDOht0lvH89d55zjTxlZptZdK+uuCObh6KXpdIMsox/YKKFFuCz54ELWzP XXtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@0x0f.com header.s=google header.b=c3crVqzd; 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 ox25si11281565ejb.183.2021.03.10.02.20.22; Wed, 10 Mar 2021 02:20:45 -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=c3crVqzd; 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 S229609AbhCJKT1 (ORCPT + 99 others); Wed, 10 Mar 2021 05:19:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbhCJKTG (ORCPT ); Wed, 10 Mar 2021 05:19:06 -0500 Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 643F0C06174A for ; Wed, 10 Mar 2021 02:19:04 -0800 (PST) Received: by mail-qv1-xf36.google.com with SMTP id h13so469402qvu.6 for ; Wed, 10 Mar 2021 02:19:04 -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=edRCQjcETTP/TwhrCwOF/p03cqo8+OKWF6FKVjUQ7d4=; b=c3crVqzdqxMSrxomGmHwHFysts3ulWh8YjOvMWfaUXzm7Gydu3akwB2gOVltT7ubTS KxQsZrGwUaWV6Tn3Khh73cDc9/3JEReNpQ9I9e4qgpJhg97s1eOef5pkWzC+ez/Y68vk lMpUNacccaIXGt+4AIXQwLCOF3rqWFcaiFOiE= 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=edRCQjcETTP/TwhrCwOF/p03cqo8+OKWF6FKVjUQ7d4=; b=gwsXA2P3liRTPSEGZN2dRtj5ftL9uCwFjfYcwk1mjhslFr7IiS+SUydSDmDQpeAxmu LJkxRYmVwXZ5++VOpn0rrHgBxcL2KGhGf26XctjakXU3vXRnLTnXT70AvVesiVKHQqOu RJq5YEV5RkgVpFWC12ET0rhbsrXBt48iKCD5RTfCC9Ft8gKg8tdxueXgeERFOnRgmbT2 75XeIlwEuQVTaAS4O/oPx/unkXnRAI8z0aE3bk/+5+nISlF+6wUTgcgDNtRNdWtIsT+L ubWMJVUauah3rc8zlpD5SoaozSxLTt7B2Hg3YTEvMbi8/S4gCC+r6wPack/9yHXdomew R+rQ== X-Gm-Message-State: AOAM531TpNLMcDUCRNB0cZm/7lMB1W0hAuZ/l0qp+wR3wD1rl+ILgcVd Jv1IGECeB1NGIR94nZ6xA2WmFpX15ok2/Og21Mi27w== X-Received: by 2002:a0c:9ac9:: with SMTP id k9mr2044505qvf.29.1615371543518; Wed, 10 Mar 2021 02:19:03 -0800 (PST) MIME-Version: 1.0 References: <20210308143011.24538-1-mark-pk.tsai@mediatek.com> In-Reply-To: <20210308143011.24538-1-mark-pk.tsai@mediatek.com> From: Daniel Palmer Date: Wed, 10 Mar 2021 19:20:27 +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 Hi Mark-PK, On Mon, 8 Mar 2021 at 23:30, Mark-PK Tsai wrote: > From: Daniel Palmer > >On Mon, 8 Mar 2021 at 15:05, Mark-PK Tsai wrote: > >> +static int mst_irq_chip_set_type(struct irq_data *data, unsigned int type) > > > +{ > >> + if (type != IRQ_TYPE_LEVEL_LOW && type != IRQ_TYPE_LEVEL_HIGH) > >> + return -EINVAL; > >> + > > > >Does this mean we can't do rising or falling edge interrupts? > > Yes, the interrupt of mst-intc is either level high or level low. > Actually the input signal can be pulse, but it will be converted to level > by the latch in mst-intc. Are the GPIO connected interrupts meant to be configured as level interrupts then? For the MStar MSC313(e) there are 4 (that I know of) GPIO lines that are wired into the mst-intc that requires EOI. Until this patch with those lines configured as a rising edge a single interrupt came each time the GPIO was pulled up as far as I remember. I'm probably misunderstanding but a level interrupt doesn't seem to make sense for a GPIO as it can't be serviced to clear the interrupt. Thanks, Daniel