Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6370853imu; Mon, 21 Jan 2019 07:48:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN44cAdKslomC5lgbnV3zf8B6KERTI5V3p4gn/K8Vzx+cjR7iRAqGhE/kuYDQGO+00tcRGKo X-Received: by 2002:a63:d34a:: with SMTP id u10mr28916829pgi.301.1548085682679; Mon, 21 Jan 2019 07:48:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548085682; cv=none; d=google.com; s=arc-20160816; b=M2fEMNXlHiQMST4FYGAmQc7q48cLELxqIRmZclb0w1C12poIjPVAjUT9mRDa0MVbsT oUae8Pz4DawEMnDiiiWgT4K+n50BSPOQ6YNCygchL38KWVuHaQcmS3qbE5zWm/xXKEBa eLt0suQi2EAXjDzRKIfrQE/PojnzwMl6TbCpWLzfQOAPBEnInpRS9ZsyD7zcSeYtf4Ue MBbk+QhR3KyV0qe3Z0ap3uGR+XlUQg7XEaoz+qCHSl9b1/W0EGyM8EJ4rf9uoagp+yCN p3JluILin7VcnBfdwGehH/cQ4i1APAePoOPph1BQA92ha7zJyPQTwd6lfoUfaiVl5kl8 Ld0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=T9V8K+WybImiY+DOK5QsEwgCa4gTpVoNiecdegPcnPA=; b=CqEf72MUhKt7ClQCcSl95x3vbIjQLvZ4h322fcECDbqWx1K5uls0ffCLLYEnwryJtv 1FaQf8K6L6U3JONxIWWC7owasigSMaGLAgUneG3wcLRVc53i4Ao87Y/sEF9dkbKaJGbY 8T8R02c6Fe+d6mJ8Xr1bkt5FiMTtcvXsw65C6QHLZZVH32herLdJgXwriLg0HrO9lm4y Wf0OcAgZzWV7GBoC1KiUi05fP4AUhRF8Acc1ctZM+bMVeBef3f01bNlko9fNlLFpw+7S vu1oe9Q7Kw9Gkf4XaqQh1YD3QbgyGPMrhzGT4xwuUCyIAlRILgmae16ogoMJVKEJ1YXg epRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si4575129pgh.196.2019.01.21.07.47.47; Mon, 21 Jan 2019 07:48:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730624AbfAUPqP (ORCPT + 99 others); Mon, 21 Jan 2019 10:46:15 -0500 Received: from mail.bootlin.com ([62.4.15.54]:32903 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730567AbfAUPqN (ORCPT ); Mon, 21 Jan 2019 10:46:13 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id A9AA4209EF; Mon, 21 Jan 2019 16:46:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost (unknown [185.94.189.187]) by mail.bootlin.com (Postfix) with ESMTPSA id AF4BC20C04; Mon, 21 Jan 2019 16:45:56 +0100 (CET) From: Maxime Ripard To: Kishon Vijay Abraham I Cc: Thomas Petazzoni , Laurent Pinchart , linux-media@vger.kernel.org, Archit Taneja , Andrzej Hajda , Chen-Yu Tsai , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Krzysztof Witos , Rafal Ciepiela , Maarten Lankhorst , Sean Paul , Maxime Ripard , Sakari Ailus , Sakari Ailus Subject: [PATCH v5 2/9] phy: dphy: Change units of wakeup and init parameters Date: Mon, 21 Jan 2019 16:45:47 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Init and wakeup D-PHY parameters are in the micro/milliseconds range, putting the values real close to the types limits if they were in picoseconds. Move them to microseconds which should be better fit. Suggested-by: Sakari Ailus Acked-by: Sakari Ailus Signed-off-by: Maxime Ripard --- drivers/phy/phy-core-mipi-dphy.c | 8 ++++---- include/linux/phy/phy-mipi-dphy.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/phy/phy-core-mipi-dphy.c b/drivers/phy/phy-core-mipi-dphy.c index 465fa1b91a5f..14e0551cd319 100644 --- a/drivers/phy/phy-core-mipi-dphy.c +++ b/drivers/phy/phy-core-mipi-dphy.c @@ -65,12 +65,12 @@ int phy_mipi_dphy_get_default_config(unsigned long pixel_clock, */ cfg->hs_trail = max(4 * 8 * ui, 60000 + 4 * 4 * ui); - cfg->init = 100000000; + cfg->init = 100; cfg->lpx = 60000; cfg->ta_get = 5 * cfg->lpx; cfg->ta_go = 4 * cfg->lpx; cfg->ta_sure = 2 * cfg->lpx; - cfg->wakeup = 1000000000; + cfg->wakeup = 1000; cfg->hs_clk_rate = hs_clk_rate; cfg->lanes = lanes; @@ -143,7 +143,7 @@ int phy_mipi_dphy_config_validate(struct phy_configure_opts_mipi_dphy *cfg) if (cfg->hs_trail < max(8 * ui, 60000 + 4 * ui)) return -EINVAL; - if (cfg->init < 100000000) + if (cfg->init < 100) return -EINVAL; if (cfg->lpx < 50000) @@ -158,7 +158,7 @@ int phy_mipi_dphy_config_validate(struct phy_configure_opts_mipi_dphy *cfg) if (cfg->ta_sure < cfg->lpx || cfg->ta_sure > (2 * cfg->lpx)) return -EINVAL; - if (cfg->wakeup < 1000000000) + if (cfg->wakeup < 1000) return -EINVAL; return 0; diff --git a/include/linux/phy/phy-mipi-dphy.h b/include/linux/phy/phy-mipi-dphy.h index 9cf97cd1d303..627d28080d3a 100644 --- a/include/linux/phy/phy-mipi-dphy.h +++ b/include/linux/phy/phy-mipi-dphy.h @@ -190,10 +190,10 @@ struct phy_configure_opts_mipi_dphy { /** * @init: * - * Time, in picoseconds for the initialization period to + * Time, in microseconds for the initialization period to * complete. * - * Minimum value: 100000000 ps + * Minimum value: 100 us */ unsigned int init; @@ -244,11 +244,11 @@ struct phy_configure_opts_mipi_dphy { /** * @wakeup: * - * Time, in picoseconds, that a transmitter drives a Mark-1 + * Time, in microseconds, that a transmitter drives a Mark-1 * state prior to a Stop state in order to initiate an exit * from ULPS. * - * Minimum value: 1000000000 ps + * Minimum value: 1000 us */ unsigned int wakeup; -- git-series 0.9.1