From patchwork Wed Apr 17 15:17:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 2454271 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 297923FC64 for ; Wed, 17 Apr 2013 15:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754938Ab3DQPS5 (ORCPT ); Wed, 17 Apr 2013 11:18:57 -0400 Received: from service87.mimecast.com ([91.220.42.44]:46809 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752878Ab3DQPSz (ORCPT ); Wed, 17 Apr 2013 11:18:55 -0400 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 17 Apr 2013 16:18:19 +0100 Received: from hornet.Cambridge.Arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Apr 2013 16:17:39 +0100 From: Pawel Moll To: linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Cc: Laurent Pinchart , Linus Walleij , Russell King - ARM Linux , Pawel Moll Subject: [RFC 08/10] video: Versatile Express MUXFPGA driver Date: Wed, 17 Apr 2013 16:17:20 +0100 Message-Id: <1366211842-21497-9-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> References: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> X-OriginalArrivalTime: 17 Apr 2013 15:17:39.0373 (UTC) FILETIME=[B2E715D0:01CE3B7E] X-MC-Unique: 113041716181920301 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Versatile Express' DVI video output can be connected to one the three sources - motherboard's CLCD controller or a video signal generated by one of the daughterboards. This driver provides a Common Display Framework driver for the muxer FPGA, which acts as a switch selecting one of the video data sources. The default source is selected basing on the priority list (which itself can be modified via module paramter), but the user can make his own decision about it using the device's sysfs "source" attribute. Signed-off-by: Pawel Moll --- .../testing/sysfs-driver-video-vexpress-muxfpga | 5 + drivers/video/Makefile | 3 + drivers/video/vexpress-muxfpga.c | 228 ++++++++++++++++++++ 3 files changed, 236 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-video-vexpress-muxfpga create mode 100644 drivers/video/vexpress-muxfpga.c diff --git a/Documentation/ABI/testing/sysfs-driver-video-vexpress-muxfpga b/Documentation/ABI/testing/sysfs-driver-video-vexpress-muxfpga new file mode 100644 index 0000000..bfd568d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-video-vexpress-muxfpga @@ -0,0 +1,5 @@ +What: /sys/bus/platform/drivers/vexpress-muxfpga//source +Date: April 2013 +Contant: Pawel Moll +Description: This file stores the id of the video signal source + supposed to be routed to the board's DVI output. diff --git a/drivers/video/Makefile b/drivers/video/Makefile index b989e8e..84c6083 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -176,3 +176,6 @@ obj-$(CONFIG_DISPLAY_TIMING) += display_timing.o obj-$(CONFIG_OF_DISPLAY_TIMING) += of_display_timing.o obj-$(CONFIG_VIDEOMODE) += videomode.o obj-$(CONFIG_OF_VIDEOMODE) += of_videomode.o + +# platform specific output drivers +obj-$(CONFIG_VEXPRESS_CONFIG) += vexpress-muxfpga.o diff --git a/drivers/video/vexpress-muxfpga.c b/drivers/video/vexpress-muxfpga.c new file mode 100644 index 0000000..1731ad0 --- /dev/null +++ b/drivers/video/vexpress-muxfpga.c @@ -0,0 +1,228 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Copyright (C) 2013 ARM Limited + */ + +#define pr_fmt(fmt) "vexpress-muxfpga: " fmt + +#include +#include +#include +#include +#include