[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170828165757.GE12195@dtor-ws>
Date: Mon, 28 Aug 2017 09:57:57 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Chen Zhong <chen.zhong@...iatek.com>
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Matthias Brugger <matthias.bgg@...il.com>,
Lee Jones <lee.jones@...aro.org>,
Eddie Huang <eddie.huang@...iatek.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
Andi Shyti <andi.shyti@...sung.com>,
Javier Martinez Canillas <javier@....samsung.com>,
Linus Walleij <linus.walleij@...aro.org>,
Jaechul Lee <jcsing.lee@...sung.com>,
linux-input@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-rtc@...r.kernel.org
Subject: Re: [PATCH v3 4/5] input: Add MediaTek PMIC keys support
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().
Thanks.
--
Dmitry
Powered by blists - more mailing lists