Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4577026imu; Sat, 19 Jan 2019 12:49:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN4gVkmhaSLyDHW5Y7e+z9ltcAvLuPwFEpseS5a3wQ4yJCEtDFFCCAegsFqppnBdCjWGXK2D X-Received: by 2002:a63:ac46:: with SMTP id z6mr22584128pgn.162.1547930968257; Sat, 19 Jan 2019 12:49:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547930968; cv=none; d=google.com; s=arc-20160816; b=WjuMi+4R09/4a/jKi9EDH6Iv3DdrRSgpmoJsaOEo0h0gpvktN0nlE74oiv59jSoNIB ar3iMhmbvfNMVbNxjqLdU4TGOY5+71Z0Tc223hVCAJ9Do1I2NTUDn1E4ORY1ODHX02bl eNbmvMZzl+pHD0Eumr8KQB3RKbswprJb1kCVeqgC8ac1VqvAwdE4M+GxoBrDxcyOXbKO 18Tj60xvvizNWk+l3Cr6z9T396yDwkiDeUR/Z8QmSXyNX0JfPxGz/ICaW3PQNUkpjZ3c yMbOaATubZmYAUEDsY9ycx9c2DdTXlWH5+BQPizwnjxxMv87IYDrFDCTH5oia7ZUJU8S w9mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=8rLAmfGDAnudQnHidsqU1ClJ3MrPhrL7o/s7HrJKqxw=; b=BgvSzaSFPWCNa0kjCju7QHa8w3HuMQJztFCyMmtJvCY3JBUlcw/eysmPPxSPQe44C0 Ln4RTxO66RtPUXVwQseS/21fu+eN9gWccvFDnfQcoSh3LTup8CRpbrUynEVbhU1328YC UROHRV/baLr+6KGrLzB2ZENBdy3PI1CT9O/it0U/Mnfrrn7rO71fpaXri5Z26LH2Xv5y I1b4UaUaeLdJnOFOQq9fDCRHIXrUMt01AI9OhuuzLbjX4q+0hEsuXXhAIJolS9ExAojr dHjMoS91s8ovZ/nczYtOvTyjv8bgao52Gwhp/xKYPs1OnLIstptETyoMjZF8qYvDT4OV 4ZiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@onstation.org header.s=default header.b=t7PENYu7; 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 e37si7820302plb.172.2019.01.19.12.49.10; Sat, 19 Jan 2019 12:49:28 -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; dkim=fail (test mode) header.i=@onstation.org header.s=default header.b=t7PENYu7; 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 S1729293AbfASUnc (ORCPT + 99 others); Sat, 19 Jan 2019 15:43:32 -0500 Received: from onstation.org ([52.200.56.107]:35144 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729173AbfASUnb (ORCPT ); Sat, 19 Jan 2019 15:43:31 -0500 Received: from localhost.localdomain (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id A6B0017F; Sat, 19 Jan 2019 20:43:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1547930610; bh=ep+iBVynUw9Gk7YotCrkWhKQqJcbs8b9oXV+MQWHa+Y=; h=From:To:Cc:Subject:Date:From; b=t7PENYu7PMcOZ4t+nOQfZxlOFjrkGammbOuinnv/yULrANmqKP+h/Upy3JZ2I1MdU yHwrA+etg87wpywMi7I+w0YSP5ieDuA+BTu+w3PrR/KyJOoNQoyQwjala+DcCywu2x ASb8wl36SpTms4o8Tjfsg2yUj4FC9Ak8wI06iz5o= From: Brian Masney To: linus.walleij@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, marc.zyngier@arm.com Cc: 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: [PATCH v6 00/15] qcom: spmi: add support for hierarchical IRQ chip Date: Sat, 19 Jan 2019 15:42:37 -0500 Message-Id: <20190119204252.18370-1-masneyb@onstation.org> X-Mailer: git-send-email 2.17.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds hierarchical IRQ chip support to spmi-gpio so that device tree consumers can request an IRQ directly from the GPIO block rather than having to request an IRQ from the underlying PMIC. For more background information, see the email thread with Linus Walleij's excellent description of the problem at https://www.spinics.net/lists/linux-gpio/msg34655.html. This work was tested on a LG Nexus 5 (hammerhead) phone. My status page at https://masneyb.github.io/nexus-5-upstream/ describes what is working so far with the upstream kernel. Changes since v5: - Patch 4: Set handler to edge or level when the IRQ is mapped. - Patch 7: Change IRQ_TYPE_NONE to IRQ_TYPE_EDGE_RISING - Patch 14: New patch to validate type when mapping IRQ Changes since v4: - Patch 3: Remove unnecessary u16 cast on device_get_match_data() - Patch 5: Change '&struct gpiochip' in kernel doc to '&struct gpio_chip' High-level changes since v3: - Add missing variants to spmi-gpio driver and device tree binding doc that are already in use in device tree. - Introduce patch that disassociates the old virq if hwirq mapping already exists and then drop it at the end of the series. This is to not break git bisect for existing boards. - Migrate arm64 device tree files. - There are 8 new patches in this series and I denoted this in the notes on the relevant patches. High-level changes since v2: - Dropped patch to mfd/qcom-spmi-pmic.c - Patch 3 is new and adds two new functions to gpiolib - Patch 6 is new and corrects the only other upstream user of spmi-gpio High-level changes since v1: - Patches 1 and 2 are new. This brought in a third subsystem (mfd). - I have detailed changelogs attached to the notes on patches 3-5. Brian Masney (15): dt-bindings: pinctrl: qcom-pmic-gpio: add qcom,pmi8998-gpio binding pinctrl: qcom: spmi-gpio: add support for three new variants pinctrl: qcom: spmi-gpio: hardcode IRQ counts spmi: pmic-arb: convert to v2 irq interfaces to support hierarchical IRQ chips gpio: add irq domain activate/deactivate functions spmi: pmic-arb: disassociate old virq if hwirq mapping already exists qcom: spmi-gpio: add support for hierarchical IRQ chip ARM: dts: qcom: pm8941: add interrupt controller properties ARM: dts: qcom: pma8084: add interrupt controller properties arm64: dts: qcom: pm8005: add interrupt controller properties arm64: dts: qcom: pm8998: add interrupt controller properties arm64: dts: qcom: pmi8994: add interrupt controller properties arm64: dts: qcom: pmi8998: add interrupt controller properties spmi: pmic-arb: validate type when mapping IRQ spmi: pmic-arb: revert "disassociate old virq if hwirq mapping already exists" .../bindings/pinctrl/qcom,pmic-gpio.txt | 1 + arch/arm/boot/dts/qcom-pm8941.dtsi | 38 +---- arch/arm/boot/dts/qcom-pma8084.dtsi | 24 +-- arch/arm64/boot/dts/qcom/pm8005.dtsi | 6 +- arch/arm64/boot/dts/qcom/pm8998.dtsi | 28 +--- arch/arm64/boot/dts/qcom/pmi8994.dtsi | 12 +- arch/arm64/boot/dts/qcom/pmi8998.dtsi | 16 +- drivers/gpio/gpiolib.c | 37 +++++ drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 140 +++++++++++++++--- drivers/spmi/spmi-pmic-arb.c | 74 ++++++--- include/linux/gpio/driver.h | 5 + 11 files changed, 225 insertions(+), 156 deletions(-) -- 2.17.2