From patchwork Wed Apr 9 19:25:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 3957331 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 17468BFF02 for ; Wed, 9 Apr 2014 19:26:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6152D206B1 for ; Wed, 9 Apr 2014 19:26:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 740B220166 for ; Wed, 9 Apr 2014 19:26:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934350AbaDITZy (ORCPT ); Wed, 9 Apr 2014 15:25:54 -0400 Received: from mga01.intel.com ([192.55.52.88]:50025 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934335AbaDITZA (ORCPT ); Wed, 9 Apr 2014 15:25:00 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 09 Apr 2014 12:24:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,828,1389772800"; d="scan'208";a="517739167" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga002.fm.intel.com with ESMTP; 09 Apr 2014 12:24:55 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id CC31720DF4 for ; Wed, 9 Apr 2014 22:24:54 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id 89ECF20133; Wed, 9 Apr 2014 22:25:16 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [PATCH 13/17] smiapp-pll: Add pixel rate in pixel array as output parameters Date: Wed, 9 Apr 2014 22:25:05 +0300 Message-Id: <1397071509-2071-14-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1397071509-2071-1-git-send-email-sakari.ailus@linux.intel.com> References: <1397071509-2071-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The actual pixel array pixel rate may be something else than vt_pix_clk_freq on some implementations. Add a new field which contains the corrected value. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp-pll.c | 1 + drivers/media/i2c/smiapp-pll.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/media/i2c/smiapp-pll.c b/drivers/media/i2c/smiapp-pll.c index 9d06a33..a83597e 100644 --- a/drivers/media/i2c/smiapp-pll.c +++ b/drivers/media/i2c/smiapp-pll.c @@ -334,6 +334,7 @@ static int __smiapp_pll_calculate(struct device *dev, pll->pixel_rate_csi = pll->op_pix_clk_freq_hz * lane_op_clock_ratio; + pll->pixel_rate_pixel_array = pll->vt_pix_clk_freq_hz; rval = bounds_check(dev, pll->pll_ip_clk_freq_hz, limits->min_pll_ip_freq_hz, diff --git a/drivers/media/i2c/smiapp-pll.h b/drivers/media/i2c/smiapp-pll.h index 02d11db..c6ad809 100644 --- a/drivers/media/i2c/smiapp-pll.h +++ b/drivers/media/i2c/smiapp-pll.h @@ -75,6 +75,7 @@ struct smiapp_pll { uint32_t vt_pix_clk_freq_hz; uint32_t pixel_rate_csi; + uint32_t pixel_rate_pixel_array; }; struct smiapp_pll_branch_limits {