From patchwork Wed Sep 26 09:47:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 14656 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TGoEE-0006SR-Cv for patchwork@linuxtv.org; Wed, 26 Sep 2012 11:48:26 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp for id 1TGoED-0004bf-G6; Wed, 26 Sep 2012 11:48:26 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754445Ab2IZJsX (ORCPT ); Wed, 26 Sep 2012 05:48:23 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:53226 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754306Ab2IZJsV (ORCPT ); Wed, 26 Sep 2012 05:48:21 -0400 Received: by mail-wg0-f44.google.com with SMTP id dr13so357301wgb.1 for ; Wed, 26 Sep 2012 02:48:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=+s442azVv3RAWrw7VOk6ON9+v0ZkgPN7fo5m7KSeJOo=; b=ZOL1crwRGydEUXYjHJufwZcxD1TYT2s5ISTIgCNRYVsXwcWupsNdFJDhPigBZHPRzC PnHR9Y9kDQITBTUL+sgyTuzxKu255QrTnYHHcqRNeMmI2u2LmPnHN2AAA2qdliDkru9E MMxOsmdJkzcGUz/L1bS2MD+OoJZEfQSQ1WLZ3Ct9Ln8t0c31VCA4xTDpl9YU/y1SdKRk p82pI+6xeq4Jz0Q0YJk/pxbizqVR17Ci5nnqQulGg7bsX1Rw7yMMlhoWLeeY4jUOVcRb JSfSYjASCqyBGkm6OZ1hnDnJ20nSgfAt4NpDFcaC8jFEdpP6o6WmqMm3XSkeoOsI+Yzq LEzw== Received: by 10.180.8.41 with SMTP id o9mr129664wia.3.1348652900363; Wed, 26 Sep 2012 02:48:20 -0700 (PDT) Received: from piscis.vsilicon.net (122.251.106.212.dynamic.jazztel.es. [212.106.251.122]) by mx.google.com with ESMTPS id bn7sm5826230wib.8.2012.09.26.02.48.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Sep 2012 02:48:19 -0700 (PDT) From: Javier Martin To: linux-media@vger.kernel.org Cc: corbet@lwn.net, mchehab@infradead.org, hverkuil@xs4all.nl, Javier Martin Subject: [PATCH 5/5] media: ov7670: Add possibility to disable pixclk during hblank. Date: Wed, 26 Sep 2012 11:47:57 +0200 Message-Id: <1348652877-25816-6-git-send-email-javier.martin@vista-silicon.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348652877-25816-1-git-send-email-javier.martin@vista-silicon.com> References: <1348652877-25816-1-git-send-email-javier.martin@vista-silicon.com> X-Gm-Message-State: ALoCoQmylMBWRAe140marWZkjR4ofqH6MCtC0fA2LVm4AHp6/LkGstzjap4OY8BQIcu3wenUHMrJ Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.9.26.93316 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1700_1799 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_POSSIBLE_EXPLOIT_SUBJ 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' Signed-off-by: Javier Martin Acked-by: Jonathan Corbet --- drivers/media/i2c/ov7670.c | 8 ++++++++ include/media/ov7670.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 54fb535..f7e4341 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -211,6 +211,7 @@ struct ov7670_info { u8 clkrc; /* Clock divider value */ bool use_smbus; /* Use smbus I/O instead of I2C */ bool pll_bypass; + bool pclk_hb_disable; enum ov7670_model model; }; @@ -1709,6 +1710,9 @@ static int ov7670_probe(struct i2c_client *client, if (config->pll_bypass && id->driver_data != MODEL_OV7670) info->pll_bypass = true; + + if (config->pclk_hb_disable) + info->pclk_hb_disable = true; } /* Make sure it's an ov7670 */ @@ -1735,6 +1739,10 @@ static int ov7670_probe(struct i2c_client *client, tpf.denominator = 30; ov7670_set_framerate(sd, &tpf); } + + if (info->pclk_hb_disable) + ov7670_write(sd, REG_COM10, COM10_PCLK_HB); + return 0; } diff --git a/include/media/ov7670.h b/include/media/ov7670.h index a68c8bb..1913d51 100644 --- a/include/media/ov7670.h +++ b/include/media/ov7670.h @@ -16,6 +16,7 @@ struct ov7670_config { int clock_speed; /* External clock speed (MHz) */ bool use_smbus; /* Use smbus I/O instead of I2C */ bool pll_bypass; /* Choose whether to bypass the PLL */ + bool pclk_hb_disable; /* Disable toggling pixclk during horizontal blanking */ }; #endif