mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
gpio: stmpe: pass DT node to irqdomain
The irq domain was implemented but the device tree node was not transmitted to irq_domain_add_simple(). Cc: stable@vger.kernel.org Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
2ab3a749eb
commit
9afd9b7090
1 changed files with 11 additions and 4 deletions
|
@ -307,11 +307,15 @@ static const struct irq_domain_ops stmpe_gpio_irq_simple_ops = {
|
||||||
.xlate = irq_domain_xlate_twocell,
|
.xlate = irq_domain_xlate_twocell,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio)
|
static int stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio,
|
||||||
|
struct device_node *np)
|
||||||
{
|
{
|
||||||
int base = stmpe_gpio->irq_base;
|
int base = 0;
|
||||||
|
|
||||||
stmpe_gpio->domain = irq_domain_add_simple(NULL,
|
if (!np)
|
||||||
|
base = stmpe_gpio->irq_base;
|
||||||
|
|
||||||
|
stmpe_gpio->domain = irq_domain_add_simple(np,
|
||||||
stmpe_gpio->chip.ngpio, base,
|
stmpe_gpio->chip.ngpio, base,
|
||||||
&stmpe_gpio_irq_simple_ops, stmpe_gpio);
|
&stmpe_gpio_irq_simple_ops, stmpe_gpio);
|
||||||
if (!stmpe_gpio->domain) {
|
if (!stmpe_gpio->domain) {
|
||||||
|
@ -346,6 +350,9 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
|
||||||
stmpe_gpio->chip = template_chip;
|
stmpe_gpio->chip = template_chip;
|
||||||
stmpe_gpio->chip.ngpio = stmpe->num_gpios;
|
stmpe_gpio->chip.ngpio = stmpe->num_gpios;
|
||||||
stmpe_gpio->chip.dev = &pdev->dev;
|
stmpe_gpio->chip.dev = &pdev->dev;
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
stmpe_gpio->chip.of_node = np;
|
||||||
|
#endif
|
||||||
stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1;
|
stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1;
|
||||||
|
|
||||||
if (pdata)
|
if (pdata)
|
||||||
|
@ -366,7 +373,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
|
||||||
if (irq >= 0) {
|
if (irq >= 0) {
|
||||||
ret = stmpe_gpio_irq_init(stmpe_gpio);
|
ret = stmpe_gpio_irq_init(stmpe_gpio, np);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_disable;
|
goto out_disable;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue