summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.co.uk>2018-02-21 12:42:20 +0100
committerSebastian Reichel <sre@kernel.org>2018-03-12 14:34:51 +0100
commit90ad4cc203c025788ccaf70dc1e57fbf43702c4d (patch)
tree117662269af443e751bc393fae05acb751a01da4 /drivers/power
parentf451655c722b6f8a15d152d7912ab8526a3fe8bd (diff)
downloadlinux-90ad4cc203c025788ccaf70dc1e57fbf43702c4d.tar.gz
linux-90ad4cc203c025788ccaf70dc1e57fbf43702c4d.tar.bz2
linux-90ad4cc203c025788ccaf70dc1e57fbf43702c4d.zip
power: supply: bq2415x: add DT referencing support
Add support for using bq2415x together with power_supply_am_i_supplied(). Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/bq2415x_charger.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/power/supply/bq2415x_charger.c b/drivers/power/supply/bq2415x_charger.c
index c4770a94cc8e..cbec70f3e73e 100644
--- a/drivers/power/supply/bq2415x_charger.c
+++ b/drivers/power/supply/bq2415x_charger.c
@@ -1037,7 +1037,10 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
int ret;
int chip;
char revstr[8];
- struct power_supply_config psy_cfg = { .drv_data = bq, };
+ struct power_supply_config psy_cfg = {
+ .drv_data = bq,
+ .of_node = bq->dev->of_node,
+ };
bq->charger_desc.name = bq->name;
bq->charger_desc.type = POWER_SUPPLY_TYPE_USB;