gpio fixes for v5.18-rc6
- fix the bounds check for the 'gpio-reserved-ranges' device property in gpiolib-of - drop the assignment of the pwm base number in gpio-mvebu (this was missed by the patch doing it globally for all pwm drivers) - fix the fwnode assignment (use own fwnode, not the parent's one) for the GPIO irqchip in gpio-visconti - update the irq_stat field before checking the trigger field in gpio-pca953x - update GPIO entry in MAINTAINERS -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmJ2eScACgkQEacuoBRx 13IH+BAAw/BO7UPhXEt3nopcOxkE5C/svpDfPDmVTm/Oh0TmdcIx0YMQAl86eLAY C1jXER45ZTJ9MfyL+TtRcad+wGMIeNE74Z6vOvBXX4nMzVRtoFMPhN9hXdHXReU/ Zw6u5VLmm35oVw3GR8WbZLS+hmpXjmzgQAIfFhf7MoshDg4TP7SnX+56SboGoLVz EAJ61OrxRkhOkNYX/1XV/YU23FGfKQfoQre7uL/YhLQlaScLe3Tn4l9EVATMIC0j 2PMZN8jsVmOuK4TQx1mYRP3XBARWx78ucwqplzG10xz3PHVhlzO42s6UKyDDm3B9 2dL1xmUSKK38oh1UIvWd+qTB5rBlc3DN0e2yP8v9FQIgBOb3SvaZOXpyXtnFal9G TyTfBplT1KYrW3q9++xDIacnaXwZVFOCqDJ3w73w1V9G9Nx4mIm4iW9ft70WDxhc mtXBsFYpZV+FiAEFaZdxXhmz8JSxbg1tLsAdjA1lwBWvD29cUdgwM2KWn3eQdQeN k7UCBL1xVxliHijVD699id+yONmv3ASQ9j4VeTzriL9YyiRyZTpwtepvvvlbchQd wS5ntAd1Kr/4PkSAe90XX/ZmpsADa/8wjMiYymggGu1okoEVaRNW4/cx1zESkOIo Zdo27nry+8VwFiQUWc55glzKuvpJTHIfiLB/Sm0nQ4U9qkxW7sA= =zA/m -----END PGP SIGNATURE----- Merge tag 'gpio-fixes-for-v5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix the bounds check for the 'gpio-reserved-ranges' device property in gpiolib-of - drop the assignment of the pwm base number in gpio-mvebu (this was missed by the patch doing it globally for all pwm drivers) - fix the fwnode assignment (use own fwnode, not the parent's one) for the GPIO irqchip in gpio-visconti - update the irq_stat field before checking the trigger field in gpio-pca953x - update GPIO entry in MAINTAINERS * tag 'gpio-fixes-for-v5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: pca953x: fix irq_stat not updated when irq is disabled (irq_mask not set) gpio: visconti: Fix fwnode of GPIO IRQ MAINTAINERS: update the GPIO git tree entry gpio: mvebu: drop pwm base assignment gpiolib: of: fix bounds check for 'gpio-reserved-ranges'
This commit is contained in:
Коммит
30c8e80f79
|
@ -8385,7 +8385,7 @@ M: Linus Walleij <linus.walleij@linaro.org>
|
|||
M: Bartosz Golaszewski <brgl@bgdev.pl>
|
||||
L: linux-gpio@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
|
||||
F: Documentation/ABI/obsolete/sysfs-gpio
|
||||
F: Documentation/ABI/testing/gpio-cdev
|
||||
F: Documentation/admin-guide/gpio/
|
||||
|
|
|
@ -871,13 +871,6 @@ static int mvebu_pwm_probe(struct platform_device *pdev,
|
|||
mvpwm->chip.dev = dev;
|
||||
mvpwm->chip.ops = &mvebu_pwm_ops;
|
||||
mvpwm->chip.npwm = mvchip->chip.ngpio;
|
||||
/*
|
||||
* There may already be some PWM allocated, so we can't force
|
||||
* mvpwm->chip.base to a fixed point like mvchip->chip.base.
|
||||
* So, we let pwmchip_add() do the numbering and take the next free
|
||||
* region.
|
||||
*/
|
||||
mvpwm->chip.base = -1;
|
||||
|
||||
spin_lock_init(&mvpwm->lock);
|
||||
|
||||
|
|
|
@ -762,11 +762,11 @@ static bool pca953x_irq_pending(struct pca953x_chip *chip, unsigned long *pendin
|
|||
bitmap_xor(cur_stat, new_stat, old_stat, gc->ngpio);
|
||||
bitmap_and(trigger, cur_stat, chip->irq_mask, gc->ngpio);
|
||||
|
||||
bitmap_copy(chip->irq_stat, new_stat, gc->ngpio);
|
||||
|
||||
if (bitmap_empty(trigger, gc->ngpio))
|
||||
return false;
|
||||
|
||||
bitmap_copy(chip->irq_stat, new_stat, gc->ngpio);
|
||||
|
||||
bitmap_and(cur_stat, chip->irq_trig_fall, old_stat, gc->ngpio);
|
||||
bitmap_and(old_stat, chip->irq_trig_raise, new_stat, gc->ngpio);
|
||||
bitmap_or(new_stat, old_stat, cur_stat, gc->ngpio);
|
||||
|
|
|
@ -130,7 +130,6 @@ static int visconti_gpio_probe(struct platform_device *pdev)
|
|||
struct gpio_irq_chip *girq;
|
||||
struct irq_domain *parent;
|
||||
struct device_node *irq_parent;
|
||||
struct fwnode_handle *fwnode;
|
||||
int ret;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
|
@ -150,14 +149,12 @@ static int visconti_gpio_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
parent = irq_find_host(irq_parent);
|
||||
of_node_put(irq_parent);
|
||||
if (!parent) {
|
||||
dev_err(dev, "No IRQ parent domain\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
fwnode = of_node_to_fwnode(irq_parent);
|
||||
of_node_put(irq_parent);
|
||||
|
||||
ret = bgpio_init(&priv->gpio_chip, dev, 4,
|
||||
priv->base + GPIO_IDATA,
|
||||
priv->base + GPIO_OSET,
|
||||
|
@ -180,7 +177,7 @@ static int visconti_gpio_probe(struct platform_device *pdev)
|
|||
|
||||
girq = &priv->gpio_chip.irq;
|
||||
girq->chip = irq_chip;
|
||||
girq->fwnode = fwnode;
|
||||
girq->fwnode = of_node_to_fwnode(dev->of_node);
|
||||
girq->parent_domain = parent;
|
||||
girq->child_to_parent_hwirq = visconti_gpio_child_to_parent_hwirq;
|
||||
girq->populate_parent_alloc_arg = visconti_gpio_populate_parent_fwspec;
|
||||
|
|
|
@ -910,7 +910,7 @@ static void of_gpiochip_init_valid_mask(struct gpio_chip *chip)
|
|||
i, &start);
|
||||
of_property_read_u32_index(np, "gpio-reserved-ranges",
|
||||
i + 1, &count);
|
||||
if (start >= chip->ngpio || start + count >= chip->ngpio)
|
||||
if (start >= chip->ngpio || start + count > chip->ngpio)
|
||||
continue;
|
||||
|
||||
bitmap_clear(chip->valid_mask, start, count);
|
||||
|
|
Загрузка…
Ссылка в новой задаче