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 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 3F442CA9EB0 for ; Sun, 3 Nov 2019 22:23:41 +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 0301D2190F for ; Sun, 3 Nov 2019 22:23:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="r0vvCxhi"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QRCiTT4R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0301D2190F 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=Zth2R03qaZCL0doeIGAwJVmsjpoQi2F3+fpnn0ds2N4=; b=r0vvCxhiC3DnGS M4xLBmkhwYbo5ZokpPpV9RENRkjwGW3p4Ny3wiRfL4DosfdC6nEl6U5IMA9/5BLP+doKeDcI9kE9N oGnDz/FMFMwnMnbFyET64+olMJPiILjyMUMLKwBT7/49v7rV6ChXuQZObaRpreavXsN+lL3u6ossq Vv+LVSSolHgAIJHcU+BRmG11VgZxwoTqC9IpV33b64mQ9V1yzeRqopA0gR3owWFftrFeWmNpPM4w5 bId3HTmovKIicHkC4oVx05x2BdDWpAkk9p5Q2oPFFzc5tAolCzwNCMq515IhDOEt6fjv860Uq86O/ GBkiAhu0cBOkR5vo07Fw==; 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 1iROHa-0007RD-TU; Sun, 03 Nov 2019 22:23:38 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iROHX-0007QV-Du for linux-arm-kernel@lists.infradead.org; Sun, 03 Nov 2019 22:23:37 +0000 Received: by mail-lf1-x141.google.com with SMTP id j14so10791430lfb.8 for ; Sun, 03 Nov 2019 14:23:34 -0800 (PST) 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=ESUhhN6edmpvHFOV1Utv000unf+voyNT/XqNjo94L3E=; b=QRCiTT4RtFkcbSgtjNd916P8LiP+fVE6O67kBgLv/qfB9arXpn+JSLOI9BH4ht8w5p KO911xAHoIUr2XcjLsIrtSJrqAIg3Qasmv8+1w5kf9IBMmZCyRQju63Wp5V55a43xrXN 8ovnfJqkCmPQcjvSEwLq70modMTgbPR99uE3DigW7sy3fcFtk2miLcyWe1QfTA2wL+m4 dg8noVdcjht1feN13oMlJxV2e5zNNV2q5SsIQ8N1+oERo0Zcwm0tnPK1UutkbuGvAh0v +BrnKqpxrWpfpHLar2RvsTp9piW4rgejaoXD1dWiwwDCLFBp2hXa7Ab6zkyeU8jcSK4a bz6w== 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=ESUhhN6edmpvHFOV1Utv000unf+voyNT/XqNjo94L3E=; b=amYQ38H0kCS4IygXyaGDmt8kIgUjyrUuniKBcWFNunpjTAAdIyfH1n/ULSjcnC8on4 PUkZK36YNQMRx4hNvAn3pI+nkbZiIJACJrzjDrEbGSBU75HQLN2wLM/584eZtOCHV7rT VR+fFbxdevnmfaOFtiZxgcti2M/iXXOr6Hl9YVYaSR/AvTmrv4rNwOzLxEuVnRkuN1tQ TTc2t4QB7Cx4hMCtgRUpKiXfAh3rWUTf3cS8ITqCYk4W/9RmUuw91Bxfd/P8CjaaDH8L q/idG3LXnzIGG5a6XNpgnn9StzwGV6YlpTyiun2bNOWYz2wUEpWa+/iqeZXovs/tR0Kh rJ7w== X-Gm-Message-State: APjAAAXL/8JKAF5m/7QPi4yOmjdCgFB2N+MJhSLnRg6kxkr9RuQgew3b +7KGqEfW+uFzrC9y/wxm5tpVGzNGjVmx5jWUNC+D8w== X-Google-Smtp-Source: APXvYqxPSzDXNKfugYnnHKUIKKHIHEvHG3nXTxP1PlQspCYo+knQSZ/r4By3eoLa9c19qr7bRZjXcrwmJ2fir+v3Ops= X-Received: by 2002:a19:ca13:: with SMTP id a19mr14186914lfg.133.1572819812751; Sun, 03 Nov 2019 14:23:32 -0800 (PST) MIME-Version: 1.0 References: <20191101015621.12451-1-chris.packham@alliedtelesis.co.nz> <20191101015621.12451-2-chris.packham@alliedtelesis.co.nz> In-Reply-To: From: Linus Walleij Date: Sun, 3 Nov 2019 23:23:21 +0100 Message-ID: Subject: Re: [PATCH 1/2] pinctrl: bcm: nsp: use gpiolib infrastructure for interrupts To: Florian Fainelli X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191103_142335_496016_885658D1 X-CRM114-Status: GOOD ( 14.55 ) 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: Scott Branden , Ray Jui , "linux-kernel@vger.kernel.org" , "open list:GPIO SUBSYSTEM" , Chris Packham , bcm-kernel-feedback-list , Linux ARM 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 Sat, Nov 2, 2019 at 3:55 AM Florian Fainelli wrote: > > + girq = &chip->gc.irq; > > + girq->chip = irqc; > > + /* This will let us handle the parent IRQ in the driver */ > > + girq->parent_handler = NULL; > > + girq->num_parents = 0; > > + girq->parents = NULL; > > + girq->default_type = IRQ_TYPE_NONE; > > + girq->handler = handle_simple_irq; > > It might be worth creating a helper that can be called to initialize all > relevant members to the values that indicate: let me manage the > interrupt. This would make us more future proof with respect to > assumptions being made in gpiolib as well as if new fields are added in > the future. This would be a separate patch obviously. I have some different plans for this, but first I want to pull all struct gpiolib_irq_chip *girq setup over to the new API, so I can get rid of the old helper functions. First chained variants, when that is done, threaded variants, when that is done abstract this type that is using its own parent handler and then eventually delete the old helper functions. Then I can think about adding new helper functions :D Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel