Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp971565ybj; Tue, 5 May 2020 10:36:21 -0700 (PDT) X-Google-Smtp-Source: APiQypI1UYH1FsHJGOuCl/YG/UlARjQsuK/pHbdG/DmUNV9yo0odabtL/E29DfU5ZbV5/DbllEGz X-Received: by 2002:a17:906:7f0c:: with SMTP id d12mr3789507ejr.40.1588700181620; Tue, 05 May 2020 10:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588700181; cv=none; d=google.com; s=arc-20160816; b=FiKI/qhVS647oRvbVep44cNgVz1ePszZoJ7vaslRRU1qe/u1T4rloYwUAsBhXxPURo 6gzOavjcdBNXuSPxixsiLxhGpb1icC/50SLJ118UTKysHuZrDKm8N6VWhOo9IFi2ZtRw ecW9dMyPstSjyUetDcOh/bF+nLlfM+Ol7ggBM9KDYiA8pmc0lmxYYCNx3XIMhF9HNrcG zveVvREXetPdAKf5Fi1Tb06oiGsr7MCL4/sh5YcfAK/TOzHfIKjHd/xEM9IH6Bqvi9Pn +98iE5FA37tNkvDEdaV2N6fB+JDlON68Vp2rk6YXwoTJqadqEyNgPSe29vARux0tjePO qTow== 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=EQsoLSVjLAyR/M3Ocg/DHLH6pm0RmX/436FGjF6WTao=; b=opQp2jPxHxsQ4eQagKaSRvya6YuUyFApXDBfidSPTF/R0xnwyL7y3xRbw1MotJEWfP 8ouGpIzzzUQvdfWxrGmTDrpFQaKZvzPNlNmN/kvctxuNfAGtm56yPAwmBP1N6PQRtr0v hx9YuSw/FFtz7/sjUmPNxBDWvFCu5ni9ZAtWm5xBueJfR8yzFobBbr4Oi1I1cCIjH4/w /IOX2wvGfCXcztnWW2CaY3T0Z5st2IL9XPDEJtpjyhIum4Q/J9QGCWvRxFwGH0Vy4Lvo ROarh3MOoU1GXhcuzm8aNeul+5BZ7u0MUQ+fr3EOABxoLZqOPedGyQ+/cE6Cdp/4z61B dihw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ke1ddssf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id t14si1569808edi.331.2020.05.05.10.35.57; Tue, 05 May 2020 10:36:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ke1ddssf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730242AbgEERbi (ORCPT + 99 others); Tue, 5 May 2020 13:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729199AbgEERbi (ORCPT ); Tue, 5 May 2020 13:31:38 -0400 Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE6DAC061A10 for ; Tue, 5 May 2020 10:31:37 -0700 (PDT) Received: by mail-vs1-xe42.google.com with SMTP id e10so1760083vsp.12 for ; Tue, 05 May 2020 10:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EQsoLSVjLAyR/M3Ocg/DHLH6pm0RmX/436FGjF6WTao=; b=Ke1ddssfTsxp0iPhblhR8uitz3u+NzVLxty3wGO22LNbm/oHweSwOoglBCDtTP/BIT nV1QFq59DQfSmb6KnLtJ20O65z/eG/stUQHHvO8IH4EjGKYIUy9p4mmslme/tNVh5Flm 6cGsK5McFrzX89tb9oXS6LtVMITgWloKe3SwFt3NmJYkPMWNvHfXt2Ie7uhSd+23n+/8 ATV6FtzN+kcQJYmd3TQIVidF4Kn9qkk/B5Pp0RJ4v+8tQh2QN5nO4biP92tJ6VPwRAnT Gj9H12bpBzqp+B/l/ZfQsusyeGTwkTsHyDvj43JP5reauKAVSHVR8hvyiuB885U4ug4L ZUZA== 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; bh=EQsoLSVjLAyR/M3Ocg/DHLH6pm0RmX/436FGjF6WTao=; b=mAX0Heq8ozkAfuqLwy0nDhnWvPC/nGnOy2IUPOSMsaUM00dcCIGxHBTBCRmQq6NymD TGKj/HlM1p3xD2MBsT+A3n0GWGbbFNf3GGqyiOuytseA4duNThZ5Z9STu5mek2sN8ruu R31fW34fyL5F7Tw3yWS0g72uB5AHFvWnLz9UMgrrsQt03g233uWIjiApE2Z9UCm9i9Ls HCEPN7BbL6u92lF9a++HFfcw+Iiy6GwTPIL/Ypt9c5SMAOjZOQ3/bnhQnyj2LUHBNFEE YBuFI5twWGBQhxPvHWi2XtOltYrdkUCAaQozd2vhgjyQ+RZm28uLXrGe03KsQIIc9wu1 LAAg== X-Gm-Message-State: AGi0PuaqnHk6y6RIDB/UebiXbp7KseW1WhIXQrTB94M0uCtxtfamm6Lp uhdDSnNcQnSiMqDDsScSm8kp7ErGdBHN/E0azZpRqw== X-Received: by 2002:a67:302:: with SMTP id 2mr3875137vsd.165.1588699896206; Tue, 05 May 2020 10:31:36 -0700 (PDT) MIME-Version: 1.0 References: <20200428210229.703309-1-martin.blumenstingl@googlemail.com> <20200428210229.703309-3-martin.blumenstingl@googlemail.com> <1jlfmdi9uw.fsf@starbuckisacylon.baylibre.com> <1jh7x1i3hj.fsf@starbuckisacylon.baylibre.com> <1j1rnygye6.fsf@starbuckisacylon.baylibre.com> In-Reply-To: <1j1rnygye6.fsf@starbuckisacylon.baylibre.com> From: Ulf Hansson Date: Tue, 5 May 2020 19:30:59 +0200 Message-ID: Subject: Re: [PATCH v6 2/2] mmc: host: meson-mx-sdhc: new driver for the Amlogic Meson SDHC host To: Jerome Brunet Cc: Martin Blumenstingl , Stephen Boyd , "open list:ARM/Amlogic Meson..." , "linux-mmc@vger.kernel.org" , DTML , Rob Herring , Jianxin Pan , Linux Kernel Mailing List , yinxin_1989@aliyun.com, Linux ARM , lnykww@gmail.com, Anand Moon 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 Tue, 5 May 2020 at 18:05, Jerome Brunet wrote: > > > On Tue 05 May 2020 at 10:17, Ulf Hansson wrote: > > > [...] > > > >> >> > + > >> >> > + return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, > >> >> > + onecell_data); > >> >> > >> >> I think registering a provider for a module that does not provide clocks > >> >> to any other device is a bit overkill. > >> >> > >> >> I understand the matter is getting the per-user clk* pointer. > >> >> Since this is the module registering the clock, you can use clk_hw->clk > >> >> to get it. > >> >> > >> >> Once you have the clk* of the leaf clocks, you don't even need to keep > >> >> track of the clk_hw* since you are using devm_ > >> >> > >> >> Afterward, we should propably discuss with Stephen if something should > >> >> be added in CCF to get a struct clk* from struct clk_hw*. > >> >> > >> > > >> > [...] > >> > > >> > Hmm. > >> > > >> > I am not sure the above is a good idea, at all. Unless, I am > >> > misunderstanding your point, which may be the case. > >> > > >> > I think above "shortcuts" could lead to abuse of the clock framework > >> > and its internal data structures. When going forward, this could make > >> > it unnecessary harder to maintain the clock framework. > >> > > >> > I know, it's not my responsibility, but from my experience with MMC > >> > and SDIO interfaces, is that those have been too easy abuse - since > >> > most of the data structures and interfaces have been exported. Now, > >> > it's hard to roll back that, if you see what I mean. > >> > >> Indeed, it worth clarifying this first. > >> > >> With clk_register deprecated in favor of clk_hw_register, we are likely > >> to see that case rise elsewhere. > >> > > > > So, according to the separate discussion [1], I think we can let > > Martin decide what option to implement at this point. > > > > 1. Implement the "clk_hw_get_clk()" approach. The preferred option, > > but requires wider changes of the clock subsystem as well. > > > > 2. Keep the existing approach, with devm_clk_get(). I am fine with > > this as well, we can always switch to 1) later on. > > I have a problem with this approach. > The dt-bindings would include "#clock-cells = <1>" for a device that > does not actually provide and only needs it has a temporary work around. > Those bindings are supposed to be stable ... I agree, the bindings need to be stable. What is the problem of keeping "#clock-cells = <1>" around, when we move to a clk_hw_get_clk() approach in the next step? > > I have proposed 2 other short term solutions, let's see how it goes Yes, seems like we need to wait for Stephen's input then. Kind regards Uffe