From mboxrd@z Thu Jan 1 00:00:00 1970 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=-11.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS 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 66DF9C43381 for ; Sat, 30 Mar 2019 10:34:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F186206DD for ; Sat, 30 Mar 2019 10:34:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ghprkQM7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730669AbfC3KeJ (ORCPT ); Sat, 30 Mar 2019 06:34:09 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38978 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730537AbfC3KeJ (ORCPT ); Sat, 30 Mar 2019 06:34:09 -0400 Received: by mail-lj1-f194.google.com with SMTP id l7so4067417ljg.6 for ; Sat, 30 Mar 2019 03:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AK9ulvhrHWHuiUQDm71QkSGuAhLhjrTyEHmX703MhLc=; b=ghprkQM7YX475q6wbQD/ML5WZwYI3H9WFmcmJ+9m8rBGzrAqf7lSUScVFcXgO22i15 WcnVGDFSNMltyZpGGLZhSCw0zNsGyILIEql0CLWe6pVQlS5bwxAheIMuZSvaFrn0/E4n 107KSCKf35ZNVqZI4BPL/FMLfE5DI5gOWm9D5jx+ATwZNrnCOTBzjrDFobgISOYnmli9 1fA1MjngjXA1CoOeSg4c+CoOlByQC8vYbZWgf3caUe2nTGB0X4uhb1wGNg5OsbkeWt6U cWswDdp3QlnjPZQ31qsYq40LTC2i5d9Z4D9CERfqPPSDuVK4SeSirtUMkduAuVAwX2qs 8z6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AK9ulvhrHWHuiUQDm71QkSGuAhLhjrTyEHmX703MhLc=; b=O9hSV2ZqCM3eSOGNb9WpMYDwLl/0MkPwJZrWcbRG+FaXREaeEGj/xstWOiz/zZ9NN2 kB3Qq3eTP+FQVCyfP9381Ga8Fn3iHZ0z/YMue1afxZmZwSBd13iKc13ynCT6fh/E2VC/ i18OD1L/rXCRGzAjVMINGCw8IXLZviCCFjO+5KbhXEHoWRWWjUrJ9ZL39f9yrHEaDEUk O82491DRI/DKw/HbOR1WPAyLd8aUjGIyxRgTCpHS7kART1EunL4haipXQkMVBubMUfEP NkR63JUfzCSKW6ZuUMMc05k8QStOXEyn8D+3Lak+oTr819aTxq1YeJTW+nGSDvp41vGC AxRg== X-Gm-Message-State: APjAAAXqPOOWKMSNrUmwO6+MPy4dISmutU6/qT+Ahxw0F/q3Lf1sPZXP j73BYUjIjdy1W4XtoqGerJ4= X-Google-Smtp-Source: APXvYqx2Q3x8WD/XEDa/UZCJ/Gd2oCX/ZXL+DbBt7FeJavQ8W0aGED1oSz/6+BEydXphVzfeXYkrXw== X-Received: by 2002:a2e:1508:: with SMTP id s8mr29880743ljd.8.1553942046727; Sat, 30 Mar 2019 03:34:06 -0700 (PDT) Received: from z50.localnet (109241207190.gdansk.vectranet.pl. [109.241.207.190]) by smtp.gmail.com with ESMTPSA id 1sm875148ljw.56.2019.03.30.03.34.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Mar 2019 03:34:06 -0700 (PDT) From: Janusz Krzysztofik To: Greg KH Cc: Sasha Levin , Hans Verkuil , stable@vger.kernel.org Subject: Re: [BACKPORT v3.18] media: ov6650: Fix sensor possibly not detected on probe Date: Sat, 30 Mar 2019 11:34:04 +0100 Message-ID: <2374702.APxR5SFRvj@z50> In-Reply-To: <20190330054712.GC23655@kroah.com> References: <20190329212005.6501-1-jmkrzyszt@gmail.com> <20190330054712.GC23655@kroah.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Hi Greg, On Saturday, March 30, 2019 6:47:12 AM CET Greg KH wrote: > On Fri, Mar 29, 2019 at 10:20:05PM +0100, Janusz Krzysztofik wrote: > > After removal of clock_start() from before soc_camera_init_i2c() in > > soc_camera_probe() by commit 9aea470b399d ("[media] soc-camera: switch > > I2C subdevice drivers to use v4l2-clk") introduced in v3.11, the ov6650 > > driver could no longer probe the sensor successfully because its clock > > was no longer turned on in advance. The issue was initially worked > > around by adding that missing clock_start() equivalent to OMAP1 camera > > interface driver - the only user of this sensor - but a propoer fix > > should be rather implemented in the sensor driver code itself. > > > > Fix the issue by inserting a delay between the clock is turned on and > > the sensor I2C registers are read for the first time. > > > > Fixes: 9aea470b399d ("[media] soc-camera: switch I2C subdevice drivers to use v4l2-clk") > > Signed-off-by: Janusz Krzysztofik > > Cc: stable@vger.kernel.org > > --- > > Rebased on 3.18, should apply cleanly on 4.4 and 4.9 as well. > > > > I dropped the comment on the patch being tested on an out of tree > > omap1_camera driver mainly because that driver is still in the tree > > in those kernel versions. > > > > drivers/media/i2c/soc_camera/ov6650.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/media/i2c/soc_camera/ov6650.c b/drivers/media/i2c/ soc_camera/ov6650.c > > index ab01598ec83f..c0e25bf55fb8 100644 > > --- a/drivers/media/i2c/soc_camera/ov6650.c > > +++ b/drivers/media/i2c/soc_camera/ov6650.c > > @@ -829,6 +829,8 @@ static int ov6650_video_probe(struct i2c_client *client) > > if (ret < 0) > > return ret; > > > > + msleep(20); > > + > > /* > > * check and show product ID and manufacturer ID > > */ > > What is the git commit id of this patch in Linus's tree? Not yet in Linus' tree, but already applied by Sakari Ailus in his https://git.linuxtv.org/sailus/media_tree.git/, id=cea17210dc0ee140289d900144662e70ea8aa623. FYI, I submitted this backport in order to address the following request from the following automated off-list response to my original submission (https://www.spinics.net/lists/stable/msg293064.html). > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag, > fixing commit: 9aea470b399d [media] soc-camera: switch I2C subdevice drivers to use v4l2-clk. > > The bot has tested the following trees: v5.0.4, v4.19.31, v4.14.108, v4.9.165, v4.4.177, v3.18.137. > > v5.0.4: Build OK! > v4.19.31: Build OK! > v4.14.108: Build OK! > v4.9.165: Failed to apply! Possible dependencies: > Unable to calculate > > v4.4.177: Failed to apply! Possible dependencies: > Unable to calculate > > v3.18.137: Failed to apply! Possible dependencies: > Unable to calculate > > > How should we proceed with this patch? The reason was the driver moved into a different directory in 4.14. Inspired by your request, I've just learned how such info on original commit should be included in the commit message. I can resend with that added as soon as the patch lands in Linus' tree if you wish. Thanks, Janusz