Commit d5a7641b authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak Committed by Martin Kepplinger
Browse files

usb: typec: tipd: Export PRESENT property


Signed-off-by: Sebastian Krzyszkowiak's avatarSebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
parent 3e747399
......@@ -119,6 +119,7 @@ struct tps6598x {
static enum power_supply_property tps6598x_psy_props[] = {
POWER_SUPPLY_PROP_USB_TYPE,
POWER_SUPPLY_PROP_ONLINE,
POWER_SUPPLY_PROP_PRESENT,
POWER_SUPPLY_PROP_CURRENT_MAX,
POWER_SUPPLY_PROP_VOLTAGE_MAX,
};
......@@ -798,6 +799,9 @@ static int tps6598x_psy_get_prop(struct power_supply *psy,
case POWER_SUPPLY_PROP_ONLINE:
ret = tps6598x_psy_get_online(tps, val);
break;
case POWER_SUPPLY_PROP_PRESENT:
val->intval = !!tps->partner;
break;
case POWER_SUPPLY_PROP_CURRENT_MAX:
ret = tps6598x_psy_get_max_current(tps, val);
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment