linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Aswath Govindraju <a-govindraju@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>,
	Cory Tusar <cory.tusar@pid1solutions.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: eeprom-93xx46: Convert to json schema\
Date: Tue, 17 Aug 2021 14:46:29 -0500	[thread overview]
Message-ID: <YRwSFdhUb9RT0wOZ@robh.at.kernel.org> (raw)
In-Reply-To: <20210810064904.10846-1-a-govindraju@ti.com>

On Tue, Aug 10, 2021 at 12:18:59PM +0530, Aswath Govindraju wrote:
> Convert eeprom-93xx46 binding documentation from txt to yaml format

Drop the trailing '\' in the subject.

> 
> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
> ---
> 
> Device tree fixes required are posted in the following patch,
> https://lore.kernel.org/patchwork/project/lkml/list/?series=511477
> 
> 
>  .../bindings/misc/eeprom-93xx46.txt           | 29 --------
>  .../bindings/misc/eeprom-93xx46.yaml          | 72 +++++++++++++++++++
>  2 files changed, 72 insertions(+), 29 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/misc/eeprom-93xx46.txt
>  create mode 100644 Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml
> 
> diff --git a/Documentation/devicetree/bindings/misc/eeprom-93xx46.txt b/Documentation/devicetree/bindings/misc/eeprom-93xx46.txt
> deleted file mode 100644
> index 72ea0af368d4..000000000000
> --- a/Documentation/devicetree/bindings/misc/eeprom-93xx46.txt
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -EEPROMs (SPI) compatible with Microchip Technology 93xx46 family.
> -
> -Required properties:
> -- compatible : shall be one of:
> -    "atmel,at93c46"
> -    "atmel,at93c46d"
> -    "atmel,at93c56"
> -    "atmel,at93c66"
> -    "eeprom-93xx46"
> -    "microchip,93lc46b"
> -- data-size : number of data bits per word (either 8 or 16)
> -
> -Optional properties:
> -- read-only : parameter-less property which disables writes to the EEPROM
> -- select-gpios : if present, specifies the GPIO that will be asserted prior to
> -  each access to the EEPROM (e.g. for SPI bus multiplexing)
> -
> -Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
> -apply.  In particular, "reg" and "spi-max-frequency" properties must be given.
> -
> -Example:
> -	eeprom@0 {
> -		compatible = "eeprom-93xx46";
> -		reg = <0>;
> -		spi-max-frequency = <1000000>;
> -		spi-cs-high;
> -		data-size = <8>;
> -		select-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
> -	};
> diff --git a/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml b/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml
> new file mode 100644
> index 000000000000..4254a7be5a70
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/misc/eeprom-93xx46.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microchip 93xx46 SPI compatible EEPROM family dt bindings
> +
> +maintainers:
> +  - Cory Tusar <cory.tusar@pid1solutions.com>
> +
> +properties:
> +  $nodename:
> +    pattern: "@[0-9]+$"

Unless you want to define 'eeprom' as the correct node name, there's no 
point in this. The unit address is checked by the spi bus schema and 
it's also wrong here being decimal.

> +
> +  compatible:
> +    enum:
> +      - atmel,at93c46
> +      - atmel,at93c46d
> +      - atmel,at93c56
> +      - atmel,at93c66
> +      - eeprom-93xx46
> +      - microchip,93lc46b
> +
> +  data-size:
> +    description: number of data bits per word
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [8, 16]
> +
> +  reg:
> +    description: chip select of EEPROM
> +    maxItems: 1
> +
> +  spi-max-frequency: true
> +  spi-cs-high: true
> +
> +  read-only:
> +    description:
> +      parameter-less property which disables writes to the EEPROM

type: boolean.


> +
> +  select-gpios:
> +    description:
> +      specifies the GPIO that needs to be asserted prior to each access
> +      of EEPROM (e.g. for SPI bus multiplexing)
> +    maxItems: 1
> +
> +
> +required:
> +  - compatible
> +  - reg
> +  - data-size
> +  - spi-max-frequency
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    spi0 {

spi {

> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      eeprom@0 {
> +        compatible = "eeprom-93xx46";
> +        reg = <0>;
> +        spi-max-frequency = <1000000>;
> +        spi-cs-high;
> +        data-size = <8>;
> +        select-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
> +      };
> +    };
> -- 
> 2.17.1
> 
> 

  reply	other threads:[~2021-08-17 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10  6:48 [PATCH] dt-bindings: eeprom-93xx46: Convert to json schema\ Aswath Govindraju
2021-08-17 19:46 ` Rob Herring [this message]
2021-08-18 10:59   ` Aswath Govindraju

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=YRwSFdhUb9RT0wOZ@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=a-govindraju@ti.com \
    --cc=cory.tusar@pid1solutions.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linkmauve@linkmauve.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lokeshvutla@ti.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).