On 06 June 2022 at 04:58 pm, Rob Herring wrote:
On Fri, May 27, 2022 at 9:23 AM Rob Herring <r...@kernel.org> wrote:
On Fri, May 27, 2022 at 3:33 AM Christian Zigotzky
<chzigot...@xenosoft.de> wrote:
On 27 May 2022 at 10:14 am, Prabhakar Mahadev Lad wrote:
Hi,

-----Original Message-----
From: Christian Zigotzky <chzigot...@xenosoft.de>

On 27 May 2022 at 09:56 am, Prabhakar Mahadev Lad wrote:
Hi,

-----Original Message-----
From: Christophe Leroy <christophe.le...@csgroup.eu>
[...]

Looks like the driver which you are using has not been converted to use
platform_get_irq(), could you please check that.
Cheers,
Prabhakar
Do you mean the mouse and keyboard driver?

No it could be your gpio/pinctrl driver assuming the keyboard/mouse are using 
GPIO's. If you are using interrupts then it might be some hierarchal irqc 
driver in drivers/irqchip/.

Cheers,
Prabhakar
Good to know. I only use unmodified drivers from the official Linux
kernel so it's not an issue of the Cyrus+ board.
The issue is in drivers/usb/host/fsl-mph-dr-of.c which copies the
resources to a child platform device. Can you try the following
change:

diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 44a7e58a26e3..47d9b7be60da 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -80,8 +80,6 @@ static struct platform_device *fsl_usb2_device_register(
                                         const char *name, int id)
  {
         struct platform_device *pdev;
-       const struct resource *res = ofdev->resource;
-       unsigned int num = ofdev->num_resources;
         int retval;

         pdev = platform_device_alloc(name, id);
@@ -106,11 +104,7 @@ static struct platform_device *fsl_usb2_device_register(
         if (retval)
                 goto error;

-       if (num) {
-               retval = platform_device_add_resources(pdev, res, num);
-               if (retval)
-                       goto error;
-       }
+       pdev->dev.of_node = ofdev->dev.of_node;
>From the log, I think you also need to add this line:

pdev->dev.of_node_reused = true;

         retval = platform_device_add(pdev);
         if (retval)
Hello Rob,

Thanks a lot for your answer.

Is the following patch correct?

--- a/drivers/usb/host/fsl-mph-dr-of.c    2022-05-28 09:10:26.797688422 +0200 +++ b/drivers/usb/host/fsl-mph-dr-of.c    2022-05-28 09:15:01.668594809 +0200
@@ -80,8 +80,6 @@ static struct platform_device *fsl_usb2_
                     const char *name, int id)
 {
     struct platform_device *pdev;
-    const struct resource *res = ofdev->resource;
-    unsigned int num = ofdev->num_resources;
     int retval;

     pdev = platform_device_alloc(name, id);
@@ -106,11 +104,7 @@ static struct platform_device *fsl_usb2_
     if (retval)
         goto error;

-    if (num) {
-        retval = platform_device_add_resources(pdev, res, num);
-        if (retval)
-            goto error;
-    }
+    pdev->dev.of_node = ofdev->dev.of_node;
+    pdev->dev.of_node_reused = true;

     retval = platform_device_add(pdev);
     if (retval)

---

Thanks,
Christian

Reply via email to