Received: by 10.223.176.5 with SMTP id f5csp3740851wra; Mon, 29 Jan 2018 18:49:35 -0800 (PST) X-Google-Smtp-Source: AH8x226Cn+TzCygIVsXQyb6XYdKYFIYbSGVzEiJ5fBjiZNkHQLiyPomrAaZYA4yTj4gEjOMGEzmv X-Received: by 2002:a17:902:424:: with SMTP id 33-v6mr23340714ple.57.1517280575731; Mon, 29 Jan 2018 18:49:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517280575; cv=none; d=google.com; s=arc-20160816; b=HK5md61d9jkQH1uZK/TxfQv5eUXPKA4KHwzCpYKg5uSOBXhPw7/GKAXT2KdKlSKmwj hAOy3QMB2xFA4ORYK/Fu8+w/up0OhER3Ij0mZuifEQ0RphYVqDUfzWfAIw0yQc3UGfws CHdNC3p4tixbjvWwzADz+aus/SfaqHulXsFf3A4ttWx3Xs8Wjh8v+Gar/ehREUSINwDh 1JlcsVLwsYEDNi0aM6WJs3ddRYiXJEnZye9u4EEr0i7K9snOCS7cyujgyoZdwZLt44DH qEVpmsprzypeiiuB+fUSx/mDr+N7B6hdKr8vsY4xn21M4E7XqzuHL4ZLwBeXflOATGhE kl7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=xf6lXWTscNJIC3clkBJmfNT5pfDBUBiw7BBKKQwV9CE=; b=cwYXRxkNXrWzYTI1AuTjcZFpXZwvNft7CI+tlgbEqilLjSRY9d5F/m7DSfWKkuLXYf jW6NbO4i3xI7iY7X9hMwdkBg78WUDoE43vw0zcRVPKtJD+Sy6GHFDguCKaYo+1yzJYyR Ma3TzgW57HbXvWDbLROxnyQzfwamqIpo+l6xi1YluVVEuE8Ay7bfgB9Y2Z+50J2O+TWC MZHN4omYfs4Q36N39ycyY7pPiobcOFtgQVIXWVXH4d4XiKEmzu402vzEAOC+vz6A2xYQ Zz/kr0gfl8a/s0PKWyQzWey+tFXVLWJd6QjZ6hG3LS4XcNIhZwo0vJk9uejikVNIa6WA oeDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1-v6si10551832pld.637.2018.01.29.18.49.20; Mon, 29 Jan 2018 18:49:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbeA3Csy (ORCPT + 99 others); Mon, 29 Jan 2018 21:48:54 -0500 Received: from out20-73.mail.aliyun.com ([115.124.20.73]:42463 "EHLO out20-73.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752076AbeA3Csx (ORCPT ); Mon, 29 Jan 2018 21:48:53 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07666648|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01e01542;MF=yong.deng@magewell.com;NM=1;PH=DS;RN=24;RT=24;SR=0;TI=SMTPD_---.AcWR9-S_1517280513; Received: from John(mailfrom:yong.deng@magewell.com fp:58.213.29.2) by smtp.aliyun-inc.com(10.147.42.135); Tue, 30 Jan 2018 10:48:33 +0800 Date: Tue, 30 Jan 2018 10:48:33 +0800 From: Yong To: Randy Dunlap Cc: Maxime Ripard , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Chen-Yu Tsai , "David S. Miller" , Greg Kroah-Hartman , Linus Walleij , Hans Verkuil , Stanimir Varbanov , Hugues Fruchet , Yannick Fertre , Philipp Zabel , Arnd Bergmann , Benjamin Gaignard , Ramesh Shanmugasundaram , Sakari Ailus , Rick Chang , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v7 2/2] media: V3s: Add support for Allwinner CSI. Message-Id: <20180130104833.a06e44c558c7ddc6b38e20b3@magewell.com> In-Reply-To: References: <1517217696-17816-1-git-send-email-yong.deng@magewell.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, 29 Jan 2018 13:49:14 -0800 Randy Dunlap 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 > > Signed-off-by: Yong Deng > > --- > > > 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