linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Sean Anderson <sean.anderson@seco.com>
Cc: Kishon Vijay Abraham I <kishon@kernel.org>,
	devicetree@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Madalin Bucur <madalin.bucur@nxp.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Camelia Alexandra Groza <camelia.groza@nxp.com>,
	Bagas Sanjaya <bagasdotme@gmail.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	linux-phy@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v14 06/15] clk: Add Lynx 10G SerDes PLL driver
Date: Tue, 16 May 2023 22:02:27 +0530	[thread overview]
Message-ID: <ZGOwGypfqeHsP6V0@matsya> (raw)
In-Reply-To: <7ad1089f-106d-e355-5558-f06f8b428f34@seco.com>

On 16-05-23, 11:11, Sean Anderson wrote:
> On 5/16/23 09:22, Vinod Koul wrote:
> > On 09-05-23, 11:26, Sean Anderson wrote:
> >> On 5/9/23 09:00, Vinod Koul wrote:
> >> > On 08-05-23, 11:31, Sean Anderson wrote:
> >> >> On 5/8/23 05:15, Vinod Koul wrote:
> >> > 
> >> >> >> +int lynx_clks_init(struct device *dev, struct regmap *regmap,
> >> >> >> +		   struct clk *plls[2], struct clk *ex_dlys[2], bool compat);
> >> >> > 
> >> >> > so you have an exported symbol for clk driver init in phy driver header?
> >> >> > can you please explain why..?
> >> >> 
> >> >> So that it can be called at the appropriate time during the phy's probe function.
> >> >> 
> >> >> This is really an integral part of the phy driver, but I was directed to split it
> >> >> off and put it in another subsystem's directory.
> >> > 
> >> > That is right clock should be belong to clk driver. IIUC the hardware is
> >> > phy along with clocks and you are doing the clk init. I think that may
> >> > not be correct model, you should really have a device tree node to
> >> > represent the clock and the phy node
> >> > 
> >> > 
> >> > What stops this from being modelled as it is in the hardware?
> >> 
> >> It *is* modeled as it is in hardware. With just the serdes compatible,
> >> we have all the information we need to create the clocks. So we do so.
> >> There's no need for a separate device just to create four clocks.
> >> 
> >> These clocks cannot be used by any other device (except possibly by
> >> putting a lane into test mode). So there is no benefit from making them
> >> a separate device, except an increase in complexity due to ordering and
> >> dynamic lookup. By doing things this way we know that either there was
> >> an error or the clocks all exist, and the lifetime of the clocks matches
> >> the serdes.
> > 
> > Okay that does makes sense.
> > 
> > In that case why should this not be in the phy driver itself. There are
> > already few examples og phy drivers having inbuild clk where is makes
> > sense. You register the clk_ops as part of phy driver
> 
> You told me to do it this way

I agree that was not the right recommendation back then and your view
was right

