Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1212338 > unrolled thread
| Started by | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| First post | 2015-08-24 18:30 +0200 |
| Last post | 2015-09-06 12:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume Sudeep Holla <sudeep.holla@arm.com> - 2015-08-24 18:30 +0200
Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume Daniel Kurtz <djkurtz@chromium.org> - 2015-09-02 08:10 +0200
Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume maoguang meng <maoguang.meng@mediatek.com> - 2015-09-06 12:50 +0200
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-08-24 18:30 +0200 |
| Subject | Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume |
| Message-ID | <q12Nd-4yM-23@gated-at.bofh.it> |
On 14/08/15 09:38, maoguang.meng@mediatek.com wrote:
> From: Maoguang Meng <maoguang.meng@mediatek.com>
>
> This patch implement irq_set_wake to get who is wakeup source and
> setup on suspend resume.
>
> Signed-off-by: Maoguang Meng <maoguang.meng@mediatek.com>
>
> ---
> changes since v3:
> -add a comment in mtk_eint_chip_read_mask.
> -delete ALIGN when allocate eint_offsets.ports.
> -fix unrelated change.
>
> changes since v2:
> -modify irq_wake to handle irq wakeup source.
> -allocate two buffers separately.
> -fix some codestyle.
>
> Changes since v1:
> -implement irq_wake handler.
> ---
>
> drivers/pinctrl/mediatek/pinctrl-mt8173.c | 1 +
> drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 91 ++++++++++++++++++++++++++-
> drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 4 ++
> 3 files changed, 95 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8173.c b/drivers/pinctrl/mediatek/pinctrl-mt8173.c
> index d0c811d..ad27184 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mt8173.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mt8173.c
> @@ -385,6 +385,7 @@ static struct platform_driver mtk_pinctrl_driver = {
> .driver = {
> .name = "mediatek-mt8173-pinctrl",
> .of_match_table = mt8173_pctrl_match,
> + .pm = &mtk_eint_pm_ops,
> },
> };
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> index ad1ea16..fe34ce9 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> @@ -33,6 +33,7 @@
> #include <linux/mfd/syscon.h>
> #include <linux/delay.h>
> #include <linux/interrupt.h>
> +#include <linux/pm.h>
> #include <dt-bindings/pinctrl/mt65xx.h>
>
> #include "../core.h"
> @@ -1062,6 +1063,77 @@ static int mtk_eint_set_type(struct irq_data *d,
> return 0;
> }
>
> +static int mtk_eint_irq_set_wake(struct irq_data *d, unsigned int on)
> +{
> + struct mtk_pinctrl *pctl = irq_data_get_irq_chip_data(d);
> + int shift = d->hwirq & 0x1f;
> + int reg = d->hwirq >> 5;
> +
> + if (on)
> + pctl->wake_mask[reg] |= BIT(shift);
> + else
> + pctl->wake_mask[reg] &= ~BIT(shift);
> +
> + return 0;
> +}
Does this pinmux controller:
1. Support wake-up configuration ? If not, you need to use
IRQCHIP_SKIP_SET_WAKE. I don't see any value in writing the
mask_{set,clear} if the same registers are used for {en,dis}able
2. Is in always on domain ? If not, you need save/restore only to
resume back the functionality. Generally we can set
IRQCHIP_MASK_ON_SUSPEND to ensure non-wake-up interrupts are
disabled during suspend and re-enabled in resume path. You just
save/restore raw values without tracking the wake-up source.
Also I see that no care is taken to set the port irq as wake enable
source. It may work with current mainline, but won't with -next. Please
ensure the port irq to the parent interrupt controller remains
enabled(i.e set as wake).
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/
[toc] | [next] | [standalone]
| From | Daniel Kurtz <djkurtz@chromium.org> |
|---|---|
| Date | 2015-09-02 08:10 +0200 |
| Subject | Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume |
| Message-ID | <q49p8-501-11@gated-at.bofh.it> |
| In reply to | #1212338 |
Hi maoguang,
On Tue, Aug 25, 2015 at 12:27 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
>
> On 14/08/15 09:38, maoguang.meng@mediatek.com wrote:
>>
>> From: Maoguang Meng <maoguang.meng@mediatek.com>
>>
>> This patch implement irq_set_wake to get who is wakeup source and
>> setup on suspend resume.
>>
>> Signed-off-by: Maoguang Meng <maoguang.meng@mediatek.com>
>>
[snip]
Can you please respond to Sudeep's questions:
> Does this pinmux controller:
>
> 1. Support wake-up configuration ? If not, you need to use
> IRQCHIP_SKIP_SET_WAKE. I don't see any value in writing the
> mask_{set,clear} if the same registers are used for {en,dis}able
>
> 2. Is in always on domain ? If not, you need save/restore only to
> resume back the functionality. Generally we can set
> IRQCHIP_MASK_ON_SUSPEND to ensure non-wake-up interrupts are
> disabled during suspend and re-enabled in resume path. You just
> save/restore raw values without tracking the wake-up source.
>
> Also I see that no care is taken to set the port irq as wake enable
> source. It may work with current mainline, but won't with -next. Please
> ensure the port irq to the parent interrupt controller remains
> enabled(i.e set as wake).
>
> 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/
[toc] | [prev] | [next] | [standalone]
| From | maoguang meng <maoguang.meng@mediatek.com> |
|---|---|
| Date | 2015-09-06 12:50 +0200 |
| Subject | Re: [PATCH v4] pinctrl: mediatek: Implement wake handler and suspend resume |
| Message-ID | <q5FGh-4Nj-1@gated-at.bofh.it> |
| In reply to | #1217333 |
On Wed, 2015-09-02 at 14:02 +0800, Daniel Kurtz wrote:
> Hi maoguang,
>
> On Tue, Aug 25, 2015 at 12:27 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> >
> > On 14/08/15 09:38, maoguang.meng@mediatek.com wrote:
> >>
> >> From: Maoguang Meng <maoguang.meng@mediatek.com>
> >>
> >> This patch implement irq_set_wake to get who is wakeup source and
> >> setup on suspend resume.
> >>
> >> Signed-off-by: Maoguang Meng <maoguang.meng@mediatek.com>
> >>
> [snip]
>
> Can you please respond to Sudeep's questions:
>
> > Does this pinmux controller:
> >
> > 1. Support wake-up configuration ? If not, you need to use
> > IRQCHIP_SKIP_SET_WAKE. I don't see any value in writing the
> > mask_{set,clear} if the same registers are used for {en,dis}able
YES.
we can call enable_irq_wake(irq) to config this irq as a wake-up
source.
> >
> > 2. Is in always on domain ? If not, you need save/restore only to
> > resume back the functionality. Generally we can set
> > IRQCHIP_MASK_ON_SUSPEND to ensure non-wake-up interrupts are
> > disabled during suspend and re-enabled in resume path. You just
> > save/restore raw values without tracking the wake-up source.
YES.
> >
> > Also I see that no care is taken to set the port irq as wake enable
> > source. It may work with current mainline, but won't with -next. Please
> > ensure the port irq to the parent interrupt controller remains
> > enabled(i.e set as wake).
As you know, we do not care the port irq as wake enbale source,
when enter suspend we think no matter what the port irq is
enabled/disabled which are not affected as a wake-up source,
Because eint has a line to receive SPM.
For example,after suspend,press power key(use eint5) will generate an
electrical signal which is send to spm by eint.
and then spm wake cpu.
> >
> > Regards,
> > Sudeep
Regards,
Maoguang
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web