All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Biju Das" <biju.das.jz@bp.renesas.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Jean Delvare" <jdelvare@suse.de>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	linux-iio@vger.kernel.org,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] iio: dac: ti-dac5571: Use i2c_get_match_data()
Date: Thu, 17 Aug 2023 13:51:27 +0200	[thread overview]
Message-ID: <CAMuHMdVc547yPbstCiaWe9ZEqa91p9XJQd=AEP8d-wgUGZ4HuQ@mail.gmail.com> (raw)
In-Reply-To: <ZN30yevtrxRrzmS5@smile.fi.intel.com>

Hi Andy,

On Thu, Aug 17, 2023 at 12:22 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Wed, Aug 16, 2023 at 10:16:00AM +0200, Geert Uytterhoeven wrote:
> > On Tue, Aug 15, 2023 at 6:50 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Tue, Aug 15, 2023 at 09:29:06AM +0200, Geert Uytterhoeven wrote:
> > > > On Tue, Aug 15, 2023 at 9:19 AM Andy Shevchenko
> > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > On Sat, Aug 12, 2023 at 10:04:18AM +0100, Biju Das wrote:
>
> ...
>
> > > > > > +     {.compatible = "ti,dac5571", .data = &dac5571_spec[single_8bit] },
> > > > > > +     {.compatible = "ti,dac6571", .data = &dac5571_spec[single_10bit] },
> > > > > > +     {.compatible = "ti,dac7571", .data = &dac5571_spec[single_12bit] },
> > > > > > +     {.compatible = "ti,dac5574", .data = &dac5571_spec[quad_8bit] },
> > > > > > +     {.compatible = "ti,dac6574", .data = &dac5571_spec[quad_10bit] },
> > > > > > +     {.compatible = "ti,dac7574", .data = &dac5571_spec[quad_12bit] },
> > > > > > +     {.compatible = "ti,dac5573", .data = &dac5571_spec[quad_8bit] },
> > > > > > +     {.compatible = "ti,dac6573", .data = &dac5571_spec[quad_10bit] },
> > > > > > +     {.compatible = "ti,dac7573", .data = &dac5571_spec[quad_12bit] },
> > > > > > +     {.compatible = "ti,dac121c081", .data = &dac5571_spec[single_12bit] },
> > > > >
> > > > > I would reorder them a bit.
> > > >
> > > > Which is safe in this particular case...
> > > > But not in general, as there might be fall-back compatible values.
> > >
> > > You mean the OF ID list must be specifically ordered?! What a nice minefield!
> > > This has to be fixed somewhere else, surely.
> >
> > Seems like it is, cfr. the scoring system in drivers/of/base.c
> > __of_device_is_compatible().  Sorry for the confusion.
> >
> > I still tend to order them in match tables though, from most-specific
> > to least-specific.
> >
> > Note that soc_device_match() (which is used less, fortunately) does
> > not have such a scoring system, so order does matter there.
>
> Should be fixed there, because it's a big downside of OF.

Agreed. Note that it is unrelated to OF.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.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

      reply	other threads:[~2023-08-17 11:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12  9:04 [PATCH] iio: dac: ti-dac5571: Use i2c_get_match_data() Biju Das
2023-08-15  7:18 ` Andy Shevchenko
2023-08-15  7:29   ` Geert Uytterhoeven
2023-08-15 16:50     ` Andy Shevchenko
2023-08-16  8:16       ` Geert Uytterhoeven
2023-08-17 10:22         ` Andy Shevchenko
2023-08-17 11:51           ` Geert Uytterhoeven [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='CAMuHMdVc547yPbstCiaWe9ZEqa91p9XJQd=AEP8d-wgUGZ4HuQ@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=jdelvare@suse.de \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=u.kleine-koenig@pengutronix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.