Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1225469

Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume

From Sudeep Holla <sudeep.holla@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume
Date 2015-09-15 19:50 +0200
Message-ID <q92wF-3pz-7@gated-at.bofh.it> (permalink)
References (4 earlier) <q6nnX-72-5@gated-at.bofh.it> <q6upt-1Fu-11@gated-at.bofh.it> <q7PLc-5mb-7@gated-at.bofh.it> <q8zXI-4Ay-11@gated-at.bofh.it> <q8ODo-g8-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 15/09/15 03:52, Dmitry Torokhov wrote:
> On Mon, Sep 14, 2015 at 4:16 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:

[...]

>>
>> This is wrong assumption in the driver. enable_irq_wake doesn't
>> implicitly enable the IRQ. So the disable_irq should be moved to else.
>> And the resume patch also needs to be fixed accordingly, otherwise you
>> may get unbalanced irq. But this should not be the reason for fixing the
>> pinctrl suspend/resume.
>>
>
> Elan driver does not want to enable servicing IRQs, it just wants to
> configure them as wakeup sources. Hence the current elan_suspend() is
> fine. When system wakes up and the device is resumed and the driver is
> ready to service interrupts it will enable IRQ again.
>

Fair enough. But I am struggling to understand how this fits into
existing IRQ infrastructure. Few controllers that don't have wakeup
source configuration facility can set IRQCHIP_SKIP_SET_WAKE and just
leave the interrupts enabled in suspend path to wake it up. So IMO,
the above strategy might not work on such controllers.

> IOW enable_irq_wake() and enable_irq() are 2 completely different
> calls and it is perfectly fine to disable IRQ and then ebale it as a
> wakeup source.

I agree that they are entirely different APIs, I am not sure if we can
support different interrupt controller with such strategy.

Since the irq/pm core handle disabling device IRQs and section "System
Wakeup Interrupts, enable_irq_wake() and disable_irq_wake()" in
Documentation/power/suspend-and-interrupts.txt gives me different
understanding, we can check with tglx on how to handle this.

Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend  resume Sudeep Holla <sudeep.holla@arm.com> - 2015-09-08 11:30 +0200
  Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend  resume Sudeep Holla <sudeep.holla@arm.com> - 2015-09-08 19:00 +0200
    Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume Chung-Yih Wang (王崇懿)   <cywang@google.com> - 2015-09-11 13:30 +0200
      Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend  resume Sudeep Holla <sudeep.holla@arm.com> - 2015-09-11 14:50 +0200
    Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and  suspend resume maoguang meng <maoguang.meng@mediatek.com> - 2015-09-12 12:00 +0200
      Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend  resume Sudeep Holla <sudeep.holla@arm.com> - 2015-09-14 13:20 +0200
        Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume Daniel Kurtz <djkurtz@chromium.org> - 2015-09-15 04:50 +0200
        Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-09-15 05:00 +0200
          Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend  resume Sudeep Holla <sudeep.holla@arm.com> - 2015-09-15 19:50 +0200

csiph-web