Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bq24190_charger: temporary wakeirq patch #5

Open
wants to merge 2 commits into
base: anvl-v4.7-lb-bq24190-5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion drivers/power/bq24190_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/

#include <linux/pm_wakeirq.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
Expand Down Expand Up @@ -1110,7 +1111,7 @@ static int bq24190_battery_set_property(struct power_supply *psy,

dev_dbg(bdi->dev, "prop: %d\n", psp);

pm_runtime_put_sync(bdi->dev);
pm_runtime_get_sync(bdi->dev);

switch (psp) {
case POWER_SUPPLY_PROP_ONLINE:
Expand Down Expand Up @@ -1384,6 +1385,7 @@ static int bq24190_probe(struct i2c_client *client,

pm_runtime_enable(dev);
pm_runtime_resume(dev);
dev_pm_enable_wake_irq(dev);

ret = bq24190_hw_init(bdi);
if (ret < 0) {
Expand Down
2 changes: 2 additions & 0 deletions include/linux/pm_wakeirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#ifndef _LINUX_PM_WAKEIRQ_H
#define _LINUX_PM_WAKEIRQ_H

struct device;

#ifdef CONFIG_PM

extern int dev_pm_set_wake_irq(struct device *dev, int irq);
Expand Down