Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp12021315ybi; Fri, 26 Jul 2019 03:29:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuEJAA+ThGut5n+wgIyQtI+MLnJQdrnjy3B9DOaO2zOH2Px+tqUcfFCvhs22z8dFUi4Onx X-Received: by 2002:a63:d90f:: with SMTP id r15mr70742391pgg.259.1564136968375; Fri, 26 Jul 2019 03:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564136968; cv=none; d=google.com; s=arc-20160816; b=wF+u/Gtu8b4SloAybJVqEj7HI/K9eOJ7pZLCOqp+dC+uPj8tKqe/ebvLoi1rYIIl+V YnTze0fvx0dtVwQqdYFBx+9cxRyn1yrlJWK3FR9LzBBMl7Se0GyH2te5R1PuMAaTN+lF nrLRfa99Gh4MVLJRQZYhXJZZnRUD6RmeDyzOA50t04tGWWANQlGKI08uD5YOvFPEdI3D LykwO18oxYaLwwMwttw6Mx0ULg87E0Z49vmJ7Q+ycnWaX49CTVC1tAu0c/s/yhXGBGFk zRK2zwx0/UKoBKm2C8254jhUE19TAt+kYCzDky80wPCvc0d+jPA/fODclQMG7rjHThU4 0ArQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=PzjlKYE1qIEe+zKWFnMwDGXGnYev6skKpACtw6FQfYA=; b=EihFTsWWjXVReOKNVCVPjiMS0okRxeHzM/Bhzs7EOs9VwAD7vG1k5Aip5lTXy+MvP2 DdJSYBbgBiNQ6XwhIUYtBEgAq954bFKV7x89fl6MnQwIv6FoubrTwzJLKwrrn1ao5ABA Ih7MJHMgI+ZSSA0pdQipdCRAJsDrZEHPlTUfti/mZHrTJDO/6V7ELJ4WK8kBVfatBNQv sBUud7cgl0drNXVXUAMPoxUpa0kIMeiY7d0rnfcscrIKYU5UUCxCasrQtzguIvkXPsmC rCpdKY9NEVmvb2rkwxlZRpopZPBEYyGTRuf590H8bGuZqY9sN50THgtt0VRR/1XD271g sCpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=p+nKFgaF; 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 q10si20560202pgm.225.2019.07.26.03.29.13; Fri, 26 Jul 2019 03:29:28 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=p+nKFgaF; 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 S1726473AbfGZK2B (ORCPT + 99 others); Fri, 26 Jul 2019 06:28:01 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:38168 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbfGZK2B (ORCPT ); Fri, 26 Jul 2019 06:28:01 -0400 Received: by mail-io1-f66.google.com with SMTP id j6so28581312ioa.5 for ; Fri, 26 Jul 2019 03:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=PzjlKYE1qIEe+zKWFnMwDGXGnYev6skKpACtw6FQfYA=; b=p+nKFgaFf1tHT5RNgpYZWcBsVVbiRzd9FTC6bAefOmIFtOJykeCT870R0C3ufGn4vc PWNSHa9kupTBucYBi70mlGlMiWsQwW88AcJuMNi5mjP54uMz6VZTDvOW5gQB50uT826R /3jc+gCyD43CXmaYBm+H1J6xVxPIKxZljbTPKqfSqimsMLP1H/7mnErn8M/dO8XfkwBs Y8w+IWSRvxAAfKb+sUeug4rr67gfH28OOcUOArjUBaDPMDvrVhBHZHe4UYjco91heF+s t/WQTFMrSsSh695Tzti0YJ2GBXe7DRanAgzk+m0sBiPGcJrsR60z20QSPaumVw4KZ0cp y5Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PzjlKYE1qIEe+zKWFnMwDGXGnYev6skKpACtw6FQfYA=; b=US1JdokARizKspGAPLGw6zywLskFYqJsu6/lzmwSYfqIEQjzlN8uj6fx0RgN7i7Sdx 7sJbwkWQ+jL83O9Xfv6rf45uPaCAVHUxqQrGlmVUvBc4sGuA/D5tqMCiyfnI+zg9aUAq 3KXLx5u7DjcXWrX1F8QQosefBn9sMRooY0C0V4/johcbsepTz8bNH0XaAiMv+nnBeeQ3 tWAu76iaaNFXeIF0zXdz8ECkfayFlJdLSh008ZI0uyDQ0BRj0wLUQUidkvhdPWx9emTi sD5ZJs6B5Ym9CdSv4v43G1Gx30YeNu1Epp4pEUyDO0XQupF63FT9sfV6nr8CEBEwfAdy yfFA== X-Gm-Message-State: APjAAAX5UjQyXMt981x6dYfSmMM7tqnE+gUcKh9IAn7iX2JW6KnypXc5 st9F5voOK4YVjobmjDADfDZ7nifnqTfcQZ1HizB9XFsTLVg= X-Received: by 2002:a5d:8e08:: with SMTP id e8mr7172969iod.139.1564136880220; Fri, 26 Jul 2019 03:28:00 -0700 (PDT) MIME-Version: 1.0 References: <20190722095425.14193-1-amergnat@baylibre.com> <20190722095425.14193-4-amergnat@baylibre.com> <1j5znqxj74.fsf@starbuckisacylon.baylibre.com> In-Reply-To: From: Alexandre Mergnat Date: Fri, 26 Jul 2019 12:27:48 +0200 Message-ID: Subject: Re: [PATCH 3/8] clk: meson: gxbb: migrate to the new parent description method To: Chen-Yu Tsai Cc: Jerome Brunet , Neil Armstrong , Stephen Boyd , Kevin Hilman , linux-kernel , baylibre-upstreaming@groups.io, "open list:ARM/Amlogic Meson..." , linux-clk , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le jeu. 25 juil. 2019 =C3=A0 19:09, Chen-Yu Tsai a =C3=A9= crit : > > On Thu, Jul 25, 2019 at 10:50 PM Jerome Brunet wro= te: > > > > On Mon 22 Jul 2019 at 11:54, Alexandre Mergnat = wrote: > > > > > > > @@ -1592,13 +1737,29 @@ static struct clk_regmap gxbb_vid_pll_div =3D= { > > > .hw.init =3D &(struct clk_init_data) { > > > .name =3D "vid_pll_div", > > > .ops =3D &meson_vid_pll_div_ro_ops, > > > - .parent_names =3D (const char *[]){ "hdmi_pll" }, > > > + .parent_data =3D &(const struct clk_parent_data) { > > > + /* > > > + * This clock is declared here for GXL and GXBB= SoC, so > > > + * we must use string name to set this parent t= o avoid > > > + * pointer issue. > > > + */ > > > > I don't really get the issue with this comment. > > > > How about: > > > > /* > > * Note: > > * gxl and gxbb have different hdmi_plls (with different struct clk_hw)= . > > * We fallback to the global naming string mechanism so vid_pll_div pic= ks > > * up the appropriate one. > > */ > > If you're sticking to global names for now, you could just skip convertin= g > this clock altogether. I suspect .parent_names will be around for some ti= me. I prefer to perform a complete migration because it is possible that .parent_names becomes deprecated one day. I think it's cleaner to do it one shot and avoid keeping redundant structure with the new one. > > On the other hand, if you really want to get rid of global clock name bas= ed > parenting, you could use clk_hw pointers, and have the probe function fix > up this one based on the compatible string. That's what I did. Sounds good, may I have the commit or file which is implement this please? I wonder if it worth to add complexity in probe instead of using a dedicate= d field in .parent_data for string name. I guess that depend on the complexit= y done in probe. > > Just my two cents. > > ChenYu > > > > + .name =3D "hdmi_pll", > > > + .index =3D -1, > > > + }, > > > .num_parents =3D 1, > > > .flags =3D CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE, > > > }, > > > }; > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel