From patchwork Tue Feb 14 13:40:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 9572011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1ED856045F for ; Tue, 14 Feb 2017 13:42:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1302227F4B for ; Tue, 14 Feb 2017 13:42:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 078EA27FA8; Tue, 14 Feb 2017 13:42:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B63F627F4B for ; Tue, 14 Feb 2017 13:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753202AbdBNNlr (ORCPT ); Tue, 14 Feb 2017 08:41:47 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:59135 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754005AbdBNNkV (ORCPT ); Tue, 14 Feb 2017 08:40:21 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id B595281812; Tue, 14 Feb 2017 14:40:19 +0100 (CET) Date: Tue, 14 Feb 2017 14:40:19 +0100 From: Pavel Machek To: sakari.ailus@iki.fi Cc: sre@kernel.org, pali.rohar@gmail.com, pavel@ucw.cz, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, mchehab@kernel.org, ivo.g.dimitrov.75@gmail.com Subject: [RFC 11/13] gpio-switch is for some reason neccessary for camera to work. Message-ID: <20170214134019.GA8631@amd> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Probably something fun happening in userspace. --- arch/arm/mach-omap2/Makefile | 1 + arch/arm/mach-omap2/board-rx51-peripherals.c | 51 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 arch/arm/mach-omap2/board-rx51-peripherals.c diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 4698940..d536b1a 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -229,6 +229,7 @@ obj-$(CONFIG_SOC_OMAP2420) += msdi.o # Specific board support obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o pdata-quirks.o obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o +obj-y += board-rx51-peripherals.o # Platform specific device init code diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c new file mode 100644 index 0000000..641c2be --- /dev/null +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -0,0 +1,51 @@ +/* + * linux/arch/arm/mach-omap2/board-rx51-peripherals.c + * + * Copyright (C) 2008-2009 Nokia + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static struct platform_driver gpio_sw_driver = { + .driver = { + .name = "gpio-switch", + }, +}; + +static int __init gpio_sw_init(void) +{ + int r; + + printk(KERN_INFO "OMAP GPIO switch handler initializing\n"); + + r = platform_driver_register(&gpio_sw_driver); + if (r) + return r; + + platform_device_register_simple("gpio-switch", + -1, NULL, 0); + return 0; +} + +static void __exit gpio_sw_exit(void) +{ +} + +#ifndef MODULE +late_initcall(gpio_sw_init); +#else +module_init(gpio_sw_init); +#endif +module_exit(gpio_sw_exit);