linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
To: Maxime Ripard <maxime-R63rPqgGiG5yDzI6CaY1VQ@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Yoshihiro Shimoda
	<yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
	linux-spi <linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux-renesas
	<linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode
Date: Thu, 27 Feb 2020 15:05:56 +0100	[thread overview]
Message-ID: <CAMuHMdWYF9RrLdkuK_PxfVqocUMHVKPpjnyc4FR+N69A_htdyQ@mail.gmail.com> (raw)
In-Reply-To: <20200227135109.l2oal55nwhm5un2c-2DbqMqoCcjvhXIiyNabO3w@public.gmane.org>

Hi Maxime,

On Thu, Feb 27, 2020 at 2:51 PM Maxime Ripard <maxime-R63rPqgGiG5yDzI6CaY1VQ@public.gmane.org> wrote:
> On Thu, Feb 27, 2020 at 02:19:08PM +0100, Geert Uytterhoeven wrote:
> > On Thu, Feb 27, 2020 at 2:09 PM Maxime Ripard <maxime-R63rPqgGiG5yDzI6CaY1VQ@public.gmane.org> wrote:
> > > On Thu, Feb 27, 2020 at 02:03:23PM +0100, Geert Uytterhoeven wrote:
> > > > Currently, the DT bindings for an SPI controller specify that
> > > > "#address-cells" must be fixed to one.  However, that applies to an SPI
> > > > controller in master mode only.  When running in SPI slave mode,
> > > > "#address-cells" should be zero.
> > > >
> > > > Fix this making the value of "#address-cells" dependent on the presence
> > > > of "spi-slave".
> > > >
> > > > Fixes: 0a1b929356830257 ("spi: Add YAML schemas for the generic SPI options")
> > > > Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> > > > Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
> >
> > > > --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
> > > > +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
> >
> > > > @@ -52,6 +53,18 @@ properties:
> > > >      description:
> > > >        The SPI controller acts as a slave, instead of a master.
> > > >
> > > > +if:
> > > > +  required:
> > > > +    [ spi-slave ]
> > >
> > > Nit: Usually, that notation is when you would do it on the same line,
> > > if you want to go to a new line, it would make more sense to use -
> >
> > Sorry, being a poor yaml-by-example programmer, I don't understand what
> > you mean.  Which part do you refer to by "that notation"?
>
> I meant that usually the [] notation is used over a single line.
>
> If you want to have a list over multiple lines, usually you would have
>
> required:
>   - spi-slave

IC. So I can also write:

    if:
      required: [ spi-slave ]
    else:
      ...

which is even shorter ;-)

Both seem to work fine.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2020-02-27 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 13:03 Geert Uytterhoeven
2020-02-27 13:09 ` Maxime Ripard
     [not found]   ` <20200227130937.qvrjyxcwim7rfum7-2DbqMqoCcjvhXIiyNabO3w@public.gmane.org>
2020-02-27 13:19     ` Geert Uytterhoeven
     [not found]       ` <CAMuHMdUVW_51dqMK=ziz_JVT3LuXX7vOF3-Ei-aHiiBuSepGpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-27 13:51         ` Maxime Ripard
     [not found]           ` <20200227135109.l2oal55nwhm5un2c-2DbqMqoCcjvhXIiyNabO3w@public.gmane.org>
2020-02-27 14:05             ` Geert Uytterhoeven [this message]
2020-02-27 14:16               ` Maxime Ripard

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=CAMuHMdWYF9RrLdkuK_PxfVqocUMHVKPpjnyc4FR+N69A_htdyQ@mail.gmail.com \
    --to=geert-td1emuhucqxl1znqvxdv9g@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=maxime-R63rPqgGiG5yDzI6CaY1VQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
    --subject='Re: [PATCH] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode' \
    /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

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).