Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11170538ybi; Thu, 25 Jul 2019 11:11:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMjQybEzJORBiqePHPiTb+8b/9gjVn886EkKl5Q5ACHhWFfKTDKR5mWii98pVNc9/dP8Ml X-Received: by 2002:a17:902:9a82:: with SMTP id w2mr91419750plp.291.1564078313572; Thu, 25 Jul 2019 11:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564078313; cv=none; d=google.com; s=arc-20160816; b=Z7svfQmWuQpqSN3n8NtFne0hTGt9eFU/8uTlzv6dsQZQFaspP2fvaLpuRYR7jdFw7A b1SCSyFABNXsxGoi4SrO9SDb8i8G+s5IGxxbHf8eThMTi/d+wJ9/yAUq2xxwjBAAfEDK 4sb+jQJWznSOgtC9coeq80nIzKSSbAU9Gk8awlAv872wvEJtoJeDHKd8fhf6peK6sWZz W1/XDIpN53y1Hd/I/lmLUp1IbwmS57tf8bQ7t26g2YxQd6Sz42L+JXMLMEmFZ5Bp/FVi iGioOlCPT3vh0LdjS88OvR3Kv8NnB7Fbk45VY3VErp9Se8rwd++ELc3U6T3IsuLRQtO1 iG4Q== 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 :in-reply-to:references:mime-version:dkim-signature; bh=DijD23JRgZq39AFK00nMynhKIPEyI+PTBCKIxUfaqqw=; b=QeO9cTiFG0dqxvws98KZgxZY7mfSs70o+moD4G48NQMBrvb+wlve16IdCSZwUecvZ3 dteBp6ImUKmze73mUHlamOfdN5L9bXZfKMtM64IAWFsa2gFMtNzz6Yi7IlzCbaHAbDIN l6vW05w9KlsJcDgVI2F4hLAU8UxT/664BLRtZSap37VlkzRycB24chVoQWAuGalEEKsK nOL5iOAKJP0ydGi8RFe2ICksKFqh3PkfWU1KJXac8i37HD/KmICZcRQseQKyrUBqWbXe 7eH08lBpqZimhqkQnRC8jT/FIrf0sfMPXrHHWjU5dVMR7VuC8PZNX+vnfUF5XES3oJ6U SGTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V2kS5kGz; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r185si16622689pgr.506.2019.07.25.11.11.38; Thu, 25 Jul 2019 11:11:53 -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=@kernel.org header.s=default header.b=V2kS5kGz; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388835AbfGYRJf (ORCPT + 99 others); Thu, 25 Jul 2019 13:09:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:36796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388559AbfGYRJf (ORCPT ); Thu, 25 Jul 2019 13:09:35 -0400 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 64C3822C7B; Thu, 25 Jul 2019 17:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564074573; bh=rkdM8CWr1A1LMWe/EH04Dnfcj0n7tqCfgrgm7BTi5jQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=V2kS5kGzF++a03Gk5zIP6RZHen6WFgWlfieoKDlrHqhEHPec5TNp/uyFIM1M9uehw LnN/eGuu4aLZCbQHXlzK4cEM25XKPTnaNYChzXcEWdoNw9zQyjL+vFPdlyy6PV4aH5 wyN/g5oynAZo0AxPt7Dvwsws0Sm+M9vkaj0veq4o= Received: by mail-wr1-f50.google.com with SMTP id n9so51672752wru.0; Thu, 25 Jul 2019 10:09:33 -0700 (PDT) X-Gm-Message-State: APjAAAVchACu9+4DfrJwnByOAiWXS7fa4zbLsTb942psMJLSrWTENUrN ls4uYm87r0BqtAcxe5ZdkT9zv+sbF1z9ypuV6dE= X-Received: by 2002:adf:c613:: with SMTP id n19mr39171710wrg.109.1564074571943; Thu, 25 Jul 2019 10:09:31 -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: <1j5znqxj74.fsf@starbuckisacylon.baylibre.com> From: Chen-Yu Tsai Date: Fri, 26 Jul 2019 01:09:20 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/8] clk: meson: gxbb: migrate to the new parent description method To: Jerome Brunet , Alexandre Mergnat Cc: 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 25, 2019 at 10:50 PM Jerome Brunet wrote: > > On Mon 22 Jul 2019 at 11:54, Alexandre Mergnat wrote: > > > > @@ -1592,13 +1737,29 @@ static struct clk_regmap gxbb_vid_pll_div = { > > .hw.init = &(struct clk_init_data) { > > .name = "vid_pll_div", > > .ops = &meson_vid_pll_div_ro_ops, > > - .parent_names = (const char *[]){ "hdmi_pll" }, > > + .parent_data = &(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 to 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 picks > * up the appropriate one. > */ If you're sticking to global names for now, you could just skip converting this clock altogether. I suspect .parent_names will be around for some time. On the other hand, if you really want to get rid of global clock name based 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. Just my two cents. ChenYu > > + .name = "hdmi_pll", > > + .index = -1, > > + }, > > .num_parents = 1, > > .flags = 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