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

Commit 5c6e9bf2 authored by Daniel Mack's avatar Daniel Mack Committed by Anton Vorontsov
Browse files

ds2760_battery: export more features



Export POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW and POWER_SUPPLY_PROP_CAPACITY
features to the power supply core.

Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>
Acked-by: default avatarMatt Reimer <mreimer@vpop.net>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 2e83a5c5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -337,6 +337,12 @@ static int ds2760_battery_get_property(struct power_supply *psy,
	case POWER_SUPPLY_PROP_TEMP:
		val->intval = di->temp_C;
		break;
	case POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW:
		val->intval = di->life_sec;
		break;
	case POWER_SUPPLY_PROP_CAPACITY:
		val->intval = di->rem_capacity;
		break;
	default:
		return -EINVAL;
	}
@@ -353,6 +359,8 @@ static enum power_supply_property ds2760_battery_props[] = {
	POWER_SUPPLY_PROP_CHARGE_EMPTY,
	POWER_SUPPLY_PROP_CHARGE_NOW,
	POWER_SUPPLY_PROP_TEMP,
	POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW,
	POWER_SUPPLY_PROP_CAPACITY,
};

static int ds2760_battery_probe(struct platform_device *pdev)