Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2481623imm; Mon, 24 Sep 2018 05:14:37 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Ts8O6gWStIhAN2xql9EIWMcPBht3feK9VSwPJ9IcztH6AXJ4jJXMlBgd0Cv/E5+Vxa5Lh X-Received: by 2002:a17:902:158b:: with SMTP id m11-v6mr10486930pla.102.1537791277826; Mon, 24 Sep 2018 05:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537791277; cv=none; d=google.com; s=arc-20160816; b=MDtJIUO+a/G2Ly3FQnUtYcsQeikcSA7YVdKP6s3mPd+OFdYajsQb6m0/H8CijfD9Ht HRVI9l7VUpavzjaF8q2AtKd5Z+boW7kCPgrba5I4qu4zPkZbOus07qS+NgRPMS8AIWET ydun7J+rNfUFoi5HiMXAfGMyV86lfJ36SKL+g29IhPw9dqJQ9JtgKQqrqEI5H6qTklI1 X2xyARkN7G9bKdyZWOUJM0hg/7BEx5hMK3NYJVQ3VgwIBzrIP52uwtxig8kp42sR2CO2 yVF7RbjKzAnrvNWHTCNrgyx8ExqrJ2yjxEsyfbOB9W7ys/53eeQ7hKj+vJFV37Ras+Ku K/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=rgBYksvEGVBHPykK/4yw1ogkkgY0kS3fjsYqBh7l0mk=; b=ztkOe/iH+ORP0aVQR8d5AyneYzvdB3pz0+U5h5/MaLxR4np2T70707C3FB/htnAO29 OGv7qYK+MBARYzfm2sMkkt7wm5QwwKnq3xRq/lWFy0lE8EFfZi2qfkh+WoXAEJNsP/xr clwywaqTlW1ytTgPq2pAlukboeCYG6YRJGIWZoHy8nfq/4QgUPauax0XrAm2Ckw09hJE h0uFz+CYKhKDUsNktxMToXuxiATmuOMwF9Xdx/bnD6bgboV7wbIPNrTCVuu51nfYUquH gqUvVC8p1q8ApsayYFBggnsxZCNcqYM6vBK5egOaeiakw5TzjdIzws6b0CNgSsQv5fzq fZ7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2-v6si2131250pfn.250.2018.09.24.05.14.21; Mon, 24 Sep 2018 05:14:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731669AbeIXSP1 (ORCPT + 99 others); Mon, 24 Sep 2018 14:15:27 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55244 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729811AbeIXSP0 (ORCPT ); Mon, 24 Sep 2018 14:15:26 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8F089109C; Mon, 24 Sep 2018 12:13:35 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Todor Tomov , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.14 033/173] media: ov5645: Supported external clock is 24MHz Date: Mon, 24 Sep 2018 13:51:07 +0200 Message-Id: <20180924113118.403611617@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113114.334025954@linuxfoundation.org> References: <20180924113114.334025954@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Todor Tomov [ Upstream commit 4adb0a0432f489c5eb802b33dae7737f69e6fd7a ] The external clock frequency was set to 23.88MHz by mistake because of a platform which cannot get closer to 24MHz. The supported by the driver external clock is 24MHz so set it correctly and also fix the values of the pixel clock and link clock. However allow 1% tolerance to the external clock as this difference is small enough to be insignificant. Signed-off-by: Todor Tomov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/i2c/ov5645.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -510,8 +510,8 @@ static const struct reg_value ov5645_set }; static const s64 link_freq[] = { - 222880000, - 334320000 + 224000000, + 336000000 }; static const struct ov5645_mode_info ov5645_mode_info_data[] = { @@ -520,7 +520,7 @@ static const struct ov5645_mode_info ov5 .height = 960, .data = ov5645_setting_sxga, .data_size = ARRAY_SIZE(ov5645_setting_sxga), - .pixel_clock = 111440000, + .pixel_clock = 112000000, .link_freq = 0 /* an index in link_freq[] */ }, { @@ -528,7 +528,7 @@ static const struct ov5645_mode_info ov5 .height = 1080, .data = ov5645_setting_1080p, .data_size = ARRAY_SIZE(ov5645_setting_1080p), - .pixel_clock = 167160000, + .pixel_clock = 168000000, .link_freq = 1 /* an index in link_freq[] */ }, { @@ -536,7 +536,7 @@ static const struct ov5645_mode_info ov5 .height = 1944, .data = ov5645_setting_full, .data_size = ARRAY_SIZE(ov5645_setting_full), - .pixel_clock = 167160000, + .pixel_clock = 168000000, .link_freq = 1 /* an index in link_freq[] */ }, }; @@ -1157,7 +1157,8 @@ static int ov5645_probe(struct i2c_clien return ret; } - if (xclk_freq != 23880000) { + /* external clock must be 24MHz, allow 1% tolerance */ + if (xclk_freq < 23760000 || xclk_freq > 24240000) { dev_err(dev, "external clock frequency %u is not supported\n", xclk_freq); return -EINVAL;