]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: misc: onboard_usb_dev: skip suspend/resume sequence for USB5744 SMBus support
authorRadhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Mon, 2 Dec 2024 18:48:22 +0000 (00:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2024 15:27:04 +0000 (16:27 +0100)
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>
drivers/usb/misc/onboard_usb_dev.c

index 36b11127280f3622a6fbad378932f72570745563..75ac3c6aa92d0d925bb9488d1e6295548446bf98 100644 (file)
@@ -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)