devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Marek Behún" <kabel@kernel.org>, "Pavel Machek" <pavel@ucw.cz>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] [RFT] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding
Date: Tue, 12 Jul 2022 15:28:22 -0600	[thread overview]
Message-ID: <20220712212822.GQ1823936-robh@kernel.org> (raw)
In-Reply-To: <20220708160528.ysy4lzxfpwobfiwr@pali>

On Fri, Jul 08, 2022 at 06:05:28PM +0200, Pali Rohár wrote:
> On Wednesday 06 July 2022 17:36:43 Krzysztof Kozlowski wrote:
> > On 06/07/2022 17:27, Marek Behún wrote:
> > > On Wed, 6 Jul 2022 13:19:12 +0200
> > > Pali Rohár <pali@kernel.org> wrote:
> > > 
> > >> On Wednesday 06 July 2022 13:15:07 Marek Behún wrote:
> > >>> On Tue,  5 Jul 2022 17:59:28 +0200
> > >>> Pali Rohár <pali@kernel.org> wrote:
> > >>>   
> > >>>> +examples:
> > >>>> +  - |
> > >>>> +    #include <dt-bindings/leds/common.h>
> > >>>> +
> > >>>> +    cpld@3,0 {  
> > >>>
> > >>> The generic node name should be just "bus". That it is a CPLD
> > >>> implementation should come from compatible string.  
> > >>
> > >> Sorry, I do not understand why "bus". Why other memory chips are named
> > >> e.g. "nand" or "nor" and not "bus" too?
> > > 
> > > As far as I understand this is because that is the preferred name for
> > > busses and this is a bus, since there is also the simple-bus compatible.
> > > 
> > >> By this logic should not be _every_ node called just "bus"? Hm... and 
> > >> are names needed at all then?
> > > 
> > > :-)
> > > 
> > > The schema
> > >   https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/simple-bus.yaml
> > > allows for different names (soc|axi|ahb|*-bus) to avoid warnings on
> > > existing old dts files.
> > > 
> > > The preferred way is to not have the implementation in nodename,
> > > similar to how we use 'switch' instead of 'mv88e6xxx', or
> > > 'ethernet-phy' instead of 'mv88e151x', or 'led-controller', ...
> > 
> > Thanks Marek for detailed explanation.
> > The cases above rather trigger my comments and this one here, after
> > Pali's explanation, do not fit them. pld is a generic class of a device,
> > so it is okay here. cpld probably as well (although one could argue that
> > it is a subset of pld, so the generic name is pld, but then one would
> > say fpga also should be called pld). For me it does not have to be bus,
> > just don't want mv88e6xxx or any other vendor/model names. Therefore
> > cpld is fine.
> 
> Exactly. cpld, fpga, nor, nand, soc... all of them are not real buses.

I guess you could (and we do) have 'cpld' and 'fpga' as devices where 
the OS can reprogram them and such. But if the implementation is fixed 
with no implementation specific controls, I don't think naming how it's 
implemented adds too much. If there's nothing else to identify the 
device though, having 'cpld' in there does have some value I guess.

Same could be argued for soc too perhaps, but that's in the list largely 
to avoid a bunch of s/soc/bus/ on dts files.
 
> simple-bus here is just name invented by device tree and without which
> existing kernel drivers refuse to work.

Everything is just names invented by DT.

simple-bus means 'a bus containing MMIO devices without any bus 
configuration'. You want to add a clock to it?, then no longer a 
simple-bus. Based on that definition, the kernel can enumerate child 
devices without platform specific help. 

Just use 'cpld-bus' and lets move on with our lives.

Rob

      parent reply	other threads:[~2022-07-12 21:28 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05  0:04 [PATCH 1/2] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding Pali Rohár
2022-07-05  0:04 ` [PATCH 2/2] leds: Add support for Turris 1.x LEDs Pali Rohár
2022-07-05 10:37   ` Marek Behún
2022-07-05 10:56     ` Pali Rohár
2022-07-05 11:52       ` Marek Behún
2022-07-05 12:22         ` Pali Rohár
2022-07-05 12:30           ` Marek Behún
2022-07-05 12:32             ` Pali Rohár
2022-07-05 12:38               ` Marek Behún
2022-07-05 11:36 ` [PATCH 1/2] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding Krzysztof Kozlowski
2022-07-05 11:42   ` Pali Rohár
2022-07-05 11:51     ` Krzysztof Kozlowski
2022-07-05 12:15       ` Pali Rohár
2022-07-05 12:55         ` Krzysztof Kozlowski
2022-07-05 13:05           ` Pali Rohár
2022-07-05 13:07             ` Krzysztof Kozlowski
2022-07-05 11:53     ` Marek Behún
2022-07-05 13:54 ` Rob Herring
2022-07-05 15:59 ` [PATCH v2 1/2] [RFT] " Pali Rohár
2022-07-05 15:59   ` [PATCH v2 2/2] leds: Add support for Turris 1.x LEDs Pali Rohár
2022-07-05 17:30     ` Marek Behún
2022-07-05 18:40     ` Andy Shevchenko
2022-07-05 18:46       ` Pali Rohár
2022-07-05 18:58         ` Andy Shevchenko
2022-11-02  0:25     ` Pali Rohár
2022-07-05 17:51   ` [PATCH v2 1/2] [RFT] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding Krzysztof Kozlowski
2022-07-05 19:18   ` Rob Herring
2022-07-06 11:15   ` Marek Behún
2022-07-06 11:19     ` Pali Rohár
2022-07-06 15:27       ` Marek Behún
2022-07-06 15:36         ` Krzysztof Kozlowski
2022-07-06 16:43           ` Marek Behún
2022-07-06 18:16             ` Krzysztof Kozlowski
2022-07-08 16:05           ` Pali Rohár
2022-07-08 16:29             ` Marek Behún
2022-07-12 21:28             ` Rob Herring [this message]

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=20220712212822.GQ1823936-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kabel@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=pavel@ucw.cz \
    /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).