From patchwork Wed Jun 15 22:29:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 9179655 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 E8976604DB for ; Wed, 15 Jun 2016 22:31:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D992E27DA4 for ; Wed, 15 Jun 2016 22:31:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDE2127DCE; Wed, 15 Jun 2016 22:31:33 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, HK_RANDOM_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham 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 7AABE27BE5 for ; Wed, 15 Jun 2016 22:31:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933028AbcFOWbM (ORCPT ); Wed, 15 Jun 2016 18:31:12 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35070 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161148AbcFOWbH (ORCPT ); Wed, 15 Jun 2016 18:31:07 -0400 Received: by mail-lf0-f67.google.com with SMTP id w130so4013501lfd.2; Wed, 15 Jun 2016 15:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yxkePnYtpARxhcbUYzS10VaeGqQhfS6Eiz0N603+T1M=; b=BmrJbH5IczAbhlNMvE8WTTdll+Im8ypBRakSCoz5Fc/lGkBrSYITgQMzOM9Yx0ibZE McbQ2DRryZA4zQJSqcZTJGZNGM88DNLTnlYHe7yEfVDW1A8+mou8Acdf/lWSPsZFBmtv pBtKRfdnNnnGxRiZJTx8iGK9crXTQbxSh7wBtgu3rSGiWaxoHwjNzd3tiTEmIFWcvXOJ HtKuDfuIQMM3R5B7+RieqnbO+eMczWXZmdv4UtQjqx5KIS4dVwIsdOMqkr+2FVNs6zMi rP24N/ikbqNcaaJY12tj7JmOe07Amia6vfVQZuskbFFIhwKrvkXQSvPqSR1MWfoR4Vtl AJVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yxkePnYtpARxhcbUYzS10VaeGqQhfS6Eiz0N603+T1M=; b=OdVOCGKORT0KJSM0KBb1TwAOKWSR/akIHUSL35QE+R0y6GdRG9ygyzag7R3QiL8Tbz pyRuI9qFJoFkd/3WqKLGg/XMOajk/kXz8btUPp0glADHn6sWI+4Sl/JKy6xhfK3fMZcD nueaadSXSHeSavFyrymDL9KrnzoUgYlsIzFTjszF4CQvv0+rHQq6V0hBiZ/4Rx0eg957 5W4DxqMmJNsuL4WZPzQdNKGWA7IWXm/JIR+Io0IB1arQCXPzqN4tg5a2r4sgj9xuObZb 2tKc/9RGbB3VDswgrFXSNAQpcvQmWcAKVUdS6BL9JlgG6u9ufVsHlyaqSUASTq3icF9E AhqQ== X-Gm-Message-State: ALyK8tLQy9ss3fcCLOHAiph16DGQqE6wzv+3Cuu+GNufjtyZ4yj1IpjHVfzXR8ePRcpLnQ== X-Received: by 10.25.209.71 with SMTP id i68mr347479lfg.20.1466029866086; Wed, 15 Jun 2016 15:31:06 -0700 (PDT) Received: from z50.lan (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id 139sm3925258ljj.1.2016.06.15.15.31.04 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Jun 2016 15:31:05 -0700 (PDT) From: Janusz Krzysztofik To: Mauro Carvalho Chehab , Guennadi Liakhovetski , Greg Kroah-Hartman Cc: Hans Verkuil , Amitoj Kaur Chawla , Arnd Bergmann , Lee Jones , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Janusz Krzysztofik Subject: [PATCH 3/3] media: i2c/soc_camera: fix ov6650 sensor getting wrong clock Date: Thu, 16 Jun 2016 00:29:50 +0200 Message-Id: <1466029790-31094-4-git-send-email-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1466029790-31094-1-git-send-email-jmkrzyszt@gmail.com> References: <1466029790-31094-1-git-send-email-jmkrzyszt@gmail.com> 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 After changes to v4l2_clk API introduced in v4.1 by commits a37462b919 '[media] V4L: remove clock name from v4l2_clk API' and 4f528afcfb '[media] V4L: add CCF support to the v4l2_clk API', ov6650 sensor stopped responding because v4l2_clk_get(), still called with depreciated V4L2 clock name "mclk", started to return respective CCF clock instead of the V4l2 one registered by soc_camera. Fix it by calling v4l2_clk_get() with NULL clock name. Created and tested on Amstrad Delta against Linux-4.7-rc3 with omap1_camera fixes. Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/soc_camera/ov6650.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/soc_camera/ov6650.c b/drivers/media/i2c/soc_camera/ov6650.c index 1f8af1e..1e4783b 100644 --- a/drivers/media/i2c/soc_camera/ov6650.c +++ b/drivers/media/i2c/soc_camera/ov6650.c @@ -1033,7 +1033,7 @@ static int ov6650_probe(struct i2c_client *client, priv->code = MEDIA_BUS_FMT_YUYV8_2X8; priv->colorspace = V4L2_COLORSPACE_JPEG; - priv->clk = v4l2_clk_get(&client->dev, "mclk"); + priv->clk = v4l2_clk_get(&client->dev, NULL); if (IS_ERR(priv->clk)) { ret = PTR_ERR(priv->clk); goto eclkget;