Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3558476ybt; Tue, 23 Jun 2020 05:28:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7VuFzm6L8sBg6HChK3zqsX1hqhP+cGqTuAq2voIYlE5qR5/5cJCioCqbPmVlUVeMdfPqb X-Received: by 2002:a05:6402:1c8f:: with SMTP id cy15mr11718942edb.308.1592915295180; Tue, 23 Jun 2020 05:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592915295; cv=none; d=google.com; s=arc-20160816; b=bcSo6wMFe/l5e+NMADc8yAwYnjlDaA7epTcGMLlHaEgEqmbQX++VfRhD7geob+BwPv Q97citBp4yLEi9dXKmnQilRJ+0zFc7EkPKLJjT57LP8Rtq44crhsyWsUC0NRTyBtBOpE wbuXqp0vnGsDKo0c7i8o4sYGtNhMQLZ+lh2CvJpiW/3wancTDHHLZ+OK+bsyLCWRUUhS yt8Lc3A+WnThTK/MZPA3wRnPoTlWcFuHsr/AId3pKDa4mvriadB7sknYsoMRGFxbXA1d hXjiM6Xc1CpsrzDjg1LAqQyhaCxdNcp28ebn6i+DmU9O54+M5CeAjeqTvg3MkSQqyXvP dWSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/H1VjLHXrslFWAfS++2dUc+Db65qaCPWTaC+ZVW/b1k=; b=k6mk7MGxyV8ht50xCY1xCh3YECttTso1g0sNP7h/vqJKK8qKmHkxY1Vs1irENVl3EC wQdoDpll0xO3JyheektwuNDaj9ACmQwXCWOjdYjClG/0MXbteGPiIz0HSpaLk0L+gIwA /6bN02K76wd6DK6BdNRVrl9ZNIvEIMfit4MCzkOBWldFMvy28KXGoWjVC9Y0GyK01mIm +rHv6kF4+OgW0kSp/y2gqCS5AWy7pZn7PpiAIZorMagZHEGaZ3EDDR5vcaFolwnBnW6n JF5tNoV/5W1kqXNdZW995sjC74u+Bp4JStG9Hq9FpsweMPPBC2PV/kL3D/raxV43hYYg 9dUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 36si12242813edp.290.2020.06.23.05.27.51; Tue, 23 Jun 2020 05:28:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732581AbgFWM0B (ORCPT + 99 others); Tue, 23 Jun 2020 08:26:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732478AbgFWM0A (ORCPT ); Tue, 23 Jun 2020 08:26:00 -0400 Received: from hillosipuli.retiisi.org.uk (hillosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::81:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 344D5C061573; Tue, 23 Jun 2020 05:26:00 -0700 (PDT) Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id C5559634C87; Tue, 23 Jun 2020 15:25:36 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1jnhzc-00016j-NF; Tue, 23 Jun 2020 15:25:36 +0300 Date: Tue, 23 Jun 2020 15:25:36 +0300 From: Sakari Ailus To: Andrey Konovalov Cc: mchehab@kernel.org, manivannan.sadhasivam@linaro.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, c.barrett@framos.com, a.brela@framos.com, peter.griffin@linaro.org Subject: Re: [PATCH v5 06/10] media: i2c: imx290: Add support for test pattern generation Message-ID: <20200623122536.GE870@valkosipuli.retiisi.org.uk> References: <20200612135355.30286-1-andrey.konovalov@linaro.org> <20200612135355.30286-7-andrey.konovalov@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200612135355.30286-7-andrey.konovalov@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrey, On Fri, Jun 12, 2020 at 04:53:51PM +0300, Andrey Konovalov wrote: ... > @@ -448,6 +466,22 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl) > case V4L2_CID_GAIN: > ret = imx290_set_gain(imx290, ctrl->val); > break; > + case V4L2_CID_TEST_PATTERN: > + if (ctrl->val) { > + imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x00); > + imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00); > + msleep(10); > + imx290_write_reg(imx290, IMX290_PGCTRL, > + (u8)(IMX290_PGCTRL_REGEN | > + IMX290_PGCTRL_THRU | > + IMX290_PGCTRL_MODE(ctrl->val))); > + } else { > + imx290_write_reg(imx290, IMX290_PGCTRL, 0x00); > + msleep(10); > + imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x3c); > + imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00); > + } > + break; > default: > ret = -EINVAL; > break; I've merged the patches in my tree. Could you still replace msleep() with less than 20 ms with usleep_range() usage as a follow-up patch on top of these, please? -- Kind regards, Sakari Ailus