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

Commit eb726842 authored by Ashay Jaiswal's avatar Ashay Jaiswal
Browse files

power_supply: add POWER_SUPPLY_PROP_USB_CONNECTOR_TYPE property



Add a power supply property to expose USB connector configuration
(TYPEC or MicroUSB).

Change-Id: Ie93b1facb3195d31d227eabc43e17e00c89ccd53
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent 5c1f0d88
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -319,6 +319,7 @@ static struct device_attribute power_supply_attrs[] = {
	POWER_SUPPLY_ATTR(pd_voltage_max),
	POWER_SUPPLY_ATTR(pd_voltage_min),
	POWER_SUPPLY_ATTR(sdp_current_max),
	POWER_SUPPLY_ATTR(connector_type),
	/* Local extensions of type int64_t */
	POWER_SUPPLY_ATTR(charge_counter_ext),
	/* Properties of type `const char *' */
+6 −0
Original line number Diff line number Diff line
@@ -112,6 +112,11 @@ enum {
	POWER_SUPPLY_PL_USBMID_USBMID,
};

enum {
	POWER_SUPPLY_CONNECTOR_TYPEC,
	POWER_SUPPLY_CONNECTOR_MICRO_USB,
};

enum power_supply_property {
	/* Properties of type `int' */
	POWER_SUPPLY_PROP_STATUS = 0,
@@ -257,6 +262,7 @@ enum power_supply_property {
	POWER_SUPPLY_PROP_PD_VOLTAGE_MAX,
	POWER_SUPPLY_PROP_PD_VOLTAGE_MIN,
	POWER_SUPPLY_PROP_SDP_CURRENT_MAX,
	POWER_SUPPLY_PROP_CONNECTOR_TYPE,
	/* Local extensions of type int64_t */
	POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT,
	/* Properties of type `const char *' */