mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 05:27:17 +07:00
pinctrl: qcom: ssbi-gpio: hardcode IRQ counts
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,ssbi-gpio OF match since we don't know the number of pins. All of the existing upstream bindings already include the more-specific binding. This change was tested on an APQ8060 DragonBoard. Signed-off-by: Brian Masney <masneyb@onstation.org> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
e7dc6af82c
commit
86291029e9
@ -665,12 +665,11 @@ static int pm8xxx_pin_populate(struct pm8xxx_gpio *pctrl,
|
||||
}
|
||||
|
||||
static const struct of_device_id pm8xxx_gpio_of_match[] = {
|
||||
{ .compatible = "qcom,pm8018-gpio" },
|
||||
{ .compatible = "qcom,pm8038-gpio" },
|
||||
{ .compatible = "qcom,pm8058-gpio" },
|
||||
{ .compatible = "qcom,pm8917-gpio" },
|
||||
{ .compatible = "qcom,pm8921-gpio" },
|
||||
{ .compatible = "qcom,ssbi-gpio" },
|
||||
{ .compatible = "qcom,pm8018-gpio", .data = (void *) 6 },
|
||||
{ .compatible = "qcom,pm8038-gpio", .data = (void *) 12 },
|
||||
{ .compatible = "qcom,pm8058-gpio", .data = (void *) 44 },
|
||||
{ .compatible = "qcom,pm8917-gpio", .data = (void *) 38 },
|
||||
{ .compatible = "qcom,pm8921-gpio", .data = (void *) 44 },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, pm8xxx_gpio_of_match);
|
||||
@ -680,20 +679,14 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
|
||||
struct pm8xxx_pin_data *pin_data;
|
||||
struct pinctrl_pin_desc *pins;
|
||||
struct pm8xxx_gpio *pctrl;
|
||||
int ret;
|
||||
int i, npins;
|
||||
int ret, i;
|
||||
|
||||
pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL);
|
||||
if (!pctrl)
|
||||
return -ENOMEM;
|
||||
|
||||
pctrl->dev = &pdev->dev;
|
||||
npins = platform_irq_count(pdev);
|
||||
if (!npins)
|
||||
return -EINVAL;
|
||||
if (npins < 0)
|
||||
return npins;
|
||||
pctrl->npins = npins;
|
||||
pctrl->npins = (uintptr_t) device_get_match_data(&pdev->dev);
|
||||
|
||||
pctrl->regmap = dev_get_regmap(pdev->dev.parent, NULL);
|
||||
if (!pctrl->regmap) {
|
||||
|
Loading…
Reference in New Issue
Block a user