Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 224a1f90 authored by Mark Brown's avatar Mark Brown Committed by Linus Walleij
Browse files

gpiolib: wm8994: Use irq_domain mappings for gpios



This has no practical impact at present since we don't support device tree
so any user must have set an irq_base but this will in future allow a
transition to device tree with minimal invasiveness.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f942a7de
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@
#include <linux/mfd/core.h>
#include <linux/mfd/core.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/seq_file.h>
#include <linux/seq_file.h>
#include <linux/regmap.h>


#include <linux/mfd/wm8994/core.h>
#include <linux/mfd/wm8994/core.h>
#include <linux/mfd/wm8994/pdata.h>
#include <linux/mfd/wm8994/pdata.h>
@@ -109,10 +110,7 @@ static int wm8994_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
	struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
	struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip);
	struct wm8994 *wm8994 = wm8994_gpio->wm8994;
	struct wm8994 *wm8994 = wm8994_gpio->wm8994;


	if (!wm8994->irq_base)
	return regmap_irq_get_virq(wm8994->irq_data, offset);
		return -EINVAL;

	return wm8994->irq_base + offset;
}
}