@@ -139,7 +139,7 @@ static int gpio_mockup_name_lines(struct device *dev,
static int gpio_mockup_to_irq(struct gpio_chip *chip, unsigned int offset)
{
- return chip->irq_base + offset;
+ return chip->irq.first + offset;
}
/*
@@ -173,7 +173,7 @@ static int gpio_mockup_irqchip_setup(struct device *dev,
if (irq_base < 0)
return irq_base;
- gc->irq_base = irq_base;
+ gc->irq.first = irq_base;
gc->irq.chip = &gpio_mockup_irqchip;
for (i = 0; i < gc->ngpio; i++) {
@@ -217,7 +217,7 @@ static ssize_t gpio_mockup_event_write(struct file *file,
return -EINVAL;
gpiod_set_value_cansleep(desc, val);
- priv->chip->irq_ctx.irq = gc->irq_base + priv->offset;
+ priv->chip->irq_ctx.irq = gc->irq.first + priv->offset;
irq_work_queue(&priv->chip->irq_ctx.work);
return size;
@@ -1955,7 +1955,7 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip,
* Store the base into the gpiochip to be used when
* unmapping the irqs.
*/
- gpiochip->irq_base = irq_base;
+ gpiochip->irq.first = irq_base;
irq_base_set = true;
}
}
@@ -24,7 +24,7 @@ struct module;
* struct gpio_irq_chip - GPIO interrupt controller
* @chip: GPIO IRQ chip implementation, provided by GPIO driver
* @first: if not dynamically assigned, the base (first) IRQ to allocate GPIO
- * chip IRQs from
+ * chip IRQs from (deprecated)
* @domain: interrupt translation domain; responsible for mapping
* between GPIO hwirq number and linux irq number
* @domain_ops: table of interrupt domain operations for this IRQ chip
@@ -125,7 +125,6 @@ struct gpio_irq_chip {
* safely.
* @bgpio_dir: shadowed direction register for generic GPIO to clear/set
* direction safely.
- * @irq_base: first linux IRQ number assigned to GPIO IRQ chip (deprecated)
*
* A gpio_chip can help platforms abstract various sources of GPIOs so
* they can all be accessed through a common programing interface.
@@ -192,8 +191,6 @@ struct gpio_chip {
* With CONFIG_GPIOLIB_IRQCHIP we get an irqchip inside the gpiolib
* to handle IRQs for most practical cases.
*/
- unsigned int irq_base;
-
struct gpio_irq_chip irq;
#endif