devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH net-next] dt-bindings: net: convert sff,sfp to dtschema
Date: Wed, 30 Mar 2022 16:54:28 +0100	[thread overview]
Message-ID: <YkR9NKec1YR7VGOy@shell.armlinux.org.uk> (raw)
In-Reply-To: <b45dabe9-e8b6-4061-1356-4e5e6406591b@canonical.com>

On Wed, Mar 16, 2022 at 01:04:21PM +0100, Krzysztof Kozlowski wrote:
> On 16/03/2022 11:18, Ioana Ciornei wrote:
> >>>
> >>> It's related since it shows a generic usage pattern of the sfp node.
> >>> I wouldn't just remove it since it's just adds context to the example
> >>> not doing any harm.
> >>
> >> Usage (consumer) is not related to these bindings. The bindings for this
> >> phy/mac should show the usage of sfp, but not the provider bindings.
> >>
> >> The bindings of each clock provider do not contain examples for clock
> >> consumer. Same for regulator, pinctrl, power domains, interconnect and
> >> every other component. It would be a lot of code duplication to include
> >> consumers in each provider. Instead, we out the example of consumer in
> >> the consumer bindings.
> >>
> >> The harm is - duplicated code and one more example which can be done
> >> wrong (like here node name not conforming to DT spec).
> > 
> > I suppose you refer to "sfp-eth3" which you suggested here to be just
> > "sfp". 
> 
> I refer now to "cps_emac3" which uses specific name instead of generic
> and underscore instead of hyphen (although underscore is actually listed
> as allowed in DT spec, dtc will complain about it).
> 
> >In an example, that's totally acceptable but on boards there can
> > be multiple SFPs which would mean that there would be multiple sfp
> > nodes. We have to discern somehow between them. Adding a unit name would
> > not be optimal since there is no "reg" property to go with it.
> 
> The common practice is adding a numbering suffix.
> 
> > 
> > So "sfp-eth3" or variants I think are necessary even though not
> > conforming to the DT spec.
> > 
> >>
> >> If you insist to keep it, please share why these bindings are special,
> >> different than all other bindings I mentioned above.
> > 
> > If it's that unheard of to have a somewhat complete example why are
> > there multiple dtschema files submitted even by yourself with this same
> > setup?
> 
> I am also learning and I wished many of my mistakes of early DT bindings
> conversion were spotted. Especially my early bindings... but even now I
> keep making mistakes. Human thing. :)
> 
> I converted quite a lot of bindings, so can you point to such examples
> of my schema which includes consumer example in a provider bindings? If
> you find such, please send a patch removing trivial code.
> 
> 
> > As an example for a consumer device being listed in the provider yaml
> > file is 'gpio-pca95xx.yaml'
> 
> Indeed, this is trivial and useless code which I kept from conversion,
> should be removed.
> 
> >
>  and for the reverse (provider described in
> > the consumer) I can list 'samsung,s5pv210-clock.yaml',
> > 'samsung,exynos5260-clock.yaml' etc.
> 
> These are different. This is an example how to model the input clock to
> the device being described in the bindings. This is not an example how
> to use the clock provider, like you created here. The input clock
> sometimes is defined in Exynos clock controller, sometimes outside. The
> example there shows the second case - when it has to come outside. It's
> not showing the usage of clocks provided by this device, but I agree
> that it also might be trivial and obvious. If you think it is obvious,
> feel free to comment/send a patch.

Why is whether something is an input or output relevant? One can quite
rightly argue that SFPs are both input and output. :)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2022-03-30 15:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 12:33 [PATCH net-next] dt-bindings: net: convert sff,sfp to dtschema Ioana Ciornei
2022-03-15 18:21 ` Krzysztof Kozlowski
2022-03-15 19:07   ` Ioana Ciornei
2022-03-16  8:23     ` Krzysztof Kozlowski
2022-03-16 10:18       ` Ioana Ciornei
2022-03-16 12:04         ` Krzysztof Kozlowski
2022-03-30 15:54           ` Russell King (Oracle) [this message]
2022-03-30 15:56             ` Russell King (Oracle)
2022-03-30 16:44             ` Krzysztof Kozlowski
2022-03-30 15:52         ` Russell King (Oracle)
2022-03-30 16:09           ` Rob Herring
2022-03-30 16:35             ` Russell King (Oracle)
2022-03-30 15:40   ` Russell King (Oracle)
2022-03-30 16:51     ` Krzysztof Kozlowski
2022-03-30 16:59       ` Krzysztof Kozlowski
2022-03-31 20:45       ` Krzysztof Kozlowski
2022-06-10 22:31 ` Rob Herring

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=YkR9NKec1YR7VGOy@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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).