-- 
~Vinod

  reply	other threads:[~2023-05-16 16:33 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 16:05 [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes Sean Anderson
2023-04-13 16:05 ` [PATCH v14 01/15] dt-bindings: phy: Add 2500BASE-X and 10GBASE-R Sean Anderson
2023-04-13 16:05 ` [PATCH v14 02/15] dt-bindings: phy: Add Lynx 10G phy binding Sean Anderson
2023-04-13 16:05 ` [PATCH v14 03/15] dt-bindings: Convert gpio-mmio to yaml Sean Anderson
2023-04-18 20:37   ` Rob Herring
2023-05-11  9:18   ` Bartosz Golaszewski
2023-04-13 16:05 ` [PATCH v14 04/15] dt-bindings: gpio-mmio: Add compatible for QIXIS Sean Anderson
2023-04-13 16:05 ` [PATCH v14 05/15] dt-bindings: clock: Add ids for Lynx 10g PLLs Sean Anderson
2023-04-13 16:05 ` [PATCH v14 06/15] clk: Add Lynx 10G SerDes PLL driver Sean Anderson
2023-05-08  9:15   ` Vinod Koul
2023-05-08 15:31     ` Sean Anderson
2023-05-09 13:00       ` Vinod Koul
2023-05-09 15:26         ` Sean Anderson
2023-05-16 13:22           ` Vinod Koul
2023-05-16 15:11             ` Sean Anderson
2023-05-16 16:32               ` Vinod Koul [this message]
2023-04-13 16:05 ` [PATCH v14 07/15] phy: fsl: Add Lynx 10G SerDes driver Sean Anderson
2023-05-08  9:22   ` Vinod Koul
2023-05-08 15:28     ` Sean Anderson
2023-05-16 13:36       ` Vinod Koul
2023-05-16 15:12         ` Sean Anderson
2023-04-13 16:06 ` [PATCH v14 08/15] phy: lynx10g: Enable by default on Layerscape Sean Anderson
2023-04-13 16:06 ` [PATCH v14 09/15] arm64: dts: ls1046a: Add serdes nodes Sean Anderson
2023-04-13 16:06 ` [PATCH v14 10/15] arm64: dts: ls1046ardb: Add serdes descriptions Sean Anderson
2023-04-13 16:06 ` [PATCH v14 11/15] arm64: dts: ls1088a: Add serdes nodes Sean Anderson
2023-04-13 16:06 ` [PATCH v14 12/15] arm64: dts: ls1088a: Prevent PCSs from probing as phys Sean Anderson
2023-04-13 16:06 ` [PATCH v14 13/15] arm64: dts: ls1088ardb: Remove aquantia interrupt Sean Anderson
2023-04-13 16:06 ` [PATCH v14 14/15] arm64: dts: ls1088ardb: Add SFP cage Sean Anderson
2023-04-13 16:06 ` [PATCH v14 15/15] arm64: dts: ls1088ardb: Add serdes descriptions Sean Anderson
2023-04-25 19:50 ` [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes Vladimir Oltean
2023-04-25 20:22   ` Sean Anderson
2023-04-26 10:51     ` Vladimir Oltean
2023-04-26 14:50       ` Sean Anderson
2023-04-29 17:24         ` Vladimir Oltean
2023-05-01 15:03           ` Sean Anderson
2023-05-22 14:42             ` Sean Anderson
2023-05-22 15:00               ` Vladimir Oltean
2023-06-09 19:19                 ` Sean Anderson
2023-06-10 22:21                   ` Vladimir Oltean
2023-06-12 14:35                     ` Sean Anderson
2023-06-12 16:33                       ` Vladimir Oltean
2023-06-12 20:46                         ` Sean Anderson
2023-06-13 14:27                           ` Vladimir Oltean
2023-08-10 10:26                             ` Vladimir Oltean
2023-08-10 19:58                               ` Sean Anderson
2023-08-11 16:12                                 ` Vladimir Oltean
2023-09-13 22:02                                 ` Vladimir Oltean
2023-08-11 15:08                             ` Vladimir Oltean
2023-08-11 15:43                               ` Sean Anderson
2023-08-11 16:36                                 ` Vladimir Oltean
2023-08-21 12:49                                   ` Vladimir Oltean
2023-08-21 17:45                                     ` Sean Anderson
2023-08-21 18:13                                       ` Ioana Ciornei
2023-08-21 18:20                                         ` Vladimir Oltean
2023-08-21 18:46                                         ` Sean Anderson
2023-08-21 19:58                                           ` Vladimir Oltean
2023-08-21 21:06                                             ` Sean Anderson
2023-08-21 22:48                                               ` Vladimir Oltean
2023-08-21 23:39                                                 ` Sean Anderson
2023-08-21 23:59                                                   ` Vladimir Oltean
2023-08-24 22:09                                                     ` Sean Anderson
2023-08-25 14:43                                                       ` Vladimir Oltean
2023-08-22 14:55                                           ` Ioana Ciornei
2023-08-24 20:54                                             ` Sean Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZGOwGypfqeHsP6V0@matsya \
    --to=vkoul@kernel.org \
    --cc=bagasdotme@gmail.com \
    --cc=camelia.groza@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=kishon@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@nxp.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sean.anderson@seco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).