* [PATCH] media: tc358746: select CONFIG_GENERIC_PHY
@ 2023-06-23 15:23 Arnd Bergmann
2023-06-23 15:41 ` Marco Felsch
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-06-23 15:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Arnd Bergmann, Vinod Koul, Kishon Vijay Abraham I, Sakari Ailus,
Laurent Pinchart, Hans Verkuil, Marco Felsch, Gerald Loacker,
Bingbu Cao, Mikhail Rudenko, Linus Walleij, Vincent Shih,
Mark Brown, linux-media, linux-kernel, linux-phy
From: Arnd Bergmann <arnd@arndb.de>
The tc358746 driver selects CONFIG_GENERIC_PHY_MIPI_DPHY and links to
that, but this fails when CONFIG_GENERIC_PHY is disabled, because Kbuild
then never enters the drivers/phy directory for building object files:
ERROR: modpost: "phy_mipi_dphy_get_default_config_for_hsclk" [drivers/media/i2c/tc358746.ko] undefined!
Add an explicit 'select GENERIC_PHY' here to ensure that the directory
is entered, and add another dependency on that symbol so make it
more obvious what is going on if another driver has the same problem,
as this will produce a Kconfig warning.
Fixes: 80a21da360516 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/media/i2c/Kconfig | 1 +
drivers/phy/Kconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index cf675ac4b1326..226454b6a90dd 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -1305,6 +1305,7 @@ config VIDEO_TC358746
select VIDEO_V4L2_SUBDEV_API
select MEDIA_CONTROLLER
select V4L2_FWNODE
+ select GENERIC_PHY
select GENERIC_PHY_MIPI_DPHY
select REGMAP_I2C
help
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index f46e3148d286d..8dba9596408f2 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -18,6 +18,7 @@ config GENERIC_PHY
config GENERIC_PHY_MIPI_DPHY
bool
+ depends on GENERIC_PHY
help
Generic MIPI D-PHY support.
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: tc358746: select CONFIG_GENERIC_PHY
2023-06-23 15:23 [PATCH] media: tc358746: select CONFIG_GENERIC_PHY Arnd Bergmann
@ 2023-06-23 15:41 ` Marco Felsch
0 siblings, 0 replies; 2+ messages in thread
From: Marco Felsch @ 2023-06-23 15:41 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mauro Carvalho Chehab, Arnd Bergmann, Vinod Koul,
Kishon Vijay Abraham I, Sakari Ailus, Laurent Pinchart,
Hans Verkuil, Gerald Loacker, Bingbu Cao, Mikhail Rudenko,
Linus Walleij, Vincent Shih, Mark Brown, linux-media,
linux-kernel, linux-phy
Hi Arnd,
thanks for the patch.
On 23-06-23, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The tc358746 driver selects CONFIG_GENERIC_PHY_MIPI_DPHY and links to
> that, but this fails when CONFIG_GENERIC_PHY is disabled, because Kbuild
> then never enters the drivers/phy directory for building object files:
>
> ERROR: modpost: "phy_mipi_dphy_get_default_config_for_hsclk" [drivers/media/i2c/tc358746.ko] undefined!
>
> Add an explicit 'select GENERIC_PHY' here to ensure that the directory
> is entered, and add another dependency on that symbol so make it
> more obvious what is going on if another driver has the same problem,
> as this will produce a Kconfig warning.
>
> Fixes: 80a21da360516 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> drivers/media/i2c/Kconfig | 1 +
> drivers/phy/Kconfig | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> index cf675ac4b1326..226454b6a90dd 100644
> --- a/drivers/media/i2c/Kconfig
> +++ b/drivers/media/i2c/Kconfig
> @@ -1305,6 +1305,7 @@ config VIDEO_TC358746
> select VIDEO_V4L2_SUBDEV_API
> select MEDIA_CONTROLLER
> select V4L2_FWNODE
> + select GENERIC_PHY
> select GENERIC_PHY_MIPI_DPHY
> select REGMAP_I2C
> help
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index f46e3148d286d..8dba9596408f2 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -18,6 +18,7 @@ config GENERIC_PHY
>
> config GENERIC_PHY_MIPI_DPHY
> bool
> + depends on GENERIC_PHY
> help
> Generic MIPI D-PHY support.
>
> --
> 2.39.2
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-23 15:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23 15:23 [PATCH] media: tc358746: select CONFIG_GENERIC_PHY Arnd Bergmann
2023-06-23 15:41 ` Marco Felsch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox