{
        struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
        struct intel_pinctrl *lg = gpiochip_get_data(gc);
-       u32 hwirq = irqd_to_hwirq(d);
+       irq_hw_number_t hwirq = irqd_to_hwirq(d);
        void __iomem *reg = lp_gpio_reg(&lg->chip, hwirq, LP_INT_STAT);
        unsigned long flags;
 
 {
        struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
        struct intel_pinctrl *lg = gpiochip_get_data(gc);
-       u32 hwirq = irqd_to_hwirq(d);
+       irq_hw_number_t hwirq = irqd_to_hwirq(d);
        void __iomem *reg = lp_gpio_reg(&lg->chip, hwirq, LP_INT_ENABLE);
        unsigned long flags;
 
+       gpiochip_enable_irq(gc, hwirq);
+
        raw_spin_lock_irqsave(&lg->lock, flags);
        iowrite32(ioread32(reg) | BIT(hwirq % 32), reg);
        raw_spin_unlock_irqrestore(&lg->lock, flags);
 {
        struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
        struct intel_pinctrl *lg = gpiochip_get_data(gc);
-       u32 hwirq = irqd_to_hwirq(d);
+       irq_hw_number_t hwirq = irqd_to_hwirq(d);
        void __iomem *reg = lp_gpio_reg(&lg->chip, hwirq, LP_INT_ENABLE);
        unsigned long flags;
 
        raw_spin_lock_irqsave(&lg->lock, flags);
        iowrite32(ioread32(reg) & ~BIT(hwirq % 32), reg);
        raw_spin_unlock_irqrestore(&lg->lock, flags);
+
+       gpiochip_disable_irq(gc, hwirq);
 }
 
 static int lp_irq_set_type(struct irq_data *d, unsigned int type)
 {
        struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
        struct intel_pinctrl *lg = gpiochip_get_data(gc);
-       u32 hwirq = irqd_to_hwirq(d);
-       void __iomem *reg = lp_gpio_reg(&lg->chip, hwirq, LP_CONFIG1);
+       irq_hw_number_t hwirq = irqd_to_hwirq(d);
        unsigned long flags;
+       void __iomem *reg;
        u32 value;
 
-       if (hwirq >= lg->chip.ngpio)
+       reg = lp_gpio_reg(&lg->chip, hwirq, LP_CONFIG1);
+       if (!reg)
                return -EINVAL;
 
        /* Fail if BIOS reserved pin for ACPI use */
        if (lp_gpio_acpi_use(lg, hwirq)) {
-               dev_err(lg->dev, "pin %u can't be used as IRQ\n", hwirq);
+               dev_err(lg->dev, "pin %lu can't be used as IRQ\n", hwirq);
                return -EBUSY;
        }
 
        return 0;
 }
 
-static struct irq_chip lp_irqchip = {
+static const struct irq_chip lp_irqchip = {
        .name = "LP-GPIO",
        .irq_ack = lp_irq_ack,
        .irq_mask = lp_irq_mask,
        .irq_enable = lp_irq_enable,
        .irq_disable = lp_irq_disable,
        .irq_set_type = lp_irq_set_type,
-       .flags = IRQCHIP_SKIP_SET_WAKE,
+       .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_IMMUTABLE,
+       GPIOCHIP_IRQ_RESOURCE_HELPERS,
 };
 
 static int lp_gpio_irq_init_hw(struct gpio_chip *chip)
                struct gpio_irq_chip *girq;
 
                girq = &gc->irq;
-               girq->chip = &lp_irqchip;
+               gpio_irq_chip_set_chip(girq, &lp_irqchip);
                girq->init_hw = lp_gpio_irq_init_hw;
                girq->parent_handler = lp_gpio_irq_handler;
                girq->num_parents = 1;