lkml.org 
[lkml]   [2018]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 2/2] media: V3s: Add support for Allwinner CSI.
Hi,

On Mon, 29 Jan 2018 13:49:14 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:

> On 01/29/2018 01:21 AM, Yong Deng wrote:
> > Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2
> > interface and CSI1 is used for parallel interface. This is not
> > documented in datasheet but by test and guess.
> >
> > This patch implement a v4l2 framework driver for it.
> >
> > Currently, the driver only support the parallel interface. MIPI-CSI2,
> > ISP's support are not included in this patch.
> >
> > Tested-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > Signed-off-by: Yong Deng <yong.deng@magewell.com>
> > ---
>
>
> A previous version (I think v6) had a build error with the use of
> PHYS_OFFSET, so Kconfig was modified to depend on ARM and ARCH_SUNXI
> (one of which seems to be overkill). As is here, the COMPILE_TEST piece is
> meaningless for all arches except ARM. If you care enough for COMPILE_TEST
> (and I would), then you could make COMPILE_TEST useful on any arch by
> removing the "depends on ARM" (the ARCH_SUNXI takes care of that) and by
> having an alternate value for PHYS_OFFSET, like so:
>
> +#if defined(CONFIG_COMPILE_TEST) && !defined(PHYS_OFFSET)
> +#define PHYS_OFFSET 0
> +#endif
>
> With those 2 changes, the driver builds for me on x86_64.

I have considered this method.
But it's so sick to put these code in dirver (for my own). I mean
this is meaningless for the driver itself and make people confused.

I grepped the driver/ code and I found many drivers writing Kconfig
like this. For example:
ARM && COMPILE_TEST
MIPS && COMPILE_TEST
PPC64 && COMPILE_TEST

BTW, for my own, I do not care about COMPILE_TEST.

>
> > diff --git a/drivers/media/platform/sunxi/sun6i-csi/Kconfig b/drivers/media/platform/sunxi/sun6i-csi/Kconfig
> > new file mode 100644
> > index 0000000..f80c965
> > --- /dev/null
> > +++ b/drivers/media/platform/sunxi/sun6i-csi/Kconfig
> > @@ -0,0 +1,10 @@
> > +config VIDEO_SUN6I_CSI
> > + tristate "Allwinner V3s Camera Sensor Interface driver"
> > + depends on ARM
> > + depends on VIDEO_V4L2 && COMMON_CLK && VIDEO_V4L2_SUBDEV_API && HAS_DMA
> > + depends on ARCH_SUNXI || COMPILE_TEST
> > + select VIDEOBUF2_DMA_CONTIG
> > + select REGMAP_MMIO
> > + select V4L2_FWNODE
> > + ---help---
> > + Support for the Allwinner Camera Sensor Interface Controller on V3s.
>
> thanks,
> --
> ~Randy


Thanks,
Yong

\
 
 \ /
  Last update: 2018-01-30 03:49    [W:0.079 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site