mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 23:34:05 +08:00
gpio fixes for v5.15-rc3
- 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 -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmFMObIACgkQEacuoBRx 13L8VQ//Vnzk57zjqcqiVj1aBCqMGm/pFnuYFJ1lkh/ny3F7nORBCZgiaNeJa+k2 3FT2YTV/hrPlmwYzh65pmvx2FikoUxJNlQyh2JuQ06bqeGy5jKGoI1Dij/u5MyXy U60OyUcyYBXrCioHgb4ID571KnTu3l/uCd4CxKUaeABcz3EjhRE+Vu8oUIsmegA9 jj+oihbTivTqsPu2FgTXkF02425rKXD1/5PvB+q68kxTsoIb1VY9Wm8XGuDBSLH8 OYokxxwHNpUdTVACjp+58xhgbe4giyjH2VSs/Rw3/iIHf6ay/6hzqpMFaATiD/R0 e3818eBiyYzRp7VfPvgrdXT4R3R/vk6GEmJMP/E8WxSjrx1riDhDlmHbj+w7uHTy UhGMpd4QcKHrsbEwjmpX7kMHFqs1dW3/ulQWSpD98apUHX619u6SWF5gWDwUTRxq JwQ+zEww2XH2erzUVbN5VGCLD7+xHbqAyWCp+3ZccSDkeq333bks2UhwfMq7+9He v4VaJy7GMezEsOUFdJIHVDQh4QMNP5SZedMxBCJn0A+HWJmbkBR09BgX8ZYznJnC OtdEeDv94OdUXSSwoyCweH9HHDpV2aGzAXyXdoAOLPk7TsnNKzqFkIOezb2mgOHn EgNUpDJpbDduXvxsnfk3j9co50yaGJl2QFukvAYrsRqgMuTps5Q= =3LqR -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
7d42e98182
@ -395,7 +395,7 @@ static void aspeed_sgpio_irq_handler(struct irq_desc *desc)
|
||||
reg = ioread32(bank_reg(data, bank, reg_irq_status));
|
||||
|
||||
for_each_set_bit(p, ®, 32)
|
||||
generic_handle_domain_irq(gc->irq.domain, i * 32 + p);
|
||||
generic_handle_domain_irq(gc->irq.domain, i * 32 + p * 2);
|
||||
}
|
||||
|
||||
chained_irq_exit(ic, desc);
|
||||
|
@ -141,7 +141,7 @@ static int rockchip_gpio_get_direction(struct gpio_chip *chip,
|
||||
u32 data;
|
||||
|
||||
data = rockchip_gpio_readl_bit(bank, offset, bank->gpio_regs->port_ddr);
|
||||
if (data & BIT(offset))
|
||||
if (data)
|
||||
return GPIO_LINE_DIRECTION_OUT;
|
||||
|
||||
return GPIO_LINE_DIRECTION_IN;
|
||||
@ -195,7 +195,7 @@ static int rockchip_gpio_set_debounce(struct gpio_chip *gc,
|
||||
unsigned int cur_div_reg;
|
||||
u64 div;
|
||||
|
||||
if (!IS_ERR(bank->db_clk)) {
|
||||
if (bank->gpio_type == GPIO_TYPE_V2 && !IS_ERR(bank->db_clk)) {
|
||||
div_debounce_support = true;
|
||||
freq = clk_get_rate(bank->db_clk);
|
||||
max_debounce = (GENMASK(23, 0) + 1) * 2 * 1000000 / freq;
|
||||
|
@ -184,7 +184,7 @@ static void uniphier_gpio_irq_mask(struct irq_data *data)
|
||||
|
||||
uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, 0);
|
||||
|
||||
return irq_chip_mask_parent(data);
|
||||
irq_chip_mask_parent(data);
|
||||
}
|
||||
|
||||
static void uniphier_gpio_irq_unmask(struct irq_data *data)
|
||||
@ -194,7 +194,7 @@ static void uniphier_gpio_irq_unmask(struct irq_data *data)
|
||||
|
||||
uniphier_gpio_reg_update(priv, UNIPHIER_GPIO_IRQ_EN, mask, mask);
|
||||
|
||||
return irq_chip_unmask_parent(data);
|
||||
irq_chip_unmask_parent(data);
|
||||
}
|
||||
|
||||
static int uniphier_gpio_irq_set_type(struct irq_data *data, unsigned int type)
|
||||
|
@ -313,9 +313,11 @@ static struct gpio_desc *acpi_request_own_gpiod(struct gpio_chip *chip,
|
||||
|
||||
ret = gpio_set_debounce_timeout(desc, agpio->debounce_timeout);
|
||||
if (ret)
|
||||
gpiochip_free_own_desc(desc);
|
||||
dev_warn(chip->parent,
|
||||
"Failed to set debounce-timeout for pin 0x%04X, err %d\n",
|
||||
pin, ret);
|
||||
|
||||
return ret ? ERR_PTR(ret) : desc;
|
||||
return desc;
|
||||
}
|
||||
|
||||
static bool acpi_gpio_in_ignore_list(const char *controller_in, int pin_in)
|
||||
|
Loading…
Reference in New Issue
Block a user