Skip to contentSkip to conversation

media: sunxi: Depend on GENERIC_PHY_MIPI_DPHY

PATCH In review Sakari Ailus 3 participants 5 messages Jul 13, 2022 – Jul 19, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: sunxi: Depend on GENERIC_PHY_MIPI_DPHY

The sun6i-mipi-csi2 and sun6i-a83t-mipi-csi2 drivers depend on the generic MIPI D-PHY support. Select it. This fixes a linking problem when either of these drivers is enabled and GENERIC_PHY_MIPI_DPHY is disabled.

---
 drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig      | 1 +
 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig | 1 +
 2 files changed, 2 insertions(+)
drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig +1 -0
index b1712f5873fd9..eb982466abd30 100644
@@ -8,6 +8,7 @@ config VIDEO_SUN6I_MIPI_CSI2
 	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	select PHY_SUN6I_MIPI_DPHY
+	select GENERIC_PHY_MIPI_DPHY
 	select REGMAP_MMIO
 	help
 	   Support for the Allwinner A31 MIPI CSI-2 controller, also found on
drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig +1 -0
index 5854f8388c92a..789d58ee12ea9 100644
@@ -8,5 +8,6 @@ config VIDEO_SUN8I_A83T_MIPI_CSI2
 	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	select REGMAP_MMIO
+	select GENERIC_PHY_MIPI_DPHY
 	help
 	   Support for the Allwinner A83T MIPI CSI-2 controller and D-PHY.
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Sakari,

Thank you for the patch.

Quoted 5 lines · Sakari Ailus

The sun6i-mipi-csi2 and sun6i-a83t-mipi-csi2 drivers depend on the generic MIPI D-PHY support. Select it. This fixes a linking problem when either of these drivers is enabled and GENERIC_PHY_MIPI_DPHY is disabled.

Quoted 28 lines
---
 drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig      | 1 +
 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig | 1 +
 2 files changed, 2 insertions(+)
drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig +1 -0
index b1712f5873fd9..eb982466abd30 100644
@@ -8,6 +8,7 @@ config VIDEO_SUN6I_MIPI_CSI2
 	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	select PHY_SUN6I_MIPI_DPHY
+	select GENERIC_PHY_MIPI_DPHY
 	select REGMAP_MMIO
 	help
 	   Support for the Allwinner A31 MIPI CSI-2 controller, also found on
drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig +1 -0
index 5854f8388c92a..789d58ee12ea9 100644
@@ -8,5 +8,6 @@ config VIDEO_SUN8I_A83T_MIPI_CSI2
 	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	select REGMAP_MMIO
+	select GENERIC_PHY_MIPI_DPHY
 	help
 	   Support for the Allwinner A83T MIPI CSI-2 controller and D-PHY.
Signature · 3 lines
Regards,

Laurent Pinchart
Reviewed-by on v1 1/1
#2 lore raw
In reply to Sakari Ailus

Hi Sakari,

Quoted 5 lines · Sakari Ailus

The sun6i-mipi-csi2 and sun6i-a83t-mipi-csi2 drivers depend on the generic MIPI D-PHY support. Select it. This fixes a linking problem when either of these drivers is enabled and GENERIC_PHY_MIPI_DPHY is disabled.

Looks good to me but I have one question below.

Cheers,

Paul

Quoted 10 lines
---
 drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig      | 1 +
 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig | 1 +
 2 files changed, 2 insertions(+)
drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig +0 -0
index b1712f5873fd9..eb982466abd30 100644

drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig config VIDEO_SUN6I_MIPI_CSI2 · line 11

Quoted 4 lines
drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig +1 -0
@@ -8,6 +8,7 @@ config VIDEO_SUN6I_MIPI_CSI2
 	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	select PHY_SUN6I_MIPI_DPHY
+	select GENERIC_PHY_MIPI_DPHY

Since we select PHY_SUN6I_MIPI_DPHY here which also selects GENERIC_PHY_MIPI_DPHY, I suppose this is not strictly needed?

Still feels like a good idea to have it since the driver does use the generic MIPI D-PHY API.

Thanks,

Paul

Quoted 17 lines
drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig +0 -0
 	select REGMAP_MMIO
 	help
 	   Support for the Allwinner A31 MIPI CSI-2 controller, also found on
drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig +1 -0
index 5854f8388c92a..789d58ee12ea9 100644
@@ -8,5 +8,6 @@ config VIDEO_SUN8I_A83T_MIPI_CSI2
 	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	select REGMAP_MMIO
+	select GENERIC_PHY_MIPI_DPHY
 	help
 	   Support for the Allwinner A83T MIPI CSI-2 controller and D-PHY.
Signature · 1 line
2.30.2
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#3 lore raw

Hi Paul,

Quoted 22 lines · Paul Kocialkowski

Hi Sakari,

Quoted 5 lines · Sakari Ailus

The sun6i-mipi-csi2 and sun6i-a83t-mipi-csi2 drivers depend on the generic MIPI D-PHY support. Select it. This fixes a linking problem when either of these drivers is enabled and GENERIC_PHY_MIPI_DPHY is disabled.

Looks good to me but I have one question below.

Cheers,

Paul

Quoted 5 lines
---
 drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig      | 1 +
 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig | 1 +
 2 files changed, 2 insertions(+)
Quoted 12 lines

drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig config VIDEO_SUN6I_MIPI_CSI2 · line 11

Quoted 9 lines
drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig +1 -0
index b1712f5873fd9..eb982466abd30 100644
@@ -8,6 +8,7 @@ config VIDEO_SUN6I_MIPI_CSI2
 	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	select PHY_SUN6I_MIPI_DPHY
+	select GENERIC_PHY_MIPI_DPHY

Since we select PHY_SUN6I_MIPI_DPHY here which also selects GENERIC_PHY_MIPI_DPHY, I suppose this is not strictly needed?

In that case the symbols won't be present in modpost and that causes a build failure.

Thanks for the review. The patch is already merged though.

Signature · 3 lines
Kind regards,

Sakari Ailus
#4 lore raw

Hi Sakari,

Quoted 38 lines · Sakari Ailus

Hi Paul,

Quoted 22 lines · Paul Kocialkowski

Hi Sakari,

Quoted 5 lines · Sakari Ailus

The sun6i-mipi-csi2 and sun6i-a83t-mipi-csi2 drivers depend on the generic MIPI D-PHY support. Select it. This fixes a linking problem when either of these drivers is enabled and GENERIC_PHY_MIPI_DPHY is disabled.

Looks good to me but I have one question below.

Cheers,

Paul

Quoted 5 lines
---
 drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig      | 1 +
 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig | 1 +
 2 files changed, 2 insertions(+)
Quoted 12 lines

drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig config VIDEO_SUN6I_MIPI_CSI2 · line 11

Quoted 9 lines
drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig +1 -0
index b1712f5873fd9..eb982466abd30 100644
@@ -8,6 +8,7 @@ config VIDEO_SUN6I_MIPI_CSI2
 	select VIDEO_V4L2_SUBDEV_API
 	select V4L2_FWNODE
 	select PHY_SUN6I_MIPI_DPHY
+	select GENERIC_PHY_MIPI_DPHY

Since we select PHY_SUN6I_MIPI_DPHY here which also selects GENERIC_PHY_MIPI_DPHY, I suppose this is not strictly needed?

Quoted 2 lines

In that case the symbols won't be present in modpost and that causes a build failure.

Oh interesting, thanks!

Quoted 1 line

Thanks for the review. The patch is already merged though.

Ah, I had a quick look at https://git.linuxtv.org/media_tree.git/
but forgot to check your own tree.

Cheers,

Paul

Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com