Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90ad4cc2 authored by Sebastian Reichel's avatar Sebastian Reichel
Browse files

power: supply: bq2415x: add DT referencing support



Add support for using bq2415x together with power_supply_am_i_supplied().

Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
parent f451655c
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1037,7 +1037,10 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
	int ret;
	int ret;
	int chip;
	int chip;
	char revstr[8];
	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.name = bq->name;
	bq->charger_desc.type = POWER_SUPPLY_TYPE_USB;
	bq->charger_desc.type = POWER_SUPPLY_TYPE_USB;