Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5097912imu; Sun, 20 Jan 2019 03:32:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN5JefcCxou9ZEY2xvUQEFu0MteRlcs4Wdsg7Py5yv4Q6ZgFhJ9JhmXuFbgljwbX00DNKnrI X-Received: by 2002:a17:902:8ec8:: with SMTP id x8mr26153155plo.210.1547983936388; Sun, 20 Jan 2019 03:32:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547983936; cv=none; d=google.com; s=arc-20160816; b=MaVmeen9lzKOOB6uXvqdykj/Xb1petCoaE3oyo4kYB0KSaI1X49g4/omk9/i9Q+4na RiLKeg/qHDk+V1tKIPf+qY2Pe3s4m3y0NdN73AQGzkeTed3rZzibfdqt2fUUdrNxOG9o AgZyITNjINq2aU2F9vW71PVl1DchqUzZyOvwkTcBqoas75haZsdyPvLbZ+n9PpJEtfaF J52Qt3ujqq9TFpL5WgzB9OplrCcT1GTBgWd52gVwGa/OeTx8+SgzD03gEBBkTAC9No3Q RATkZCyuA4+LP59+3uMMBzPt0Yh7rtePL3y+r3FWNojp0DV5ngFQ6oUgwND+IBbcDZwY CEVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=X0fivhnxPI01KleTqO4APAT/3wz2QqxHjlfOuf9uwCI=; b=v2vllHKZVedOVqRldFkWVoWc76X7FlCR4l5t/9T6m0Wh4hIkNz2PJbqPBxKd6YOp0Z hSosdkSKvKDLI0hO3LstHojjvZ9UmbepR9F4ErY3LCrvDtf5S1Bk17oPqrnUN15CaOGh 7E1xpUHm+uNjDkE3NRS6rz/eDXyhTBnw2KA8qcrsSMGI1OztvIaDGVZdNysTwop4RDfe aH9NSJnvUDPee2c3FrABlxdN7vUAgyFTXqN+sso3WlM9qMWYrlt+JhwVYXggfnIJ5GC0 2/1f0pmapLt10ai0KRQ3R4oPIRGY2M3osln2Jhz+7rmAVkBLXx2Hcs7Nj93F/WNPDQ+Q ouDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i17si10075705pgk.233.2019.01.20.03.31.59; Sun, 20 Jan 2019 03:32:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730534AbfATLav (ORCPT + 99 others); Sun, 20 Jan 2019 06:30:51 -0500 Received: from foss.arm.com ([217.140.101.70]:49210 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730478AbfATLau (ORCPT ); Sun, 20 Jan 2019 06:30:50 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E6401A78; Sun, 20 Jan 2019 03:30:49 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 007A53F557; Sun, 20 Jan 2019 03:30:45 -0800 (PST) Date: Sun, 20 Jan 2019 11:30:36 +0000 Message-ID: <86k1iza7mr.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Brian Masney Cc: linus.walleij@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, shawnguo@kernel.org, dianders@chromium.org, linux-gpio@vger.kernel.org, nicolas.dechesne@linaro.org, niklas.cassel@linaro.org, david.brown@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, thierry.reding@gmail.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v6 04/15] spmi: pmic-arb: convert to v2 irq interfaces to support hierarchical IRQ chips In-Reply-To: <20190119204252.18370-5-masneyb@onstation.org> References: <20190119204252.18370-1-masneyb@onstation.org> <20190119204252.18370-5-masneyb@onstation.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 19 Jan 2019 20:42:41 +0000, Brian Masney wrote: > > Convert the spmi-pmic-arb IRQ code to use the version 2 IRQ interface > in order to support hierarchical IRQ chips. This is necessary so that > spmi-gpio can be setup as a hierarchical IRQ chip with pmic-arb as the > parent. IRQ chips in device tree should be usable from the start without > the consumer having to make an additional call to gpio[d]_to_irq() to > get the proper IRQ on the parent. > > The old qpnpint_irq_domain_map function would hardcode the handler as > handle_level_irq, however qpnpint_irq_set_type would later override the > handler. Properly set the handler when the IRQ is mapped. This new code > doesn't return an error for IRQ_TYPE_NONE and preserves the existing > behavior of using handle_level_irq since there are some broken device > tree bindings that need to be corrected first. > > Driver was tested on a LG Nexus 5 (hammerhead) phone. > > Signed-off-by: Brian Masney > --- > The broken device tree bindings are corrected in this patch series and > additional validation to the type field is added later in the series. > > Changes since v5: > - Properly set handler to edge or level when the IRQ is mapped. > > Changes since v4: > - None > > Changes since v3: > - None > > Changes since v2: > - Don't move pmic_gpio_of_match block. Use device_get_match_data instead > of of_match_device. > - Correct build warning on arm64: warning: cast from pointer to integer > of different size > > drivers/spmi/spmi-pmic-arb.c | 67 +++++++++++++++++++++++++----------- > 1 file changed, 47 insertions(+), 20 deletions(-) Reviewed-by: Marc Zyngier Thanks, M. -- Jazz is not dead, it just smell funny.