acrn-kernel/drivers/usb
Mario Limonciello 759e582b1c usb: typec: ucsi: Mark dGPUs as DEVICE scope
commit a7fbfd44c0 upstream.

power_supply_is_system_supplied() checks whether any power
supplies are present that aren't batteries to decide whether
the system is running on DC or AC.  Downstream drivers use
this to make performance decisions.

Navi dGPUs include an UCSI function that has been exported
since commit 17631e8ca2 ("i2c: designware: Add driver
support for AMD NAVI GPU").

This UCSI function registers a power supply since commit
992a60ed0d ("usb: typec: ucsi: register with power_supply class")
but this is not a system power supply.

As the power supply for a dGPU is only for powering devices connected
to dGPU, create a device property to indicate that the UCSI endpoint
is only for the scope of `POWER_SUPPLY_SCOPE_DEVICE`.

Link: https://lore.kernel.org/lkml/20230516182541.5836-2-mario.limonciello@amd.com/
Reviewed-by: Evan Quan <evan.quan@amd.com>
Tested-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-19 16:22:12 +02:00
..
atm
c67x00
cdns3 Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:21:56 +02:00
chipidea
class
common Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:21:56 +02:00
core usb: hide unused usbfs_notify_suspend/resume functions 2023-07-19 16:21:52 +02:00
dwc2
dwc3 usb: dwc3-meson-g12a: Fix an error handling path in dwc3_meson_g12a_probe() 2023-07-19 16:21:55 +02:00
early
gadget
host
image
isp1760
misc
mon
mtu3
musb Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:21:56 +02:00
phy
renesas_usbhs
roles Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:21:56 +02:00
serial
storage
typec usb: typec: ucsi: Mark dGPUs as DEVICE scope 2023-07-19 16:22:12 +02:00
usbip
Kconfig
Makefile
usb-skeleton.c