android_kernel_samsung_sm8650/drivers/usb
Mario Limonciello 759e582b1c usb: typec: ucsi: Mark dGPUs as DEVICE scope
commit a7fbfd44c0204f0629288edfd0d77829edb4a2f8 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 usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
c67x00 USB: c67x00: remove unnecessary check of res 2022-05-12 11:36:46 +02:00
cdns3 Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:21:56 +02:00
chipidea usb: chipidea: fix missing goto in ci_hdrc_probe 2023-05-11 23:03:30 +09:00
class USB: usbtmc: Fix direction for 0-length ioctl control messages 2023-05-24 17:32:48 +01:00
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 usb: dwc2: Fix some error handling paths 2023-07-19 16:21:49 +02:00
dwc3 usb: dwc3-meson-g12a: Fix an error handling path in dwc3_meson_g12a_probe() 2023-07-19 16:21:55 +02:00
early usb: early: xhci-dbc: Fix a potential out-of-bound memory access 2023-03-10 09:33:35 +01:00
gadget usb: gadget: u_serial: Add null pointer check in gserial_suspend 2023-07-19 16:21:52 +02:00
host xhci: Fix incorrect tracking of free space on transfer rings 2023-05-24 17:32:49 +01:00
image usb/image: fix repeated words in comments 2022-07-27 14:33:53 +02:00
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-05-19 18:10:59 +02:00
misc USB: sisusbvga: Add endpoint checks 2023-05-30 14:03:20 +01:00
mon usb: mon: make mmapped memory read only 2022-09-22 15:52:29 +02:00
mtu3 usb: mtu3: fix kernel panic at qmu transfer done irq handler 2023-05-11 23:03:30 +09:00
musb Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:21:56 +02:00
phy usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe() 2023-07-19 16:21:52 +02:00
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-06-21 16:39:03 +02:00
roles Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:21:56 +02:00
serial USB: serial: option: add LARA-R6 01B PIDs 2023-07-19 16:21:45 +02:00
storage usb-storage: fix deadlock when a scsi command timeouts more than once 2023-05-24 17:32:48 +01:00
typec usb: typec: ucsi: Mark dGPUs as DEVICE scope 2023-07-19 16:22:12 +02:00
usbip use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00