devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Orson Zhai <orson.zhai@unisoc.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	kevin.tang@unisoc.com, baolin.wang@unisoc.com,
	chunyan.zhang@unisoc.com
Subject: Re: [PATCH V2 1/2] dt-bindings: syscon: Add syscon-names to refer to syscon easily
Date: Wed, 4 Dec 2019 10:38:30 -0600	[thread overview]
Message-ID: <20191204163830.GA25135@bogus> (raw)
In-Reply-To: <20191120154148.22067-2-orson.zhai@unisoc.com>

On Wed, Nov 20, 2019 at 11:41:47PM +0800, Orson Zhai wrote:
> Make life easier when syscon consumer want to access multiple syscon
> nodes with dozens of items.
> Add syscon-names and relative properties to help to manage different
> cases when accessing more than one syscon node even with arguments.
> 
> Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
> ---
>  .../devicetree/bindings/mfd/syscon.txt        | 43 +++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/syscon.txt b/Documentation/devicetree/bindings/mfd/syscon.txt
> index 25d9e9c2fd53..4c7bdb74bb0a 100644
> --- a/Documentation/devicetree/bindings/mfd/syscon.txt
> +++ b/Documentation/devicetree/bindings/mfd/syscon.txt
> @@ -30,3 +30,46 @@ hwlock1: hwspinlock@40500000 {
>         reg = <0x40500000 0x1000>;
>         #hwlock-cells = <1>;
>  };
> +
> +
> +
> +==Syscon Name==
> +
> +Syscon name is a helper to be used in consumer nodes who refer to system
> +controller node. It provides a way to refer to syscon node by names with
> +phandle args in syscon consumer node. It will help people who have a lot
> +of syscon references to be managed. It is not a must feature and has no
> +effect to syscon node itself at all.
> +
> +Required properties:
> +- syscons: List of phandles and any number of arguments if needed. Arguments
> +  is specific to differnet vendors and its usage should be described at each
> +  vendor's bindings. For example: In Unisoc SoCs, the 1st arg will be treated
> +  as register address offset and the 2nd is bit mask.
> +
> +- syscon-names:        List of syscon node name strings sorted in the same order as
> +  what it represents in property syscons.
> +
> +Optional property:
> +- #.*-cells: Represents the number of arguments in single phandle in syscons
> +  list. ".*" is vendor specific. If this property is not set, default value
> +  will be 0.

This breaks the normal pattern of how '#.*-cells' works. While Arnd 
suggests removing it, I don't think that works well either with having a 
generic 'syscons' property. That means every syscon in a system has to 
have the same number of cells.

I don't really want to see syscon binding expanded. Really, I'd like 
'syscon' to go away. It's nothing more than a flag to create a regmap.

I think it is better to keep the property names specific to exactly what 
the functionality is for each syscon phandle rather than a generic 
binding.

What are the eamples of where you want to use this? Keep in mind that 
this sort of connection should *only* be used for things that have no 
other binding and kernel subsystem.

Rob

  parent reply	other threads:[~2019-12-04 16:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20 15:41 [PATCH V2 0/2] Add syscon name support Orson Zhai
2019-11-20 15:41 ` [PATCH V2 1/2] dt-bindings: syscon: Add syscon-names to refer to syscon easily Orson Zhai
2019-11-21 14:59   ` Arnd Bergmann
2019-12-04 16:38   ` Rob Herring [this message]
2019-12-04 17:00     ` Arnd Bergmann
2019-12-04 19:26       ` Rob Herring
2019-12-05  9:20         ` Arnd Bergmann
2019-12-05 12:55           ` Orson Zhai
2019-12-05 15:12             ` Rob Herring
     [not found]               ` <CA+H2tpEZ_d-c6DcfQ3yZPf4s_0GTe-q5q4FnVydYm2cdi0im=g@mail.gmail.com>
2019-12-05 16:55                 ` Orson Zhai
2019-11-20 15:41 ` [PATCH V2 2/2] mfd: syscon: Find syscon by names with arguments support Orson Zhai
2019-11-21 15:04   ` Arnd Bergmann
2019-11-22 16:21     ` Orson Zhai

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=20191204163830.GA25135@bogus \
    --to=robh@kernel.org \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@unisoc.com \
    --cc=chunyan.zhang@unisoc.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kevin.tang@unisoc.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=orson.zhai@unisoc.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).