Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
linux-next
Commits
d5a7641b
Commit
d5a7641b
authored
Sep 12, 2021
by
Sebastian Krzyszkowiak
Committed by
Martin Kepplinger
Sep 14, 2021
Browse files
usb: typec: tipd: Export PRESENT property
Signed-off-by:
Sebastian Krzyszkowiak
<
sebastian.krzyszkowiak@puri.sm
>
parent
3e747399
Changes
1
Hide whitespace changes
Inline
Side-by-side
drivers/usb/typec/tipd/core.c
View file @
d5a7641b
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment