public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: conor+dt@kernel.org, krzk+dt@kernel.org,
	linux-mips@vger.kernel.org,  linux-kernel@vger.kernel.org,
	tsbogend@alpha.franken.de,  linux-i2c@vger.kernel.org,
	andi.shyti@kernel.org,  devicetree@vger.kernel.org
Subject: Re: [PATCH 1/5] dt-bindings: i2c: Add RTL9300 I2C controller
Date: Tue, 17 Sep 2024 19:32:53 -0500	[thread overview]
Message-ID: <172661957208.22701.3209125488509586374.robh@kernel.org> (raw)
In-Reply-To: <20240917232932.3641992-2-chris.packham@alliedtelesis.co.nz>


On Wed, 18 Sep 2024 11:29:28 +1200, Chris Packham wrote:
> Add dtschema for the I2C controller on the RTL9300 SoC. The I2C
> controllers on this SoC are part of the "switch" block which is
> represented here as a syscon node. The SCL pins are dependent on the I2C
> controller (GPIO8 for the first controller, GPIO 17 for the second). The
> SDA pins can be assigned to either one of the I2C controllers (but not
> both).
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> 
> Notes:
>     This does hit generate the following dt_binding_check warning
> 
>     realtek,rtl9300-i2c.example.dts:22.19-30.13: Warning (unit_address_vs_reg): /example-0/switch@1b000000/i2c@36c: node has a unit name, but no reg or ranges property
> 
>     Which is totally correct. I haven't given this thing a reg property
>     because I'm using an offset from the parent syscon node. I'm also not
>     calling the first offset "offset" but I don't think that'd help.
> 
>     I looked at a couple of other examples of devices that are children of
>     syscon nodes (e.g. armada-ap806-thermal, ap806-cpu-clock) these do have
>     a reg property in the dts but as far as I can see from the code it's not
>     actually used, instead the register offsets are in the code looked up
>     from the driver data (in at least one-case the reg offset is for a
>     legacy usage).
> 
>     So I'm a little unsure what to do here. I can add a reg property and
>     update the driver to use that to get the offset for the first set of
>     registers (or just not use it). Or I could drop the @36c from the node
>     names but then I coudn't distinguish the two controllers without failing
>     the $nodename: requirement from i2c-controller.yaml.
> 
>  .../bindings/i2c/realtek,rtl9300-i2c.yaml     | 73 +++++++++++++++++++
>  MAINTAINERS                                   |  6 ++
>  2 files changed, 79 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/realtek,rtl9300-i2c.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/i2c/realtek,rtl9300-i2c.example.dts:22.19-30.13: Warning (unit_address_vs_reg): /example-0/switch@1b000000/i2c@36c: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/i2c/realtek,rtl9300-i2c.example.dts:32.19-38.13: Warning (unit_address_vs_reg): /example-0/switch@1b000000/i2c@388: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/i2c/realtek,rtl9300-i2c.example.dtb: /example-0/switch@1b000000: failed to match any schema with compatible: ['realtek,rtl9302c-switch', 'syscon', 'simple-mfd']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240917232932.3641992-2-chris.packham@alliedtelesis.co.nz

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


  reply	other threads:[~2024-09-18  0:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-17 23:29 [PATCH 0/5] i2c: RTL9300 support Chris Packham
2024-09-17 23:29 ` [PATCH 1/5] dt-bindings: i2c: Add RTL9300 I2C controller Chris Packham
2024-09-18  0:32   ` Rob Herring (Arm) [this message]
2024-09-18 14:14   ` Rob Herring
2024-09-18 20:43     ` Chris Packham
2024-09-17 23:29 ` [PATCH 2/5] i2c: Add driver for the " Chris Packham
2024-09-18 20:27   ` Andi Shyti
2024-09-18 21:18     ` Chris Packham
2024-09-17 23:29 ` [PATCH 3/5] mips: dts: realtek: Add I2C controllers Chris Packham
2024-09-17 23:29 ` [PATCH 4/5] dt-bindings: i2c: Add RTL9300 I2C multiplexer Chris Packham
2024-09-18  0:32   ` Rob Herring (Arm)
2024-09-18 14:25   ` Rob Herring
2024-09-17 23:29 ` [PATCH 5/5] i2c: rtl9300: Add multiplexing support Chris Packham
2024-09-18 20:36   ` Andi Shyti
2024-09-18 21:44     ` Chris Packham
2024-09-19  5:06       ` Chris Packham

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=172661957208.22701.3209125488509586374.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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