From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751531AbcEJF00 (ORCPT ); Tue, 10 May 2016 01:26:26 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:55555 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbcEJF0Y (ORCPT ); Tue, 10 May 2016 01:26:24 -0400 X-AuditID: cbfec7f4-f796c6d000001486-ad-573170fdc619 Subject: Re: [PATCH v2 04/22] clk: samsung: exynos5410: Provide fin_pll external fixed clock To: Javier Martinez Canillas , Kukjin Kim , Krzysztof Kozlowski , Sylwester Nawrocki , Tomasz Figa , Michael Turquette , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org References: <1462734367-5619-1-git-send-email-krzk@kernel.org> <1462734367-5619-5-git-send-email-krzk@kernel.org> From: Krzysztof Kozlowski Message-id: <573170FB.4010808@kernel.org> Date: Tue, 10 May 2016 07:26:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMLMWRmVeSWpSXmKPExsVy+t/xy7p/CwzDDXofsFjMP3KO1eLN2zVM Fq9fGFr0P37NbLHp8TVWi48991gtLu+aw2Yx4/w+JouLp1wtDr9pZ7X4caabxWLVrj+MDjwe 72+0sntc7utl8tg56y67x6ZVnWwem5fUe2zpB/L6tqxi9Pi8SS6AI4rLJiU1J7MstUjfLoEr 4/yx/UwF2/gqrv76y9TAeJm7i5GTQ0LARGLnl3vMELaYxIV769m6GLk4hASWMkrcanjJCuE8 Y5T4svsoK0iVsECcxKGGPiaQhIjAZWaJWfffMIIkhATWMEo8/uTRxcjBwSagLfFvSzFImFdA U+LtuddgvSwCqhKXZt1kA7FFBSIkVq+7xgxRIyjxY/I9FhCbU8BZ4vqku0wgY5gF9CTuX9QC CTMLyEtsXvOWeQIj/ywkHbMQqmYhqVrAyLyKUTS1NLmgOCk911CvODG3uDQvXS85P3cTIyQq vuxgXHzM6hCjAAejEg/vDi7DcCHWxLLiytxDjBIczEoivGI5QCHelMTKqtSi/Pii0pzU4kOM 0hwsSuK8c3e9DxESSE8sSc1OTS1ILYLJMnFwSjUwakVVv/g+x+rWfNfNXm0iJfoGsU/0/9en HIwpLnj+e4VEasPxvMA3cVPe91wSnD4/65liOJM+D6NHj4Phw2wBtgsMbuUyl/m+RPFOjfS/ npQz2fvV3q/3dR36F02Q257S+mrljaQfk+qS/xSLnLpWvb3uFqPKlwrLmPN7c68x8Ltc6WT3 09ioxFKckWioxVxUnAgAsMNlcoYCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/2016 10:19 PM, Javier Martinez Canillas wrote: > Hello Krzysztof, > > On 05/08/2016 03:05 PM, Krzysztof Kozlowski wrote: >> Just like clock driver for Exynos542x/5800, provide the fixed clock here >> so the clock bindings and their consumers would be consistent and >> similar. >> >> However a clock named "fin_pll" is already provided by generic >> fixed-clock and it is both referenced in the clock driver (by name) and >> in DT (by phandle). To make the transition smooth, first introduce the >> new external fixed clock here under temporary, different name and switch >> internal users to it. >> >> Signed-off-by: Krzysztof Kozlowski >> --- > > [snip] > >> >> +/* Same as in Exynos5420 */ >> +static const struct of_device_id ext_clk_match[] __initconst = { >> + { .compatible = "samsung,exynos5420-oscclk", .data = (void *)0, }, > > Since using designated initializers, I was about to say that there is no need > to explicitly set .data to 0 since omitted fields are implicitly initialized... > >> + { }, >> +}; >> + >> /* register exynos5410 clocks */ >> static void __init exynos5410_clk_init(struct device_node *np) >> { >> @@ -192,6 +204,10 @@ static void __init exynos5410_clk_init(struct device_node *np) >> >> ctx = samsung_clk_init(np, reg_base, CLK_NR_CLKS); >> >> + samsung_clk_of_register_fixed_ext(ctx, exynos5x_fixed_rate_ext_clks, >> + ARRAY_SIZE(exynos5x_fixed_rate_ext_clks), >> + ext_clk_match); >> + > > ... but then I noticed that .data is used as exynos5x_fixed_rate_ext_clks > array index in samsung_clk_of_register_fixed_ext(). So makes sense to set > it explicitly to make the intent clear. Yes, that is the intention here. The '(void *)0' is a hint that clock needs frequency from DT. Thanks for review, Krzysztof