[phy-next,18/22] pinctrl: tegra-xusb: include PHY provider header

Message ID 20260304175735.2660419-19-vladimir.oltean@nxp.com (mailing list archive)
State New
Headers
Series Split Generic PHY consumer and provider API |

Commit Message

Vladimir Oltean March 4, 2026, 5:57 p.m. UTC
The tegra-xusb pinctrl driver is also a PHY provider (calls
devm_phy_create() for PCIe and SATA). However, according to Vinod Koul,
having PHY provider drivers outside of drivers/phy/ is discouraged,
although it would be difficult for me to address a proper movement here.

Include the private provider API header from drivers/phy/, but leave a
FIXME in place. It will have to be moved, eventually.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
Cc: Linus Walleij <linusw@kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/pinctrl/tegra/pinctrl-tegra-xusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Linus Walleij March 5, 2026, 12:43 p.m. UTC | #1
On Wed, Mar 4, 2026 at 7:00 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:

> The tegra-xusb pinctrl driver is also a PHY provider (calls
> devm_phy_create() for PCIe and SATA). However, according to Vinod Koul,
> having PHY provider drivers outside of drivers/phy/ is discouraged,
> although it would be difficult for me to address a proper movement here.
>
> Include the private provider API header from drivers/phy/, but leave a
> FIXME in place. It will have to be moved, eventually.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Fair enough, is this a regression so I should merge it for fixes
or just a nonurgent fix that I can apply for next?

Long term a custom device can be created from the pin
control driver so that the Linux device model can be
used to move the driver over to phy.

Yours,
Linus Walleij
  
Linus Walleij March 5, 2026, 12:44 p.m. UTC | #2
On Thu, Mar 5, 2026 at 1:43 PM Linus Walleij <linusw@kernel.org> wrote:
> On Wed, Mar 4, 2026 at 7:00 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
>
> > The tegra-xusb pinctrl driver is also a PHY provider (calls
> > devm_phy_create() for PCIe and SATA). However, according to Vinod Koul,
> > having PHY provider drivers outside of drivers/phy/ is discouraged,
> > although it would be difficult for me to address a proper movement here.
> >
> > Include the private provider API header from drivers/phy/, but leave a
> > FIXME in place. It will have to be moved, eventually.
> >
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> Fair enough, is this a regression so I should merge it for fixes
> or just a nonurgent fix that I can apply for next?

Sorry I realized it needs to go in with the series.
Reviewed-by: Linus Walleij <linusw@kernel.org>

You can take it from here.

Yours,
Linus Walleij
  
Vladimir Oltean March 5, 2026, 12:47 p.m. UTC | #3
On Thu, Mar 05, 2026 at 01:44:42PM +0100, Linus Walleij wrote:
> On Thu, Mar 5, 2026 at 1:43 PM Linus Walleij <linusw@kernel.org> wrote:
> > On Wed, Mar 4, 2026 at 7:00 PM Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
> >
> > > The tegra-xusb pinctrl driver is also a PHY provider (calls
> > > devm_phy_create() for PCIe and SATA). However, according to Vinod Koul,
> > > having PHY provider drivers outside of drivers/phy/ is discouraged,
> > > although it would be difficult for me to address a proper movement here.
> > >
> > > Include the private provider API header from drivers/phy/, but leave a
> > > FIXME in place. It will have to be moved, eventually.
> > >
> > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> >
> > Fair enough, is this a regression so I should merge it for fixes
> > or just a nonurgent fix that I can apply for next?
> 
> Sorry I realized it needs to go in with the series.
> Reviewed-by: Linus Walleij <linusw@kernel.org>
> 
> You can take it from here.

Yeah, the plan is explained in the cover letter. No regression intended
if it's taken through the same tree as the header split itself.

Thanks for the review.
  

Patch

diff --git a/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c b/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c
index c6a51bb21215..6b609bf685c7 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra-xusb.c
@@ -7,7 +7,6 @@ 
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/phy/phy.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
 #include <linux/seq_file.h>
@@ -19,6 +18,7 @@ 
 
 #include <dt-bindings/pinctrl/pinctrl-tegra-xusb.h>
 
+#include "../../phy/phy-provider.h" /* FIXME */
 #include "../core.h"
 #include "../pinctrl-utils.h"