From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88368FA372A for ; Wed, 16 Oct 2019 12:53:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EA5F21848 for ; Wed, 16 Oct 2019 12:53:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dg46YAn5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TsPMzUgW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EA5F21848 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gReFZPGA7fJMNNDV3wOtxsmh8LSWCcgwSwXzb/HAbII=; b=dg46YAn5zLp5+j VlOr0sOM7G4PuwKmEPNo4MCTO6q/7bj8E3tkwaN77fIl36JMYXLxpTFWsTBIO7cP+1nBOikZfhB6Y ek7cj/mnZkudERNIp10k7UblhoNoRu9/YLcuPhrb3w+jchbph/JtlTVt0FQD7JaH+jaaCzRxU/QWa SXb91y4vxPdsMZtP7ZOt8fkfDD/AUiJNBbt5FYqp3t1GBek9IeeMiTDGqe3CzwjwE5Nz7uoEsQtsf KM1NIYIJR4BDrR2E1yB4FYh46c9OGb9z0xTBPj3N+xt6KbINWykCZCnhQg7FydaX5L+2uJUDbRlgX NcGiqgjArzDcfs07kZjQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKioN-0000ra-VY; Wed, 16 Oct 2019 12:53:55 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKioK-0000qe-9E for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2019 12:53:53 +0000 Received: by mail-qt1-x844.google.com with SMTP id u22so35871028qtq.13 for ; Wed, 16 Oct 2019 05:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P/sRs2+kPjcvwd2trmOBWPVdM0AxawvVsZ+s8sAO7/4=; b=TsPMzUgWcdtdkasHhYq577HFiCkshIqaxslChEP+do1RFpTIxW2jQRhCLSPwbd5x8i U7niU6BZWK/agFFkyA+6MFgZbwkW60EosnfY+llAQGBocfTcp4KRF8J/zJn8tfy+Xn4R ND/tIJ4q5KZ7QKtwldwq2k59a5s7at2G3Hi8BXC6iZm33w3oVf21uxvJWvsoT6eTs4Vn WDL+yMSxQwFiUsYSJ7A7I+v43eHl0YHYHoIzhjWanzIpiZ7RpplDgnbKGyR9Qf/+l5dt /jBMTe3E/dc+CJIqaHslN4E+fQmzn4yXKprR+7pYhIDJP/ZUFpJZXfCOGoH5zVOCAejO Ui3Q== 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=P/sRs2+kPjcvwd2trmOBWPVdM0AxawvVsZ+s8sAO7/4=; b=Is3JhfqPR0v4Qlaz6zJx003//2dsmB0SCv0kat/dJAQIpn7X0oqytTFsQ3oAx+PnHC QDO5thbmWaCtEYIglYBjofzm64z8Lfb5aK2igLV9BVX4qjAqnKVpYW+FB1ICYoWLGv4S Zu3ng//NTg35E5WEbNdFKkGYO6CTCQmdAnXAYC6kWkVuJ+s3cqbId9EFlRIdfNXgRDil nCsFWooaGokZx5Jc5QWTpeGoynVrM2gnSm4m8DEkvQqz8n3xH8zmxQsuGgDvjVzqgfHN xFnBSB0gxkOdnois8rij1KEo/XgAsm+go+5EwLg/f1rzGXaqQVjwVQvf+MisGKo7aIUv E+Gg== X-Gm-Message-State: APjAAAUXrHgCe6EQa0RZ6aGq/SBa2lTVeVWG2Ai2B4/6i8oiK8tAjwKA 8j+Nhamagaocx3aRUSt2wAGzrM/YQZ1t3PtbRWDgmQ== X-Google-Smtp-Source: APXvYqxRmpmcyaCxmLmkEi0JWpxgYlv/RpJs/yNT3A1lP3hXCkiugyGea31zdLuV3cm9n/Bm5GfFph4HfEVVYNrBVag= X-Received: by 2002:ac8:3ac6:: with SMTP id x64mr33736244qte.51.1571230430797; Wed, 16 Oct 2019 05:53:50 -0700 (PDT) MIME-Version: 1.0 References: <20191004012525.26647-1-chris.packham@alliedtelesis.co.nz> <20191004012525.26647-3-chris.packham@alliedtelesis.co.nz> <628c495994a0648d956bc663ea8fdcfa6f439802.camel@alliedtelesis.co.nz> In-Reply-To: <628c495994a0648d956bc663ea8fdcfa6f439802.camel@alliedtelesis.co.nz> From: Linus Walleij Date: Wed, 16 Oct 2019 14:53:39 +0200 Message-ID: Subject: Re: [PATCH 2/2] gpio: Add xgs-iproc driver To: Chris Packham X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191016_055352_328439_029B7922 X-CRM114-Status: GOOD ( 14.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "f.fainelli@gmail.com" , "sbranden@broadcom.com" , "bgolaszewski@baylibre.com" , "rjui@broadcom.com" , "linux-kernel@vger.kernel.org" , Richard Laing , "linux-gpio@vger.kernel.org" , "robh+dt@kernel.org" , "bcm-kernel-feedback-list@broadcom.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 14, 2019 at 12:08 AM Chris Packham wrote: Me: > > I think this should be a chained interrupt handler (see below how to > > register it). > > > > See e.g. drivers/gpio/gpio-ftgpio010.c for an example: > > change function prototype, no return value, use > > chained_irq_enter/exit(irqchip, desc); etc. > > > > I don't think a chained interrupt handler can work. The problem is that > the parent irq on the SoC is shared between the gpio and uart0 (why > it's this way with two IP blocks in the same SoC I'll never know). When > a chained interrupt handler is registered I lose the serial interrupts. > Please correct me if there is some way to make the chained handlers > deal with sharing interrupts. Aha I see. Look at: drivers/gpio/gpio-mt7621.c And how that driver sets the parent handler to NULL in order to still exploit the core helpers. I will refactor this to some more elegant API at some point when I get there, for now follow the example of mt7621. Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel