summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadhey Shyam Pandey <radhey.shyam.pandey@amd.com>2024-12-03 00:18:22 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-19 18:12:58 +0100
commit1832e61d879cfed4501013502f74637cd9692622 (patch)
treebdeb2d5b595020163ef57c2aa89d1cd5e296cd53
parent7143efb58e33b6b1ebb32556e1fcdee03c7ed6a7 (diff)
usb: misc: onboard_usb_dev: skip suspend/resume sequence for USB5744 SMBus support
commit ce15d6b3d5c3c6f78290066be0f0a4fd89cdeb5b upstream. USB5744 SMBus initialization is done once in probe() and doing it in resume is not supported so avoid going into suspend and reset the HUB. There is a sysfs property 'always_powered_in_suspend' to implement this feature but since default state should be set to a working configuration so override this property value. It fixes the suspend/resume testcase on Kria KR260 Robotics Starter Kit. Fixes: 6782311d04df ("usb: misc: onboard_usb_dev: add Microchip usb5744 SMBus programming support") Cc: stable@vger.kernel.org Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Link: https://lore.kernel.org/r/1733165302-1694891-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/misc/onboard_usb_dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c
index 75dfdca04ff1..27b0a6e18267 100644
--- a/drivers/usb/misc/onboard_usb_dev.c
+++ b/drivers/usb/misc/onboard_usb_dev.c
@@ -407,8 +407,10 @@ static int onboard_dev_probe(struct platform_device *pdev)
}
if (of_device_is_compatible(pdev->dev.of_node, "usb424,2744") ||
- of_device_is_compatible(pdev->dev.of_node, "usb424,5744"))
+ of_device_is_compatible(pdev->dev.of_node, "usb424,5744")) {
err = onboard_dev_5744_i2c_init(client);
+ onboard_dev->always_powered_in_suspend = true;
+ }
put_device(&client->dev);
if (err < 0)