From patchwork Tue Jan 12 19:49:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 362475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AA35C433E6 for ; Tue, 12 Jan 2021 19:52:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3AF422202 for ; Tue, 12 Jan 2021 19:52:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436759AbhALTwU (ORCPT ); Tue, 12 Jan 2021 14:52:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436747AbhALTwU (ORCPT ); Tue, 12 Jan 2021 14:52:20 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32C90C061786 for ; Tue, 12 Jan 2021 11:51:39 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 278671F45505 From: Ezequiel Garcia To: linux-media@vger.kernel.org, Hans Verkuil Cc: kernel@collabora.com, Arnd Bergmann , Petr Cvek , Janusz Krzysztofik , Sakari Ailus , Daniel Mack , Haojian Zhuang , Ezequiel Garcia Subject: [PATCH v2 1/6] media: mach-pxa: Register the camera sensor fixed-rate clock Date: Tue, 12 Jan 2021 16:49:14 -0300 Message-Id: <20210112194919.50176-2-ezequiel@collabora.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210112194919.50176-1-ezequiel@collabora.com> References: <20210112194919.50176-1-ezequiel@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The pxa-camera capture driver currently registers a v4l2-clk clock, named "mclk", to represent the mt9m111 sensor clock. Register a proper fixed-rate clock using the generic clock framework, which will allow to remove the v4l2-clk clock in the pxa-camera driver in a follow-up commit. Signed-off-by: Ezequiel Garcia Acked-by: Arnd Bergmann (for arch/arm/mach-*/) Acked-by: Petr Cvek --- Quoting Arnd: """ If there are no objections to the change itself, please take it through the v4l2 git tree. """ arch/arm/mach-pxa/devices.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 524d6093e0c7..09b8495f3fd9 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -634,6 +635,13 @@ static struct platform_device pxa27x_device_camera = { void __init pxa_set_camera_info(struct pxacamera_platform_data *info) { + struct clk *mclk; + + /* Register a fixed-rate clock for camera sensors. */ + mclk = clk_register_fixed_rate(NULL, "pxa_camera_clk", NULL, 0, + info->mclk_10khz * 10000); + if (!IS_ERR(mclk)) + clkdev_create(mclk, "mclk", NULL); pxa_register_device(&pxa27x_device_camera, info); }