提交 26740dbb 编写于 作者: J Jonghwa Lee 提交者: Anton Vorontsov

max17042_battery: Add IRQF_ONESHOT flag to use default irq handler

This patch adds IRQF_ONESHOT flag to max17042's irq since it uses primary
default handler. Without this flag, requesting irq will be denied with
returning error.
Signed-off-by: NJonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
上级 4ea81266
...@@ -741,9 +741,9 @@ static int max17042_probe(struct i2c_client *client, ...@@ -741,9 +741,9 @@ static int max17042_probe(struct i2c_client *client,
if (client->irq) { if (client->irq) {
ret = request_threaded_irq(client->irq, NULL, ret = request_threaded_irq(client->irq, NULL,
max17042_thread_handler, max17042_thread_handler,
IRQF_TRIGGER_FALLING, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
chip->battery.name, chip); chip->battery.name, chip);
if (!ret) { if (!ret) {
regmap_read(chip->regmap, MAX17042_CONFIG, &val); regmap_read(chip->regmap, MAX17042_CONFIG, &val);
val |= CONFIG_ALRT_BIT_ENBL; val |= CONFIG_ALRT_BIT_ENBL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册