Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2090965imm; Mon, 16 Jul 2018 01:54:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeoBnONOXlNwbxjxFI0OFxTqkUG68a4rRNWPm+0fqRzgWqohXF8NDVAxmiBRe4/2KIaJt29 X-Received: by 2002:a17:902:ab95:: with SMTP id f21-v6mr15490906plr.264.1531731266277; Mon, 16 Jul 2018 01:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531731266; cv=none; d=google.com; s=arc-20160816; b=QKpu83xPpl+s5Da7E73NjTvF5cqbDT5nwQFNiFPy5Hpsm0Nkqyttk+499qImYSQL+B o3tWsXfPyAklKmml3N5aZXvdwQIhg2Oq8IEQu9fSQlSP61kW6t88ZhLfCH/DZhw4vct8 aqYi+ziAXM5mHoQbvavVihdt1Y21JPXdwEWSL39s9ORCJqrQ2+AgceGZroLxZiFkL1WT Mjlk48r+pTf1pL4tkPYzeL+8JIqUc2JsF0rYBLw6qFAP7WgzsnStozdTC5+/xZHuLek6 HEFdcdDCoSr0AnyVYumQEor/bxDSH487lRDelUucpFNCd/kJwDnsa/oB9v+UPS7dH0Gw 42Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=EVUmlH6FS+z/wMuyx+xgPEK2M7zLF9DNYLfx4Gt3oAo=; b=dHbCFUABEcshiyBW8HxtKk6a1mHoHDX8QwVA3u0gRk2IGMooFXvOq2wS2YmgvGQINx wzX+/j++myEccVHn6Er/xXM+lx6QWCFgghOoA8aiXLzFQHrOlzHXWHAVf+czFmScwe+s gM2xx28JUUFjWVj8e4K/aJNTmglw/vfx7/hvWNWPl7VGXa/llMBJxk6zhTbbQop6GPKB dIZJUgYcOzeMb+fhRqr+DZsr5bwmf34oVv9I+vvTTOoIC+4wxYWgOFz6tdvXzpKHAjFn 77QTt/cjP2uiC9SqfbF1eo94z0YLLw24VyCEhtBzMeHkvji8Lm0hwoaUUPG4fTfD9HZW JmEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fx2GBp20; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y40-v6si30073313pla.470.2018.07.16.01.54.11; Mon, 16 Jul 2018 01:54:26 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=fx2GBp20; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731140AbeGPJTj (ORCPT + 99 others); Mon, 16 Jul 2018 05:19:39 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:36801 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729595AbeGPJTi (ORCPT ); Mon, 16 Jul 2018 05:19:38 -0400 Received: by mail-lj1-f196.google.com with SMTP id u7-v6so26602334lji.3 for ; Mon, 16 Jul 2018 01:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EVUmlH6FS+z/wMuyx+xgPEK2M7zLF9DNYLfx4Gt3oAo=; b=fx2GBp20YHA7DnrVBn0tlh+Jgw435cq40qcpnvIN8yIIwHwxARwjnV6HsieFMHpXZL KueQd3jrKJlHaWqoILPu7ewsnYFEuJxeQfXfH+lMRP9DLVWAbRqjqvcIckvrFa8PxWtP 5qXrDCcH8rof8+XRD87osjrn5gNAsVzbormao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EVUmlH6FS+z/wMuyx+xgPEK2M7zLF9DNYLfx4Gt3oAo=; b=DJJjEgz2Zx0Nu9+oAFrTrERqOUySpf9xItMIWYI7e3XvU/bTYNowkskvnKc2KF+W1c ZZvk/h+zvPJWalvpu10h1O58lf9sKzP3W32+s15Ah+eoDnsX/qfWqfj9dBrEXzvjwDut gOVIMSxhzWC6B9K+badnLOB0DsKVEWd/5X4XJX2bDiI9M4ujZ6hIX9TmZSowd8Dd0B7A LPjA1mb4m4LmUZx5YacayLiNgMoA6UzIL8Ka/uxY7SxabfsVRSaE7Z8nlWKNCIqeTS6E 1uT0yBK/yGjUAbgpwhs/o8mSjigi8WIwy9hqC6Xe7UG0qMdq3hlMF13V3a1LC9mJHUs3 PsSg== X-Gm-Message-State: AOUpUlHlGLAZaIn1sW4hXiWyM3BZgcUICF3H8kDD+OBp27b1c9xPoyRI QjzZ7QNpjBpC6BbBwOlJhhY5h0JQw2uj9lLH5KLZ2A== X-Received: by 2002:a2e:2b0e:: with SMTP id q14-v6mr9322441lje.147.1531731194201; Mon, 16 Jul 2018 01:53:14 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:d3cd:0:0:0:0:0 with HTTP; Mon, 16 Jul 2018 01:53:13 -0700 (PDT) In-Reply-To: <20180711160713.GA29354@rob-hp-laptop> References: <1530797585-8555-1-git-send-email-todor.tomov@linaro.org> <1530797585-8555-9-git-send-email-todor.tomov@linaro.org> <20180711160713.GA29354@rob-hp-laptop> From: Todor Tomov Date: Mon, 16 Jul 2018 11:53:13 +0300 Message-ID: Subject: Re: [PATCH v2 08/34] media: camss: Unify the clock names To: Rob Herring Cc: Mauro Carvalho Chehab , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Linux Media Mailing List , LKML , Mark Rutland , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Thank you for review. On 11 July 2018 at 19:07, Rob Herring wrote: > On Thu, Jul 05, 2018 at 04:32:39PM +0300, Todor Tomov wrote: >> Unify the clock names - use names closer to the clock >> definitions. > > Why? You can't just change names. You are breaking an ABI. Main reason is that this change allows more logical names and handling in the driver when support for 8996 is added. To clarify by example: - we used to have "camss_vfe_vfe" in 8916; - now we will have "vfe0" in 8916 and "vfe0" and "vfe1" in 8996. To achieve this I have changed the names to match more closely the definitions in the clock driver, which are based on the documentation. Yes, I should have done this the first time... I have used to update the dt and kernel code together. Yes, the change breaks the ABI but does this cause difficulties in practice? > >> >> CC: Rob Herring >> CC: Mark Rutland >> CC: devicetree@vger.kernel.org >> Signed-off-by: Todor Tomov >> --- >> .../devicetree/bindings/media/qcom,camss.txt | 24 +++++++++++----------- > > Bindings should be a separate patch. I can do that in the next version. Best regards, Todor > >> drivers/media/platform/qcom/camss/camss.c | 20 ++++++++---------- >> 2 files changed, 20 insertions(+), 24 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/media/qcom,camss.txt b/Documentation/devicetree/bindings/media/qcom,camss.txt >> index cadeceb..032e8ed 100644 >> --- a/Documentation/devicetree/bindings/media/qcom,camss.txt >> +++ b/Documentation/devicetree/bindings/media/qcom,camss.txt >> @@ -53,7 +53,7 @@ Qualcomm Camera Subsystem >> Usage: required >> Value type: >> Definition: Should contain the following entries: >> - - "camss_top_ahb" >> + - "top_ahb" >> - "ispif_ahb" >> - "csiphy0_timer" >> - "csiphy1_timer" >> @@ -67,11 +67,11 @@ Qualcomm Camera Subsystem >> - "csi1_phy" >> - "csi1_pix" >> - "csi1_rdi" >> - - "camss_ahb" >> - - "camss_vfe_vfe" >> - - "camss_csi_vfe" >> - - "iface" >> - - "bus" >> + - "ahb" >> + - "vfe0" >> + - "csi_vfe0" >> + - "vfe_ahb" >> + - "vfe_axi" >> - vdda-supply: >> Usage: required >> Value type: >> @@ -161,7 +161,7 @@ Qualcomm Camera Subsystem >> <&gcc GCC_CAMSS_CSI_VFE0_CLK>, >> <&gcc GCC_CAMSS_VFE_AHB_CLK>, >> <&gcc GCC_CAMSS_VFE_AXI_CLK>; >> - clock-names = "camss_top_ahb", >> + clock-names = "top_ahb", >> "ispif_ahb", >> "csiphy0_timer", >> "csiphy1_timer", >> @@ -175,11 +175,11 @@ Qualcomm Camera Subsystem >> "csi1_phy", >> "csi1_pix", >> "csi1_rdi", >> - "camss_ahb", >> - "camss_vfe_vfe", >> - "camss_csi_vfe", >> - "iface", >> - "bus"; >> + "ahb", >> + "vfe0", >> + "csi_vfe0", >> + "vfe_ahb", >> + "vfe_axi"; >> vdda-supply = <&pm8916_l2>; >> iommus = <&apps_iommu 3>; >> ports { >> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c >> index abf6184..0b663e0 100644 >> --- a/drivers/media/platform/qcom/camss/camss.c >> +++ b/drivers/media/platform/qcom/camss/camss.c >> @@ -32,8 +32,7 @@ static const struct resources csiphy_res[] = { >> /* CSIPHY0 */ >> { >> .regulator = { NULL }, >> - .clock = { "camss_top_ahb", "ispif_ahb", >> - "camss_ahb", "csiphy0_timer" }, >> + .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer" }, >> .clock_rate = { { 0 }, >> { 0 }, >> { 0 }, >> @@ -45,8 +44,7 @@ static const struct resources csiphy_res[] = { >> /* CSIPHY1 */ >> { >> .regulator = { NULL }, >> - .clock = { "camss_top_ahb", "ispif_ahb", >> - "camss_ahb", "csiphy1_timer" }, >> + .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy1_timer" }, >> .clock_rate = { { 0 }, >> { 0 }, >> { 0 }, >> @@ -60,8 +58,7 @@ static const struct resources csid_res[] = { >> /* CSID0 */ >> { >> .regulator = { "vdda" }, >> - .clock = { "camss_top_ahb", "ispif_ahb", >> - "csi0_ahb", "camss_ahb", >> + .clock = { "top_ahb", "ispif_ahb", "csi0_ahb", "ahb", >> "csi0", "csi0_phy", "csi0_pix", "csi0_rdi" }, >> .clock_rate = { { 0 }, >> { 0 }, >> @@ -78,8 +75,7 @@ static const struct resources csid_res[] = { >> /* CSID1 */ >> { >> .regulator = { "vdda" }, >> - .clock = { "camss_top_ahb", "ispif_ahb", >> - "csi1_ahb", "camss_ahb", >> + .clock = { "top_ahb", "ispif_ahb", "csi1_ahb", "ahb", >> "csi1", "csi1_phy", "csi1_pix", "csi1_rdi" }, >> .clock_rate = { { 0 }, >> { 0 }, >> @@ -96,10 +92,10 @@ static const struct resources csid_res[] = { >> >> static const struct resources_ispif ispif_res = { >> /* ISPIF */ >> - .clock = { "camss_top_ahb", "camss_ahb", "ispif_ahb", >> + .clock = { "top_ahb", "ahb", "ispif_ahb", >> "csi0", "csi0_pix", "csi0_rdi", >> "csi1", "csi1_pix", "csi1_rdi" }, >> - .clock_for_reset = { "camss_vfe_vfe", "camss_csi_vfe" }, >> + .clock_for_reset = { "vfe0", "csi_vfe0" }, >> .reg = { "ispif", "csi_clk_mux" }, >> .interrupt = "ispif" >> >> @@ -108,8 +104,8 @@ static const struct resources_ispif ispif_res = { >> static const struct resources vfe_res = { >> /* VFE0 */ >> .regulator = { NULL }, >> - .clock = { "camss_top_ahb", "camss_vfe_vfe", "camss_csi_vfe", >> - "iface", "bus", "camss_ahb" }, >> + .clock = { "top_ahb", "vfe0", "csi_vfe0", >> + "vfe_ahb", "vfe_axi", "ahb" }, >> .clock_rate = { { 0 }, >> { 50000000, 80000000, 100000000, 160000000, >> 177780000, 200000000, 266670000, 320000000, >> -- >> 2.7.4 >>