diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2017-01-30 14:39:20 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-01-30 14:39:20 +0100 |
commit | 7f36f5d11cda050b118f76d774151427a18d15ef (patch) | |
tree | 9d4fa3b830785b767525a5e6a065fe4297cd8112 /drivers/pinctrl/pinctrl-amd.c | |
parent | pinctrl: samsung: Replace syscore ops with standard platform device pm_ops (diff) | |
parent | Linux 4.10-rc6 (diff) | |
download | linux-7f36f5d11cda050b118f76d774151427a18d15ef.tar.xz linux-7f36f5d11cda050b118f76d774151427a18d15ef.zip |
Merge tag 'v4.10-rc6' into devel
Linux 4.10-rc6
Resolved conflicts in:
drivers/pinctrl/pinctrl-amd.c
drivers/pinctrl/samsung/pinctrl-exynos.c
Diffstat (limited to 'drivers/pinctrl/pinctrl-amd.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-amd.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index 6120c6f7eeca..d69e357a7a98 100644 --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c @@ -400,26 +400,21 @@ static int amd_gpio_irq_set_type(struct irq_data *d, unsigned int type) { int ret = 0; u32 pin_reg; - unsigned long flags; - bool level_trig; - u32 active_level; + unsigned long flags, irq_flags; struct gpio_chip *gc = irq_data_get_irq_chip_data(d); struct amd_gpio *gpio_dev = gpiochip_get_data(gc); spin_lock_irqsave(&gpio_dev->lock, flags); pin_reg = readl(gpio_dev->base + (d->hwirq)*4); - /* - * When level_trig is set EDGE and active_level is set HIGH in BIOS - * default settings, ignore incoming settings from client and use - * BIOS settings to configure GPIO register. + /* Ignore the settings coming from the client and + * read the values from the ACPI tables + * while setting the trigger type */ - level_trig = !(pin_reg & (LEVEL_TRIGGER << LEVEL_TRIG_OFF)); - active_level = pin_reg & (ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); - if(level_trig && - ((active_level >> ACTIVE_LEVEL_OFF) == ACTIVE_HIGH)) - type = IRQ_TYPE_EDGE_FALLING; + irq_flags = irq_get_trigger_type(d->irq); + if (irq_flags != IRQ_TYPE_NONE) + type = irq_flags; switch (type & IRQ_TYPE_SENSE_MASK) { case IRQ_TYPE_EDGE_RISING: |