From patchwork Mon Apr 6 16:42:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lad Prabhakar X-Patchwork-Id: 11475893 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9FCC0112C for ; Mon, 6 Apr 2020 16:46:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4377024998 for ; Mon, 6 Apr 2020 16:46:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o7vk1/7o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4377024998 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=8wXHblIpiFuugnpeF/AO9ZiWFZuwtIz3WZwMCmdllj8=; b=o7vk1/7ooBNpEeBg+o1brEvbzy /Vj+Qoyux6Rj2VpURkJD7E5ppFm/KvcsSA+XmTRiJKcphphXb3BVBxDXHp/GrcDl4eE3K0J4Co16O y0uMuDzI6DziXJ6gTd+D4kwd/aHxUA8YC3xrPe1BL6vgcVrwX0NF9jc51oSS5Q30p4biGivOfYgWd 791VLsU5z+eFpltokRalqFlmA1EUtYF204N5RUedy8V9GCOCZ6SaJwODM1up7cz6Byn2r5TdDkAxf 4ZxZ2Libo0ZFmasxE5/2yu/SylpmoBIiVi4Nw5W2AUtECOhjn5gpBaWLjV6iPbHXhMWwQh+9FfRkB QiNLtzvg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLUtC-0002JO-G5; Mon, 06 Apr 2020 16:46:22 +0000 Received: from relmlor1.renesas.com ([210.160.252.171] helo=relmlie5.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLUq5-0005Ls-EQ for linux-arm-kernel@lists.infradead.org; Mon, 06 Apr 2020 16:43:12 +0000 X-IronPort-AV: E=Sophos;i="5.72,351,1580742000"; d="scan'208";a="43857558" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 07 Apr 2020 01:43:07 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id C2C8C40061B6; Tue, 7 Apr 2020 01:43:03 +0900 (JST) From: Lad Prabhakar To: Laurent Pinchart , Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Kieran Bingham Subject: [PATCH v5 3/5] media: i2c: ov5645: Turn probe error into warning for xvclk frequency mismatch Date: Mon, 6 Apr 2020 17:42:39 +0100 Message-Id: <1586191361-16598-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586191361-16598-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <1586191361-16598-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200406_094309_610773_1378A5FF X-CRM114-Status: GOOD ( 10.02 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [210.160.252.171 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, Lad Prabhakar , Lad Prabhakar , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org PLL's on platforms might not be so accurate enough to generate the required clock frequency, so instead of erroring out on xvlck frequency mismatch just warn the user and continue ahead in probe. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven --- drivers/media/i2c/ov5645.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 52848fff8a08..314760349adf 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -1103,11 +1103,8 @@ static int ov5645_probe(struct i2c_client *client) } /* external clock must be 24MHz, allow 1% tolerance */ xclk_freq = clk_get_rate(ov5645->xclk); - if (xclk_freq < 23760000 || xclk_freq > 24240000) { - dev_err(dev, "external clock frequency %u is not supported\n", - xclk_freq); - return -EINVAL; - } + if (xclk_freq < 23760000 || xclk_freq > 24240000) + dev_warn(dev, "xvclk mismatched, modes are based on 24MHz\n"); for (i = 0; i < OV5645_NUM_SUPPLIES; i++) ov5645->supplies[i].supply = ov5645_supply_name[i];