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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 DF5F4C43441 for ; Wed, 21 Nov 2018 10:30:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A877021104 for ; Wed, 21 Nov 2018 10:30:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Et8kfuCK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A877021104 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729333AbeKUVEP (ORCPT ); Wed, 21 Nov 2018 16:04:15 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:58642 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbeKUVEO (ORCPT ); Wed, 21 Nov 2018 16:04:14 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id wALATpFL126442; Wed, 21 Nov 2018 04:29:51 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1542796191; bh=v/rvPAJjz44xlbwLheWTq59qwgrFq2x14lGMzqgtPTk=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=Et8kfuCKjGtRqXYf8NGTGQXkrnTqy5SYEUdzvAPz/DWSZ0YCh9wQUOzw9ZZL37Qh7 PuvHyxbxvuJLK1AviFDoTgy9gb5jax02IfBnwSb4JBQQW3WpBeFEcgPPlzK+p6K34H phTqLItugrIsTqXSeYshH8eahYzo2fz1iChylP8c= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wALATpuD026206 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Nov 2018 04:29:51 -0600 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 21 Nov 2018 04:29:50 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Wed, 21 Nov 2018 04:29:50 -0600 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wALATk7p005855; Wed, 21 Nov 2018 04:29:47 -0600 Subject: Re: [PATCH v2 8/9] phy: Add Cadence D-PHY support To: Maxime Ripard CC: Boris Brezillon , Thomas Petazzoni , Laurent Pinchart , , Archit Taneja , Andrzej Hajda , Chen-Yu Tsai , , , , Krzysztof Witos , Rafal Ciepiela References: <4ec9e47fb5aa9794f69a8e75a04108055094c056.1541516029.git-series.maxime.ripard@bootlin.com> <5f5bcc06-51b2-d565-56a0-083c66c1f01a@ti.com> <8536050b-40ab-1ec4-d325-e59bb3a92e73@ti.com> <20181121101121.7rhe2hz2mnmc72cu@flea> From: Kishon Vijay Abraham I Message-ID: <20c0fd85-95f6-9849-c10b-998a1e0f527d@ti.com> Date: Wed, 21 Nov 2018 15:59:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181121101121.7rhe2hz2mnmc72cu@flea> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime, On 21/11/18 3:41 PM, Maxime Ripard wrote: > Hi Kishon, > > On Tue, Nov 20, 2018 at 11:02:34AM +0530, Kishon Vijay Abraham I wrote: >>>> +static int cdns_dphy_config_from_opts(struct phy *phy, >>>> + struct phy_configure_opts_mipi_dphy *opts, >>>> + struct cdns_dphy_cfg *cfg) >>>> +{ >>>> + struct cdns_dphy *dphy = phy_get_drvdata(phy); >>>> + unsigned int dsi_hfp_ext = 0; >>>> + int ret; >>>> + >>>> + ret = phy_mipi_dphy_config_validate(opts); >>>> + if (ret) >>>> + return ret; >>>> + >>>> + ret = cdns_dsi_get_dphy_pll_cfg(dphy, cfg, >>>> + opts, &dsi_hfp_ext); >>>> + if (ret) >>>> + return ret; >>>> + >>>> + opts->wakeup = cdns_dphy_get_wakeup_time_ns(dphy); >> >> Is the wakeup populated here used by the consumer driver? > > It's supposed to, if it can yes. But I guess right now it's not using. I'm thinking the usefulness of validate callback (only from this series point of view). Why should a consumer driver invoke validate if it doesn't intend to configure the PHY? The 3 steps required are * The consumer driver gets the default config * The consumer driver changes some of the configuration and * The consumer driver invokes phy configure callback. phy_configure anyways can validate the config before actually configuring the phy. Thanks Kishon