DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] media: staging: rkisp1: The rkisp1 should be depended on CONFIG_OF
@ 2020-01-14  2:17 Zhang Xiaoxu
  2020-01-20  8:10 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Xiaoxu @ 2020-01-14  2:17 UTC (permalink / raw)
  To: mchehab, gregkh, zhangxiaoxu5; +Cc: devel, linux-media

If 'CONFIG_VIDEO_ROCKCHIP_ISP1' configured but no 'CONFIG_OF', the
default configuration maybe:
  # CONFIG_OF is not set
  CONFIG_PHY_ROCKCHIP_DPHY_RX0=y
  CONFIG_VIDEO_ROCKCHIP_ISP1=y

This will cause the following compilation errors:
  drivers/staging/media/rkisp1/rkisp1-isp.o:
      In function `rkisp1_mipi_csi2_start.isra.5':
  rkisp1-isp.c:(.text+0x1238):
      undefined reference to `phy_mipi_dphy_get_default_config'
  make: *** [vmlinux] Error 1

Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
---
 drivers/staging/media/rkisp1/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/rkisp1/Kconfig b/drivers/staging/media/rkisp1/Kconfig
index b859a493caba..23080b7f07a6 100644
--- a/drivers/staging/media/rkisp1/Kconfig
+++ b/drivers/staging/media/rkisp1/Kconfig
@@ -3,7 +3,7 @@
 config VIDEO_ROCKCHIP_ISP1
 	tristate "Rockchip Image Signal Processing v1 Unit driver"
 	depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
-	depends on ARCH_ROCKCHIP || COMPILE_TEST
+	depends on (ARCH_ROCKCHIP || COMPILE_TEST) && OF
 	select VIDEOBUF2_DMA_CONTIG
 	select VIDEOBUF2_VMALLOC
 	select V4L2_FWNODE
-- 
2.17.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] media: staging: rkisp1: The rkisp1 should be depended on CONFIG_OF
  2020-01-14  2:17 [PATCH v2] media: staging: rkisp1: The rkisp1 should be depended on CONFIG_OF Zhang Xiaoxu
@ 2020-01-20  8:10 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2020-01-20  8:10 UTC (permalink / raw)
  To: Zhang Xiaoxu; +Cc: devel, gregkh, linux-media

Em Tue, 14 Jan 2020 10:17:20 +0800
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> escreveu:

> If 'CONFIG_VIDEO_ROCKCHIP_ISP1' configured but no 'CONFIG_OF', the
> default configuration maybe:
>   # CONFIG_OF is not set
>   CONFIG_PHY_ROCKCHIP_DPHY_RX0=y
>   CONFIG_VIDEO_ROCKCHIP_ISP1=y
> 
> This will cause the following compilation errors:
>   drivers/staging/media/rkisp1/rkisp1-isp.o:
>       In function `rkisp1_mipi_csi2_start.isra.5':
>   rkisp1-isp.c:(.text+0x1238):
>       undefined reference to `phy_mipi_dphy_get_default_config'
>   make: *** [vmlinux] Error 1
> 
> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
> ---
>  drivers/staging/media/rkisp1/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/rkisp1/Kconfig b/drivers/staging/media/rkisp1/Kconfig
> index b859a493caba..23080b7f07a6 100644
> --- a/drivers/staging/media/rkisp1/Kconfig
> +++ b/drivers/staging/media/rkisp1/Kconfig
> @@ -3,7 +3,7 @@
>  config VIDEO_ROCKCHIP_ISP1
>  	tristate "Rockchip Image Signal Processing v1 Unit driver"
>  	depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
> -	depends on ARCH_ROCKCHIP || COMPILE_TEST
> +	depends on (ARCH_ROCKCHIP || COMPILE_TEST) && OF

Makes sense. Yet, I would prefer to have this as:

  	depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && OF
	depends on ARCH_ROCKCHIP || COMPILE_TEST

Just to let the arch-specific/compile test dependency line clearer.

>  	select VIDEOBUF2_DMA_CONTIG
>  	select VIDEOBUF2_VMALLOC
>  	select V4L2_FWNODE


Cheers,
Mauro
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14  2:17 [PATCH v2] media: staging: rkisp1: The rkisp1 should be depended on CONFIG_OF Zhang Xiaoxu
2020-01-20  8:10 ` Mauro Carvalho Chehab

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git