Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1722115
| From | Chen Zhong <chen.zhong@mediatek.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 4/5] input: Add MediaTek PMIC keys support |
| Date | 2017-08-29 04:20 +0200 |
| Message-ID | <ujEid-58j-1@gated-at.bofh.it> (permalink) |
| References | <uigrD-xp-3@gated-at.bofh.it> <uigrD-xp-1@gated-at.bofh.it> <ujvyi-80q-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 2017-08-28 at 09:57 -0700, Dmitry Torokhov wrote:
> Hi Chen,
>
> On Fri, Aug 25, 2017 at 02:32:32PM +0800, Chen Zhong wrote:
> > +static int mtk_pmic_key_setup(struct mtk_pmic_keys *keys,
> > + struct pmic_keys_info *info)
> > +{
> > + int ret;
> > +
> > + info->keys = keys;
> > +
> > + ret = regmap_update_bits(keys->regmap, info->regs->intsel_reg,
> > + info->regs->intsel_mask,
> > + info->regs->intsel_mask);
> > + if (ret < 0)
> > + return ret;
> > +
> > + ret = devm_request_threaded_irq(keys->dev, info->irq, NULL,
> > + mtk_pmic_keys_irq_handler_thread,
> > + IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
> > + "mtk-pmic-keys", info);
> > + if (ret) {
> > + dev_err(keys->dev, "Failed to request IRQ: %d: %d\n",
> > + info->irq, ret);
> > + return ret;
> > + }
> > +
> > + if (info->wakeup)
> > + irq_set_irq_wake(info->irq, 1);
>
> Normally we do this in suspend() (and undo in resume()), and I believe
> the drover API is enable_irq_wake() and disable_irq_wake().
>
Hi Dmitry,
I'll add suspend/resume callback functions and do this with
enable_irq_wake() and disable_irq_wake().
Thank you.
> Thanks.
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v3 4/5] input: Add MediaTek PMIC keys support Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-08-28 19:00 +0200 Re: [PATCH v3 4/5] input: Add MediaTek PMIC keys support Chen Zhong <chen.zhong@mediatek.com> - 2017-08-29 04:20 +0200
csiph-web