From patchwork Mon Feb 10 21:54:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3623881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 35E50BF418 for ; Mon, 10 Feb 2014 21:59:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 701D4201DE for ; Mon, 10 Feb 2014 21:59:24 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83EB0201CD for ; Mon, 10 Feb 2014 21:59:23 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCysk-0008Kd-MC; Mon, 10 Feb 2014 21:59:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCyns-000830-Pl; Mon, 10 Feb 2014 21:54:12 +0000 Received: from perceval.ideasonboard.com ([95.142.166.194]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WCyno-00080S-H1 for linux-arm-kernel@lists.infradead.org; Mon, 10 Feb 2014 21:54:09 +0000 Received: from avalon.ideasonboard.com (214.131-246-81.adsl-dyn.isp.belgacom.be [81.246.131.214]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7F7E1363CC; Mon, 10 Feb 2014 22:52:46 +0100 (CET) From: Laurent Pinchart To: linux-media@vger.kernel.org Subject: [PATCH 1/5] ARM: omap2: cm-t35: Add regulators and clock for camera sensor Date: Mon, 10 Feb 2014 22:54:40 +0100 Message-Id: <1392069284-18024-2-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392069284-18024-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1392069284-18024-1-git-send-email-laurent.pinchart@ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140210_165408_712836_70A1898F X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The camera sensor will soon require regulators and clocks. Register fixed regulators for its VAA and VDD power supplies and a fixed rate clock for its master clock. Signed-off-by: Laurent Pinchart Acked-by: Igor Grinberg Acked-by: Tony Lindgren --- arch/arm/mach-omap2/board-cm-t35.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 8dd0ec8..018353d 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -16,6 +16,8 @@ * */ +#include +#include #include #include #include @@ -542,8 +544,22 @@ static struct isp_platform_data cm_t35_isp_pdata = { .subdevs = cm_t35_isp_subdevs, }; +static struct regulator_consumer_supply cm_t35_camera_supplies[] = { + REGULATOR_SUPPLY("vaa", "3-005d"), + REGULATOR_SUPPLY("vdd", "3-005d"), +}; + static void __init cm_t35_init_camera(void) { + struct clk *clk; + + clk = clk_register_fixed_rate(NULL, "mt9t001-clkin", NULL, CLK_IS_ROOT, + 48000000); + clk_register_clkdev(clk, NULL, "3-005d"); + + regulator_register_fixed(2, cm_t35_camera_supplies, + ARRAY_SIZE(cm_t35_camera_supplies)); + if (omap3_init_camera(&cm_t35_isp_pdata) < 0) pr_warn("CM-T3x: Failed registering camera device!\n"); }