Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gpio-fixes-for-v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

- fix a regression in GPIO ACPI on HP ElitePad 1000 G2 where the
gpio_set_debounce_timeout() now returns a fatal error if the specific
debounce period is not supported by the driver instead of just
emitting a warning

- fix return values of irq_mask/unmask() callbacks in gpio-uniphier

- fix hwirq calculation in gpio-aspeed-sgpio

- fix two issues in gpio-rockchip: only make the extended debounce
support available for v2 and remove a redundant BIT() usage

* tag 'gpio-fixes-for-v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpio/rockchip: fix get_direction value handling
gpio/rockchip: extended debounce support is only available on v2
gpio: gpio-aspeed-sgpio: Fix wrong hwirq in irq handler.
gpio: uniphier: Fix void functions to remove return value
gpiolib: acpi: Make set-debounce-timeout failures non fatal

+9 -7
+1 -1
drivers/gpio/gpio-aspeed-sgpio.c
··· 395 395 reg = ioread32(bank_reg(data, bank, reg_irq_status)); 396 396 397 397 for_each_set_bit(p, &reg, 32) 398 - generic_handle_domain_irq(gc->irq.domain, i * 32 + p); 398 + generic_handle_domain_irq(gc->irq.domain, i * 32 + p * 2); 399 399 } 400 400 401 401 chained_irq_exit(ic, desc);
+2 -2
drivers/gpio/gpio-rockchip.c
··· 141 141 u32 data; 142 142 143 143 data = rockchip_gpio_readl_bit(bank, offset, bank->gpio_regs->port_ddr); 144 - if (data & BIT(offset)) 144 + if (data) 145 145 return GPIO_LINE_DIRECTION_OUT; 146 146 147 147 return GPIO_LINE_DIRECTION_IN; ··· 195 195 unsigned int cur_div_reg; 196 196 u64 div; 197 197 198 - if (!IS_ERR(bank->db_clk)) { 198 + if (bank->gpio_type == GPIO_TYPE_V2 && !IS_ERR(bank->db_clk)) { 199 199 div_debounce_support = true; 200 200 freq = clk_get_rate(bank->db_clk); 201 201 max_debounce = (GENMASK(23, 0) + 1) * 2 * 1000000 / freq;
+2 -2
drivers/gpio/gpio-uniphier.c
··· 184 184 185 185 uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, 0); 186 186 187 - return irq_chip_mask_parent(data); 187 + irq_chip_mask_parent(data); 188 188 } 189 189 190 190 static void uniphier_gpio_irq_unmask(struct irq_data *data) ··· 194 194 195 195 uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, mask); 196 196 197 - return irq_chip_unmask_parent(data); 197 + irq_chip_unmask_parent(data); 198 198 } 199 199 200 200 static int uniphier_gpio_irq_set_type(struct irq_data *data, unsigned int type)
+4 -2
drivers/gpio/gpiolib-acpi.c
··· 313 313 314 314 ret = gpio_set_debounce_timeout(desc, agpio->debounce_timeout); 315 315 if (ret) 316 - gpiochip_free_own_desc(desc); 316 + dev_warn(chip->parent, 317 + "Failed to set debounce-timeout for pin 0x%04X, err %d\n", 318 + pin, ret); 317 319 318 - return ret ? ERR_PTR(ret) : desc; 320 + return desc; 319 321 } 320 322 321 323 static bool acpi_gpio_in_ignore_list(const char *controller_in, int pin_in)