From patchwork Mon Apr 25 16:03:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102459 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1120611qge; Mon, 25 Apr 2016 09:04:35 -0700 (PDT) X-Received: by 10.98.87.220 with SMTP id i89mr3383177pfj.107.1461600275461; Mon, 25 Apr 2016 09:04:35 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si7392068pfi.41.2016.04.25.09.04.35; Mon, 25 Apr 2016 09:04:35 -0700 (PDT) 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 S933094AbcDYQEa (ORCPT + 29 others); Mon, 25 Apr 2016 12:04:30 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:53518 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932927AbcDYQE2 (ORCPT ); Mon, 25 Apr 2016 12:04:28 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0MdibE-1b4f7o3sEu-00PNPv; Mon, 25 Apr 2016 18:03:17 +0200 From: Arnd Bergmann To: Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, Jonathan Corbet , linux-kernel@vger.kernel.org, Andrew Morton , Arnd Bergmann Subject: [PATCH v2 1/2] samples: connector: from Documentation to samples directory Date: Mon, 25 Apr 2016 18:03:08 +0200 Message-Id: <1461600189-2207716-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461600189-2207716-1-git-send-email-arnd@arndb.de> References: <1461600189-2207716-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:F7C/+LnIk8DvdJ+2ln4x11+DaE/KwX2grlDupY7tsv3mab6KbtP LlMjLWmGQLY4MPDenfhrCZWgzE2deUbDQY9wXQs2DDaoMPjSbK2HXlYUXNjetGFmSp6+gZ4 wIHzr0FrZ2FGjZXkBGalIvZ0QbctBYVLQeliQxfzfiyAjDNhd9N/egW5Kn6NWFgK1FFUgz8 m++x7/iYMGqXwp7y8X/EQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:fRsp0fFdrOo=:FRpTgmBpETP1ehVv7kTswq 16YCVj4YgnqPjqvRuQ3AngfbVTQmk2XSo7yJRI4wYPZtSptDlcJr7Ki88M8dyYXuugR+IQTee dnl835A/NrS7lLyqeceWOFm3OiF7twbX84niEuwzZsQArERU5W453j0z7JJXu5iuEcWzG4TKy agaN+hGrejEtR4ovjnKAVXs/V/ZWc7x1d1/D/20amrWbYd2lSB2NyGbdXtZu2/K12NPo6S88X e6B660VjvhG5MPdkjFQYTHaadSvv7dgjZbrS7zlu7j/ZXq6KicJ7J7O9iQDx588ZyDb0NEtO5 +62c89AvmWStCKN7kJMoRuYObkFIhgaQZdqKHCFETcuToMzVXEk1aH1FLZNCTbku612BeugRh 2h/McxoBmQSbeKxeKtaYh7tVwRItaZKd4hiit+3wzIR0jtUEjiufGYaAh+OlNtwcthSORbdNW TwGe5MaVa+bwZWicoKq5l6hBSye23cYE+en7IPr5n/9Rm0rZvnSMsGr7O3KYDPMx29Usj/Tfg EAfzoVcceHdYxFZl24+/LHHPoe1e5mJsw6n11fltgPdRr3Lz//wCcp+5Y/TvjqcjkbqxZBHxe uu0aq3M6IiRmGXrNenu7TVP6UnFYVc1Trytme2NbtmI3LIePaebYusUuMSUmfdjlgCyHQk4od JjaKFdoXjpbR9EAXan3gwBFp9UF5sq5I1a+O51b0HnT/oS/OOwcH8TUk8+4LWGhau14I= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A small bug with the new autoksyms support showed that there are two kernel modules in the Documentation directory that qualify as samples, while all other samples are in the samples/ directory. This patch was originally meant as a workaround for that bug, but it has now been solved in a different way. However, I still think it makes sense as a cleanup to consolidate all sample code in one place. Signed-off-by: Arnd Bergmann --- Documentation/Makefile | 2 +- Documentation/connector/connector.txt | 8 ++++++++ samples/Kconfig | 9 +++++++++ samples/Makefile | 2 +- {Documentation => samples}/connector/.gitignore | 0 {Documentation => samples}/connector/Makefile | 6 +++--- {Documentation => samples}/connector/cn_test.c | 0 {Documentation => samples}/connector/ucon.c | 0 8 files changed, 22 insertions(+), 5 deletions(-) rename {Documentation => samples}/connector/.gitignore (100%) rename {Documentation => samples}/connector/Makefile (76%) rename {Documentation => samples}/connector/cn_test.c (100%) rename {Documentation => samples}/connector/ucon.c (100%) -- 2.7.0 diff --git a/Documentation/Makefile b/Documentation/Makefile index 1207d7907650..13b5ae1b87aa 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,4 +1,4 @@ -subdir-y := accounting auxdisplay blackfin connector \ +subdir-y := accounting auxdisplay blackfin \ filesystems filesystems ia64 laptops mic misc-devices \ networking pcmcia prctl ptp timers vDSO video4linux \ watchdog diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt index f6215f95149b..ab7ca897fab7 100644 --- a/Documentation/connector/connector.txt +++ b/Documentation/connector/connector.txt @@ -186,3 +186,11 @@ only cn_test.c test module used it. Some work in netlink area is still being done, so things can be changed in 2.6.15 timeframe, if it will happen, documentation will be updated for that kernel. + +/*****************************************/ +Code samples +/*****************************************/ + +Sample code for a connector test module and user space can be found +in samples/connector/. To build this code, enable CONFIG_CONNECTOR +and CONFIG_SAMPLES. diff --git a/samples/Kconfig b/samples/Kconfig index d54f28c6dc5e..559a58baff6e 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -76,4 +76,13 @@ config SAMPLE_CONFIGFS help Builds a sample configfs interface. +config SAMPLE_CONNECTOR + tristate "Build connector sample -- loadable modules only" + depends on CONNECTOR && m + help + When enabled, this builds both a sample kernel module for + the connector interface and a user space tool to communicate + with it. + See also Documentation/connector/connector.txt + endif # SAMPLES diff --git a/samples/Makefile b/samples/Makefile index 48001d7e23f0..594ef7d9fa2a 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -2,4 +2,4 @@ obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ - configfs/ + configfs/ connector/ diff --git a/Documentation/connector/.gitignore b/samples/connector/.gitignore similarity index 100% rename from Documentation/connector/.gitignore rename to samples/connector/.gitignore diff --git a/Documentation/connector/Makefile b/samples/connector/Makefile similarity index 76% rename from Documentation/connector/Makefile rename to samples/connector/Makefile index d98e4df98e24..04b9622b6f51 100644 --- a/Documentation/connector/Makefile +++ b/samples/connector/Makefile @@ -1,9 +1,9 @@ -ifneq ($(CONFIG_CONNECTOR),) -obj-m += cn_test.o -endif +obj-$(CONFIG_SAMPLE_CONNECTOR) += cn_test.o # List of programs to build +ifdef CONFIG_SAMPLE_CONNECTOR hostprogs-y := ucon +endif # Tell kbuild to always build the programs always := $(hostprogs-y) diff --git a/Documentation/connector/cn_test.c b/samples/connector/cn_test.c similarity index 100% rename from Documentation/connector/cn_test.c rename to samples/connector/cn_test.c diff --git a/Documentation/connector/ucon.c b/samples/connector/ucon.c similarity index 100% rename from Documentation/connector/ucon.c rename to samples/connector/ucon.c From patchwork Mon Apr 25 16:03:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102460 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1120301qge; Mon, 25 Apr 2016 09:04:08 -0700 (PDT) X-Received: by 10.98.76.216 with SMTP id e85mr49915706pfj.121.1461600248007; Mon, 25 Apr 2016 09:04:08 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si7411456pfd.189.2016.04.25.09.04.07; Mon, 25 Apr 2016 09:04:07 -0700 (PDT) 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 S933038AbcDYQDf (ORCPT + 29 others); Mon, 25 Apr 2016 12:03:35 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:54124 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932937AbcDYQD3 (ORCPT ); Mon, 25 Apr 2016 12:03:29 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0MH974-1ayWLX0pUY-00Dn5Z; Mon, 25 Apr 2016 18:03:17 +0200 From: Arnd Bergmann To: Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, Jonathan Corbet , linux-kernel@vger.kernel.org, Andrew Morton , Arnd Bergmann Subject: [PATCH v2 2/2] samples: v4l: from Documentation to samples directory Date: Mon, 25 Apr 2016 18:03:09 +0200 Message-Id: <1461600189-2207716-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461600189-2207716-1-git-send-email-arnd@arndb.de> References: <1461600189-2207716-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:8vJURuTeU6/o9elRHQPsclL+DMkfDe9oNvmqHxGJ23xTECriLoS v+7NluCDE8YKuebjgfJiOUl47ZC7ZhbeHcbioNKPMLkogj6Ey+TaYr9++G23Wt1iql1EGtT iO02HuOUuiqM5VvyGOvKZSyGZpp+M2Z+WVyz0Luk1s4JrwL9uwhJsV4rX/U+Owlp9Kt5O8W g+/AqmWUc4ay/6A2UU+2A== X-UI-Out-Filterresults: notjunk:1; V01:K0:k0eeiP3RF/4=:mHypnqx199Ikm8RIUlhxoH J4Tws/nmBXxTTlsBUoGYoPfgrIBlZNyA8EYZyetvjuQrxXYrQcAA3My1Ni7zYi7HhX6Ticvgi Kq+ADaGHMnDssUZ+W0iJcpcXLd0l+HRYS5HrX6YkpYO8bGkn8hmRQ/6vnwCVCM7kOmLE95uuS 8aqqv3EEhtK00Wf/tZyuhJQR0n1POH2+NacSJWIdjmOuTX8IFuxYueHe7bAgUoBzwJzGMgEtq M5BYQUz6QzsXBz6B+UB6tEelEfvSaYW7F/7Jkiex0NoFBzy/tAtutcoQZQufXXXsIgWkVPbgl 3oFVeoMnUY4BbsQgwgnjavN+4VR+2rHbrWKTS4OX/mc25PYoCu1wVX9d/Z847WMZXtDpcJLte vvOu/NciXFVBlPufPQlLJ9WOmuj8tCTF+n3mf8EaSpdOupjH6UlBTR8rXMwVau6mG2/vpnxFJ 44wO1MR8+6wk4TGNAyir0njhHVlVXqE9OGX73/hrHRO/3ugWxjqmXIiApXQeqNDGbJDLsguV2 X7d++gCFxSSjAoCsrd5QgG1HPhrKIYj7HAPYDtlrV49d6T2DQddfp7Dczu3Xk7fkWpeI463ek lvc1zqt/9R3O1B2ZCwlTPgeMsbSu2HOGLOQh4qktpAjlfkxoCt6uaoCDRW+RV1QiDHBN/UzZV ggoaIw5WsoWFlpzw3nZmEUBtofGgEBKqgnaP95sDC9/xYUndYe4KI8soFffdJ16ZEfRQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A small bug with the new autoksyms support showed that there are two kernel modules in the Documentation directory that qualify as samples, while all other samples are in the samples/ directory. This patch was originally meant as a workaround for that bug, but it has now been solved in a different way. However, I still think it makes sense as a cleanup to consolidate all sample code in one place. Signed-off-by: Arnd Bergmann --- Documentation/Makefile | 3 +-- Documentation/video4linux/v4l2-framework.txt | 2 +- samples/Makefile | 2 +- {Documentation/video4linux => samples/v4l}/Makefile | 0 {Documentation/video4linux => samples/v4l}/v4l2-pci-skeleton.c | 0 5 files changed, 3 insertions(+), 4 deletions(-) rename {Documentation/video4linux => samples/v4l}/Makefile (100%) rename {Documentation/video4linux => samples/v4l}/v4l2-pci-skeleton.c (100%) -- 2.7.0 diff --git a/Documentation/Makefile b/Documentation/Makefile index 13b5ae1b87aa..de955e151af8 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,4 +1,3 @@ subdir-y := accounting auxdisplay blackfin \ filesystems filesystems ia64 laptops mic misc-devices \ - networking pcmcia prctl ptp timers vDSO video4linux \ - watchdog + networking pcmcia prctl ptp timers vDSO watchdog diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index fa41608ab2b4..cbefc7902f5f 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt @@ -35,7 +35,7 @@ need and this same framework should make it much easier to refactor common code into utility functions shared by all drivers. A good example to look at as a reference is the v4l2-pci-skeleton.c -source that is available in this directory. It is a skeleton driver for +source that is available in samples/v4l/. It is a skeleton driver for a PCI capture card, and demonstrates how to use the V4L2 driver framework. It can be used as a template for real PCI video capture driver. diff --git a/samples/Makefile b/samples/Makefile index 594ef7d9fa2a..2e3b523d7097 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -2,4 +2,4 @@ obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ - configfs/ connector/ + configfs/ connector/ v4l/ diff --git a/Documentation/video4linux/Makefile b/samples/v4l/Makefile similarity index 100% rename from Documentation/video4linux/Makefile rename to samples/v4l/Makefile diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c similarity index 100% rename from Documentation/video4linux/v4l2-pci-skeleton.c rename to samples/v4l/v4l2-pci-skeleton.c