]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: typec: ucsi: psy: Add support for the charge type property
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 19 Jun 2024 14:08:06 +0000 (17:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2024 17:31:31 +0000 (19:31 +0200)
commit2e031f50651df6d4d71704e89688694ea68313e5
treeffa72a20017e6b951b0321eb2186ed99f91a4419
parent3560b37525d3c9059c62da7f4d74daa2d5338626
usb: typec: ucsi: psy: Add support for the charge type property

Adding support for the charge type Linux power supply class
property (POWER_SUPPLY_PROP_CHARGE_TYPE) to the UCSI driver.
That will make the charge type visible in the charge_type
power supply class sysfs attribute file.

UCSI has the charge type specified in the Battery Charging
Status field of the response to the GET_CONNECTOR_STATUS
command.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240619140806.3502590-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/psy.c
drivers/usb/typec/ucsi/ucsi.c