From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v3 15/25] pinctrl: qcom: spmi-mpp: hardcode IRQ counts
Date: Sun, 17 Oct 2021 11:53:27 -0500 [thread overview]
Message-ID: <YWxVB/QxNmWwYfmW@builder.lan> (raw)
In-Reply-To: <20211008012524.481877-16-dmitry.baryshkov@linaro.org>
On Thu 07 Oct 20:25 CDT 2021, Dmitry Baryshkov wrote:
> The probing of this driver calls platform_irq_count, which will
> setup all of the IRQs that are configured in device tree. In
> preparation for converting this driver to be a hierarchical IRQ
> chip, hardcode the IRQ count based on the hardware type so that all
> the IRQs are not configured immediately and are configured on an
> as-needed basis later in the boot process.
>
> This change will also allow for the removal of the interrupts property
> later in this patch series once the hierarchical IRQ chip support is in.
>
> This patch also removes the generic qcom,spmi-mpp OF match since we
> don't know the number of pins. All of the existing upstream bindings
> already include the more-specific binding.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 25 ++++++++++---------------
> 1 file changed, 10 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> index 2da9b5f68f3f..a9f994863126 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
> @@ -812,11 +812,7 @@ static int pmic_mpp_probe(struct platform_device *pdev)
> return ret;
> }
>
> - npins = platform_irq_count(pdev);
> - if (!npins)
> - return -EINVAL;
> - if (npins < 0)
> - return npins;
> + npins = (uintptr_t) device_get_match_data(&pdev->dev);
>
> BUG_ON(npins > ARRAY_SIZE(pmic_mpp_groups));
>
> @@ -912,16 +908,15 @@ static int pmic_mpp_remove(struct platform_device *pdev)
> }
>
> static const struct of_device_id pmic_mpp_of_match[] = {
> - { .compatible = "qcom,pm8019-mpp" }, /* 6 MPP's */
> - { .compatible = "qcom,pm8841-mpp" }, /* 4 MPP's */
> - { .compatible = "qcom,pm8916-mpp" }, /* 4 MPP's */
> - { .compatible = "qcom,pm8941-mpp" }, /* 8 MPP's */
> - { .compatible = "qcom,pm8950-mpp" }, /* 4 MPP's */
> - { .compatible = "qcom,pmi8950-mpp" }, /* 4 MPP's */
> - { .compatible = "qcom,pm8994-mpp" }, /* 8 MPP's */
> - { .compatible = "qcom,pma8084-mpp" }, /* 8 MPP's */
> - { .compatible = "qcom,pmi8994-mpp" }, /* 4 MPP's */
> - { .compatible = "qcom,spmi-mpp" }, /* Generic */
> + { .compatible = "qcom,pm8019-mpp", .data = (void *) 6 },
> + { .compatible = "qcom,pm8841-mpp", .data = (void *) 4 },
> + { .compatible = "qcom,pm8916-mpp", .data = (void *) 4 },
> + { .compatible = "qcom,pm8941-mpp", .data = (void *) 8 },
> + { .compatible = "qcom,pm8950-mpp", .data = (void *) 4 },
> + { .compatible = "qcom,pmi8950-mpp", .data = (void *) 4 },
> + { .compatible = "qcom,pm8994-mpp", .data = (void *) 8 },
> + { .compatible = "qcom,pma8084-mpp", .data = (void *) 8 },
> + { .compatible = "qcom,pmi8994-mpp", .data = (void *) 4 },
> { },
> };
>
> --
> 2.30.2
>
next prev parent reply other threads:[~2021-10-17 16:53 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-08 1:24 Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 01/25] dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML Dmitry Baryshkov
2021-10-08 2:46 ` Rob Herring
2021-10-08 1:25 ` [PATCH v3 02/25] dt-bindings: mfd: qcom-pm8xxx: add missing child nodes Dmitry Baryshkov
2021-10-08 2:46 ` Rob Herring
2021-10-17 21:28 ` Linus Walleij
2021-10-18 18:40 ` Rob Herring
2021-10-08 1:25 ` [PATCH v3 03/25] ARM: dts: qcom-apq8064: add gpio-ranges to mpps nodes Dmitry Baryshkov
2021-10-12 23:54 ` Linus Walleij
2021-10-08 1:25 ` [PATCH v3 04/25] ARM: dts: qcom-msm8660: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 05/25] ARM: dts: qcom-pm8841: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 06/25] ARM: dts: qcom-pm8941: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 07/25] ARM: dts: qcom-pma8084: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 08/25] ARM: dts: qcom-mdm9615: add gpio-ranges to mpps node, fix its name Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 09/25] ARM: dts: qcom-apq8060-dragonboard: fix mpps state names Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 10/25] arm64: dts: qcom: pm8916: fix mpps device tree node Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 11/25] arm64: dts: qcom: pm8994: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 12/25] arm64: dts: qcom: apq8016-sbc: fix mpps state names Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 13/25] pinctrl: qcom: ssbi-mpp: hardcode IRQ counts Dmitry Baryshkov
2021-10-17 16:52 ` Bjorn Andersson
2021-10-08 1:25 ` [PATCH v3 14/25] pinctrl: qcom: ssbi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
2021-10-17 16:53 ` Bjorn Andersson
2021-10-08 1:25 ` [PATCH v3 15/25] pinctrl: qcom: spmi-mpp: hardcode IRQ counts Dmitry Baryshkov
2021-10-17 16:53 ` Bjorn Andersson [this message]
2021-10-08 1:25 ` [PATCH v3 16/25] pinctrl: qcom: spmi-mpp: add support for hierarchical IRQ chip Dmitry Baryshkov
2021-10-17 16:53 ` Bjorn Andersson
2021-10-08 1:25 ` [PATCH v3 17/25] dt-bindings: pinctrl: qcom,pmic-mpp: switch to #interrupt-cells Dmitry Baryshkov
2021-10-08 2:46 ` Rob Herring
2021-10-08 1:25 ` [PATCH v3 18/25] ARM: dts: qcom-apq8064: add interrupt controller properties Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 19/25] ARM: dts: qcom-mdm9615: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 20/25] ARM: dts: qcom-msm8660: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 21/25] ARM: dts: qcom-pm8841: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 22/25] ARM: dts: qcom-pm8941: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 23/25] ARM: dts: qcom-pma8084: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 24/25] arm64: dts: qcom: pm8916: " Dmitry Baryshkov
2021-10-08 1:25 ` [PATCH v3 25/25] arm64: dts: qcom: pm8994: " Dmitry Baryshkov
2021-10-12 23:59 ` Linus Walleij
2021-10-13 3:46 ` Re: Dmitry Baryshkov
2021-10-13 23:39 ` Re: Linus Walleij
2021-10-17 16:54 ` Re: Bjorn Andersson
2021-10-17 21:31 ` Re: Linus Walleij
2021-10-17 21:35 ` Re: Linus Walleij
2021-10-18 0:13 ` (subset) Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YWxVB/QxNmWwYfmW@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).