From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pawel Moll Date: Wed, 17 Apr 2013 15:17:20 +0000 Subject: [RFC 08/10] video: Versatile Express MUXFPGA driver Message-Id: <1366211842-21497-9-git-send-email-pawel.moll@arm.com> List-Id: References: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> In-Reply-To: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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