gpio fixes for v6.2
- fix a potential Kconfig issue with gpio-mlxbf2 not selecting GPIOLIB_IRQCHIP - another immutable irqchip conversion, this time for gpio-vf610 - fix a wakeup issue on Clevo NH5xAx -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmPuP9UACgkQEacuoBRx 13KxjA//bOCr1+4dzgAv5aiJ5Ftw7DN6LeDoDSiyxIgjM5xo3hm47QoBy5XChorq 9+R1K2G0cjKhEWe/fp9FHq3rFuEXDmTDy5OK6+9rNYWeew9sJXmoZtC0P0D/y5hy cw3Hyxi+Nv8osqIg3ypBLmn2oD5rgWmK7GfiF4eRuW02hqANI1iVeTDTDMgPIaG/ +TTLDDNwscM/HfpPqOcSyYSOe/9JVhnEwyWgsoqeTjoBXna2S5X6fU2Y4O7yaBQ9 YP65lwvjF49haCvAsbc5IfMbVa0Wk+2aQuoHhG34BuEBKTRyFjQydZNNsOJCWg2Z B4pPcXn6Q5Y2bC1wSVs29ZnVf/itZEovBqoo1xmjc3XEFCuPaRW00rDyZVlCboWf JkGix4wo1ifawqsmFUacsCJc+OdqkcDeFrANh4tXPk2geb6qhqOVhzwnSvDpbYDH w9lwFvm5Zs0i3fxwwfbMdiFJfpRNrrEcxVtR3a9NZ/w68tIdfe5JY8tBdF7iYDZN c5EC8BpfRgq3LWoW1bdWL4UmQnAnf3oz4fnD2hl8OOFBuCjbGrnswr05LIEwWVZD eHzby8r3S/3bRY3TqL89pkNCCQ2J5B3U2yIh7nh2zDX+8GqjqhsQ2MSI7CiZmSa1 I5ygurITiM81DhKaCx4bYxLZoXfIJzt/VCZYR+m9kJ8skPcnx4k= =oon2 -----END PGP SIGNATURE----- Merge tag 'gpio-fixes-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix a potential Kconfig issue with gpio-mlxbf2 not selecting GPIOLIB_IRQCHIP - another immutable irqchip conversion, this time for gpio-vf610 - fix a wakeup issue on Clevo NH5xAx * tag 'gpio-fixes-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: mlxbf2: select GPIOLIB_IRQCHIP gpiolib: acpi: Add a ignore wakeup quirk for Clevo NH5xAx gpio: vf610: make irq_chip immutable gpiolib: acpi: remove redundant declaration
This commit is contained in:
commit
18902059e0
|
@ -1531,6 +1531,7 @@ config GPIO_MLXBF2
|
|||
tristate "Mellanox BlueField 2 SoC GPIO"
|
||||
depends on (MELLANOX_PLATFORM && ARM64 && ACPI) || (64BIT && COMPILE_TEST)
|
||||
select GPIO_GENERIC
|
||||
select GPIOLIB_IRQCHIP
|
||||
help
|
||||
Say Y here if you want GPIO support on Mellanox BlueField 2 SoC.
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ struct fsl_gpio_soc_data {
|
|||
|
||||
struct vf610_gpio_port {
|
||||
struct gpio_chip gc;
|
||||
struct irq_chip ic;
|
||||
void __iomem *base;
|
||||
void __iomem *gpio_base;
|
||||
const struct fsl_gpio_soc_data *sdata;
|
||||
|
@ -207,20 +206,24 @@ static int vf610_gpio_irq_set_type(struct irq_data *d, u32 type)
|
|||
|
||||
static void vf610_gpio_irq_mask(struct irq_data *d)
|
||||
{
|
||||
struct vf610_gpio_port *port =
|
||||
gpiochip_get_data(irq_data_get_irq_chip_data(d));
|
||||
void __iomem *pcr_base = port->base + PORT_PCR(d->hwirq);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct vf610_gpio_port *port = gpiochip_get_data(gc);
|
||||
irq_hw_number_t gpio_num = irqd_to_hwirq(d);
|
||||
void __iomem *pcr_base = port->base + PORT_PCR(gpio_num);
|
||||
|
||||
vf610_gpio_writel(0, pcr_base);
|
||||
gpiochip_disable_irq(gc, gpio_num);
|
||||
}
|
||||
|
||||
static void vf610_gpio_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
struct vf610_gpio_port *port =
|
||||
gpiochip_get_data(irq_data_get_irq_chip_data(d));
|
||||
void __iomem *pcr_base = port->base + PORT_PCR(d->hwirq);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct vf610_gpio_port *port = gpiochip_get_data(gc);
|
||||
irq_hw_number_t gpio_num = irqd_to_hwirq(d);
|
||||
void __iomem *pcr_base = port->base + PORT_PCR(gpio_num);
|
||||
|
||||
vf610_gpio_writel(port->irqc[d->hwirq] << PORT_PCR_IRQC_OFFSET,
|
||||
gpiochip_enable_irq(gc, gpio_num);
|
||||
vf610_gpio_writel(port->irqc[gpio_num] << PORT_PCR_IRQC_OFFSET,
|
||||
pcr_base);
|
||||
}
|
||||
|
||||
|
@ -237,6 +240,17 @@ static int vf610_gpio_irq_set_wake(struct irq_data *d, u32 enable)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct irq_chip vf610_irqchip = {
|
||||
.name = "gpio-vf610",
|
||||
.irq_ack = vf610_gpio_irq_ack,
|
||||
.irq_mask = vf610_gpio_irq_mask,
|
||||
.irq_unmask = vf610_gpio_irq_unmask,
|
||||
.irq_set_type = vf610_gpio_irq_set_type,
|
||||
.irq_set_wake = vf610_gpio_irq_set_wake,
|
||||
.flags = IRQCHIP_IMMUTABLE,
|
||||
GPIOCHIP_IRQ_RESOURCE_HELPERS,
|
||||
};
|
||||
|
||||
static void vf610_gpio_disable_clk(void *data)
|
||||
{
|
||||
clk_disable_unprepare(data);
|
||||
|
@ -249,7 +263,6 @@ static int vf610_gpio_probe(struct platform_device *pdev)
|
|||
struct vf610_gpio_port *port;
|
||||
struct gpio_chip *gc;
|
||||
struct gpio_irq_chip *girq;
|
||||
struct irq_chip *ic;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
|
@ -315,14 +328,6 @@ static int vf610_gpio_probe(struct platform_device *pdev)
|
|||
gc->direction_output = vf610_gpio_direction_output;
|
||||
gc->set = vf610_gpio_set;
|
||||
|
||||
ic = &port->ic;
|
||||
ic->name = "gpio-vf610";
|
||||
ic->irq_ack = vf610_gpio_irq_ack;
|
||||
ic->irq_mask = vf610_gpio_irq_mask;
|
||||
ic->irq_unmask = vf610_gpio_irq_unmask;
|
||||
ic->irq_set_type = vf610_gpio_irq_set_type;
|
||||
ic->irq_set_wake = vf610_gpio_irq_set_wake;
|
||||
|
||||
/* Mask all GPIO interrupts */
|
||||
for (i = 0; i < gc->ngpio; i++)
|
||||
vf610_gpio_writel(0, port->base + PORT_PCR(i));
|
||||
|
@ -331,7 +336,7 @@ static int vf610_gpio_probe(struct platform_device *pdev)
|
|||
vf610_gpio_writel(~0, port->base + PORT_ISFR);
|
||||
|
||||
girq = &gc->irq;
|
||||
girq->chip = ic;
|
||||
gpio_irq_chip_set_chip(girq, &vf610_irqchip);
|
||||
girq->parent_handler = vf610_gpio_irq_handler;
|
||||
girq->num_parents = 1;
|
||||
girq->parents = devm_kcalloc(&pdev->dev, 1,
|
||||
|
|
|
@ -1637,6 +1637,18 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
|
|||
.ignore_wake = "ELAN0415:00@9",
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Spurious wakeups from TP_ATTN# pin
|
||||
* Found in BIOS 1.7.7
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
|
||||
},
|
||||
.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
|
||||
.ignore_wake = "SYNA1202:00@16",
|
||||
},
|
||||
},
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
#include <linux/gpio/consumer.h>
|
||||
|
||||
struct acpi_device;
|
||||
struct device;
|
||||
struct fwnode_handle;
|
||||
|
||||
|
|
Loading…
Reference in New Issue