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: 3623761 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8CB099F2D6 for ; Mon, 10 Feb 2014 21:53:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3640201CD for ; Mon, 10 Feb 2014 21:53:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB252201DE for ; Mon, 10 Feb 2014 21:53:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752869AbaBJVxs (ORCPT ); Mon, 10 Feb 2014 16:53:48 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:42213 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752787AbaBJVxq (ORCPT ); Mon, 10 Feb 2014 16:53:46 -0500 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 Cc: linux-arm-kernel@lists.infradead.org, linux-omap@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> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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"); }