Commit 9bd73ce0 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

pinctrl: qcom: Unify accessing to device fwnode

The device fwnode can be get via dev_fwnode() getter.
Use it where it makes sense.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230113220703.45686-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b8f9301c
...@@ -1350,7 +1350,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl) ...@@ -1350,7 +1350,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
girq = &chip->irq; girq = &chip->irq;
gpio_irq_chip_set_chip(girq, &msm_gpio_irq_chip); gpio_irq_chip_set_chip(girq, &msm_gpio_irq_chip);
girq->parent_handler = msm_gpio_irq_handler; girq->parent_handler = msm_gpio_irq_handler;
girq->fwnode = pctrl->dev->fwnode; girq->fwnode = dev_fwnode(pctrl->dev);
girq->num_parents = 1; girq->num_parents = 1;
girq->parents = devm_kcalloc(pctrl->dev, 1, sizeof(*girq->parents), girq->parents = devm_kcalloc(pctrl->dev, 1, sizeof(*girq->parents),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -1146,7 +1146,7 @@ static int pmic_gpio_probe(struct platform_device *pdev) ...@@ -1146,7 +1146,7 @@ static int pmic_gpio_probe(struct platform_device *pdev)
gpio_irq_chip_set_chip(girq, &spmi_gpio_irq_chip); gpio_irq_chip_set_chip(girq, &spmi_gpio_irq_chip);
girq->default_type = IRQ_TYPE_NONE; girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq; girq->handler = handle_level_irq;
girq->fwnode = of_node_to_fwnode(state->dev->of_node); girq->fwnode = dev_fwnode(state->dev);
girq->parent_domain = parent_domain; girq->parent_domain = parent_domain;
girq->child_to_parent_hwirq = pmic_gpio_child_to_parent_hwirq; girq->child_to_parent_hwirq = pmic_gpio_child_to_parent_hwirq;
girq->populate_parent_alloc_arg = pmic_gpio_populate_parent_fwspec; girq->populate_parent_alloc_arg = pmic_gpio_populate_parent_fwspec;
......
...@@ -927,7 +927,7 @@ static int pmic_mpp_probe(struct platform_device *pdev) ...@@ -927,7 +927,7 @@ static int pmic_mpp_probe(struct platform_device *pdev)
girq->chip = &state->irq; girq->chip = &state->irq;
girq->default_type = IRQ_TYPE_NONE; girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq; girq->handler = handle_level_irq;
girq->fwnode = of_node_to_fwnode(state->dev->of_node); girq->fwnode = dev_fwnode(state->dev);
girq->parent_domain = parent_domain; girq->parent_domain = parent_domain;
girq->child_to_parent_hwirq = pmic_mpp_child_to_parent_hwirq; girq->child_to_parent_hwirq = pmic_mpp_child_to_parent_hwirq;
girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_fourcell; girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_fourcell;
......
...@@ -791,7 +791,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev) ...@@ -791,7 +791,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
girq->chip = &pm8xxx_irq_chip; girq->chip = &pm8xxx_irq_chip;
girq->default_type = IRQ_TYPE_NONE; girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq; girq->handler = handle_level_irq;
girq->fwnode = of_node_to_fwnode(pctrl->dev->of_node); girq->fwnode = dev_fwnode(pctrl->dev);
girq->parent_domain = parent_domain; girq->parent_domain = parent_domain;
girq->child_to_parent_hwirq = pm8xxx_child_to_parent_hwirq; girq->child_to_parent_hwirq = pm8xxx_child_to_parent_hwirq;
girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_twocell; girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_twocell;
......
...@@ -881,7 +881,7 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev) ...@@ -881,7 +881,7 @@ static int pm8xxx_mpp_probe(struct platform_device *pdev)
girq->chip = &pctrl->irq; girq->chip = &pctrl->irq;
girq->default_type = IRQ_TYPE_NONE; girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq; girq->handler = handle_level_irq;
girq->fwnode = of_node_to_fwnode(pctrl->dev->of_node); girq->fwnode = dev_fwnode(pctrl->dev);
girq->parent_domain = parent_domain; girq->parent_domain = parent_domain;
if (of_device_is_compatible(pdev->dev.of_node, "qcom,pm8821-mpp")) if (of_device_is_compatible(pdev->dev.of_node, "qcom,pm8821-mpp"))
girq->child_to_parent_hwirq = pm8821_mpp_child_to_parent_hwirq; girq->child_to_parent_hwirq = pm8821_mpp_child_to_parent_hwirq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment