lkml.org 
[lkml]   [2019]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [PATCH v3 6/9] drivers: pinctrl: msm: setup GPIO irqchip hierarchy
    Date
    Quoting Lina Iyer (2019-02-22 14:18:47)
    > diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
    > index ee8119879c4c..83053b45982e 100644
    > --- a/drivers/pinctrl/qcom/pinctrl-msm.c
    > +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
    > @@ -890,6 +918,9 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
    >
    > raw_spin_unlock_irqrestore(&pctrl->lock, flags);

    Can we remove the above hunk of code in this function? From what I can
    tell we're trying to set wake on the GIC SPI line and that won't ever
    work because it doesn't support wakeup support. Furthermore, I get a
    lockdep splat when I try to set wake on a GPIO irq with this patchset
    applied. It's probably a false positive though because it's warning
    about an AA deadlock with the irq descriptor lock, which is aliased
    between the two controllers.

    >
    > + if (d->parent_data)
    > + irq_chip_set_wake_parent(d, on);
    > +
    > return 0;
    > }
    >

    Here's a patch on top. If you need my signed-off-by please feel free to
    add it:

    Signed-off-by: Stephen Boyd <swboyd@chromium.org>

    -----8<-------
    diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
    index cdbc06ec5e96..4e81dad80a4d 100644
    --- a/drivers/pinctrl/qcom/pinctrl-msm.c
    +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
    @@ -852,20 +852,10 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)

    static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
    {
    - struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
    - struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
    - unsigned long flags;
    -
    - raw_spin_lock_irqsave(&pctrl->lock, flags);
    -
    - irq_set_irq_wake(pctrl->irq, on);
    -
    - raw_spin_unlock_irqrestore(&pctrl->lock, flags);
    -
    if (d->parent_data)
    - irq_chip_set_wake_parent(d, on);
    + return irq_chip_set_wake_parent(d, on);

    - return 0;
    + return -ENOSYS;
    }

    static int msm_gpio_irq_reqres(struct irq_data *d)
    \
     
     \ /
      Last update: 2019-03-08 02:00    [W:4.406 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site